]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
increase length of waitfor timeout for phantom
authorJacob Thornton <jacobthornton@gmail.com>
Mon, 23 Apr 2012 10:18:13 +0000 (03:18 -0700)
committerJacob Thornton <jacobthornton@gmail.com>
Mon, 23 Apr 2012 10:18:13 +0000 (03:18 -0700)
js/tests/phantom.js
js/tests/pid.txt [new file with mode: 0644]

index 5173ba9a19ec81553dfe719c5fdc359206bac539..4105bf529df755fbe7ed51b2408a864ac85e9746 100644 (file)
@@ -2,15 +2,15 @@
 // Adapted from Modernizr
 
 function waitFor(testFx, onReady, timeOutMillis) {
-  var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 3001 //< Default Max Timout is 3s
+  var maxtimeOutMillis = timeOutMillis ? timeOutMillis :  5001 //< Default Max Timout is 5s
     , start = new Date().getTime()
     , condition = false
-    , interval = setInterval(function() {
+    , interval = setInterval(function () {
         if ((new Date().getTime() - start < maxtimeOutMillis) && !condition) {
           // If not time-out yet and condition not yet fulfilled
           condition = (typeof(testFx) === "string" ? eval(testFx) : testFx()) //< defensive code
         } else {
-          if(!condition) {
+          if (!condition) {
             // If condition still not fulfilled (timeout but condition is 'false')
             console.log("'waitFor()' timeout")
             phantom.exit(1)
diff --git a/js/tests/pid.txt b/js/tests/pid.txt
new file mode 100644 (file)
index 0000000..129f3d6
--- /dev/null
@@ -0,0 +1 @@
+1520
\ No newline at end of file