incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject [1/7] git commit: tweaking init and ordering of tests
Date Thu, 19 Jan 2012 01:30:48 GMT
Updated Branches:
  refs/heads/master cea766dda -> 46ba34ee3


tweaking init and ordering of tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/commit/46ba34ee
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/tree/46ba34ee
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/diff/46ba34ee

Branch: refs/heads/master
Commit: 46ba34ee33c975afefa65853876531b3be4fb0fc
Parents: 5dbee6c
Author: Fil Maj <filip.maj@nitobi.com>
Authored: Wed Jan 18 17:28:58 2012 -0800
Committer: Fil Maj <filip.maj@nitobi.com>
Committed: Wed Jan 18 17:28:58 2012 -0800

----------------------------------------------------------------------
 autotest/index.html     |   27 +++++++++++++++++++++++----
 autotest/test-runner.js |   20 --------------------
 2 files changed, 23 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/blob/46ba34ee/autotest/index.html
----------------------------------------------------------------------
diff --git a/autotest/index.html b/autotest/index.html
index 213beea..ed9494c 100755
--- a/autotest/index.html
+++ b/autotest/index.html
@@ -10,12 +10,12 @@
     <link rel="stylesheet" type="text/css" href="qunit.css" />
     <script type="text/javascript" src="qunit.js"></script>
 
-    <!-- Load Test Runner -->
-    <script type="text/javascript" src="test-runner.js"></script>
-    
     <!-- Source -->
     <script type="text/javascript" src="../phonegap.js"></script>
-    
+
+    <!-- Load Test Runner -->
+    <script type="text/javascript" src="test-runner.js"></script>
+
     <!-- Tests -->
     <script type="text/javascript" src="tests/accelerometer.tests.js"></script>
     <script type="text/javascript" src="tests/battery.tests.js"></script>
@@ -29,6 +29,25 @@
     <script type="text/javascript" src="tests/notification.tests.js"></script>
     <script type="text/javascript" src="tests/orientation.tests.js"></script>
     <script type="text/javascript" src="tests/storage.tests.js"></script>
+    <script type="text/javascript">
+      document.addEventListener('deviceready', function() {
+        console.log('running tests');
+          var tests = new Tests();
+
+          // Each group of tests are declared as a function in the object `Tests`.
+          // A group of tests are identified by a name that contains the word 'Tests'.
+          //
+          // Load each group of tests into QUnit
+          for (var t in tests) {
+              if (t.indexOf('Tests') > -1) {
+                  tests[t]();
+              }
+          }
+          
+          // Start the QUnit test suite
+          QUnit.start();
+      }, false);
+    </script>
   </head>
     <body>
         <h1 id="qunit-header">PhoneGap API Spec</h1>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/blob/46ba34ee/autotest/test-runner.js
----------------------------------------------------------------------
diff --git a/autotest/test-runner.js b/autotest/test-runner.js
index ceb2941..0bd1aa2 100644
--- a/autotest/test-runner.js
+++ b/autotest/test-runner.js
@@ -7,23 +7,3 @@ sessionStorage.clear();
 // Android devices.
 var Tests = function() {};
 Tests.TEST_TIMEOUT = 2000;
-
-
-document.addEventListener('DOMContentLoaded', function() {
-    document.addEventListener('deviceready', function() {
-        var tests = new Tests();
-
-        // Each group of tests are declared as a function in the object `Tests`.
-        // A group of tests are identified by a name that contains the word 'Tests'.
-        //
-        // Load each group of tests into QUnit
-        for (var t in tests) {
-            if (t.indexOf('Tests') > -1) {
-                tests[t]();
-            }
-        }
-        
-        // Start the QUnit test suite
-        QUnit.start();
-    }, false);
-}, false);


Mime
View raw message