incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [4/6] updated test project for jasmine tests
Date Tue, 01 May 2012 20:57:38 GMT
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);
+	}
+}


Mime
View raw message