You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2012/05/01 22:57:38 UTC

[4/6] updated test project for jasmine tests

http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/e9230593/tests/MobileSpecUnitTests/www/cordova.js
----------------------------------------------------------------------
diff --git a/tests/MobileSpecUnitTests/www/cordova.js b/tests/MobileSpecUnitTests/www/cordova.js
new file mode 100644
index 0000000..044a06b
--- /dev/null
+++ b/tests/MobileSpecUnitTests/www/cordova.js
@@ -0,0 +1,13 @@
+document.write('<script type="text/javascript" charset="utf-8" src="../../cordova.wp7.js"></script>');
+document.write('<script type="text/javascript" charset="utf-8" src="../cordova.wp7.js"></script>');
+document.write('<script type="text/javascript" charset="utf-8" src="cordova.wp7.js"></script>');
+
+function backHome() {
+	
+	if (window.device && device.platform && device.platform.toLowerCase() == 'android') {
+            navigator.app.backHistory();
+	}
+	else {
+	    window.history.go(-1);
+	}
+}