cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmo...@apache.org
Subject git commit: fail from unsupported mode
Date Mon, 05 May 2014 18:56:52 GMT
Repository: cordova-labs
Updated Branches:
  refs/heads/cdvtest 2dcca2116 -> 599ebd16e


fail from unsupported mode


Project: http://git-wip-us.apache.org/repos/asf/cordova-labs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-labs/commit/599ebd16
Tree: http://git-wip-us.apache.org/repos/asf/cordova-labs/tree/599ebd16
Diff: http://git-wip-us.apache.org/repos/asf/cordova-labs/diff/599ebd16

Branch: refs/heads/cdvtest
Commit: 599ebd16e8f7c011b2dc86399db093ca3533cc94
Parents: 2dcca21
Author: Michal Mocny <mmocny@gmail.com>
Authored: Mon May 5 14:56:43 2014 -0400
Committer: Michal Mocny <mmocny@gmail.com>
Committed: Mon May 5 14:56:43 2014 -0400

----------------------------------------------------------------------
 cordova-app-test-harness/config.xml       | 2 +-
 cordova-plugin-test-framework/www/main.js | 9 +++++----
 2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/599ebd16/cordova-app-test-harness/config.xml
----------------------------------------------------------------------
diff --git a/cordova-app-test-harness/config.xml b/cordova-app-test-harness/config.xml
index 83d5ccb..0b0a707 100644
--- a/cordova-app-test-harness/config.xml
+++ b/cordova-app-test-harness/config.xml
@@ -9,7 +9,7 @@
     <access origin="http://www.apache.org/*" />
     <access origin="https://www.googleapis.com/*" />
 
-    <content src="assets/index.html" />
+    <content src="cdvtest/index.html" />
 
     <preference name="fullscreen" value="true" />
     <preference name="webviewbounce" value="false" />

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/599ebd16/cordova-plugin-test-framework/www/main.js
----------------------------------------------------------------------
diff --git a/cordova-plugin-test-framework/www/main.js b/cordova-plugin-test-framework/www/main.js
index 1f0ee03..999ab68 100644
--- a/cordova-plugin-test-framework/www/main.js
+++ b/cordova-plugin-test-framework/www/main.js
@@ -26,8 +26,7 @@
 /******************************************************************************/
 
 function getMode(callback) {
-  var mode = localStorage.getItem('mode') || 'main';
-  console.log(mode);
+  var mode = localStorage.getItem('cdvtest-mode') || 'main';
   callback(mode);
 }
 
@@ -38,10 +37,12 @@ function setMode(mode) {
     'manual': runManualTests
   }
   if (!handlers.hasOwnProperty(mode)) {
-    return console.error("Unsopported mode: " + mode);
+    console.error("Unsupported mode: " + mode);
+    console.error("Defaulting to 'main'");
+    mode = 'main';
   }
 
-  localStorage.setItem('mode', mode);
+  localStorage.setItem('cdvtest-mode', mode);
   clearContent();
 
   handlers[mode]();


Mime
View raw message