diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2007-01-14 22:36:54 +0000 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2007-01-14 22:36:54 +0000 |
commit | c6a893b68001be9b9389de5e2c5ea58c1a28c742 (patch) | |
tree | 1c7ac6adc3b06db4d3a21022e8b15c50423d12c4 /build | |
parent | cd2bc219810a2837ac77d7f7d35b33d29849fa2b (diff) | |
download | jquery-c6a893b68001be9b9389de5e2c5ea58c1a28c742.tar.gz jquery-c6a893b68001be9b9389de5e2c5ea58c1a28c742.zip |
Updated testsuite: To prevent crashes in Safari, each test waits for 250 milliseconds before running the next
Diffstat (limited to 'build')
-rw-r--r-- | build/test/data/testrunner.js | 16 | ||||
-rw-r--r-- | build/test/index.html | 2 |
2 files changed, 16 insertions, 2 deletions
diff --git a/build/test/data/testrunner.js b/build/test/data/testrunner.js index 0ff0ad500..e73fd671d 100644 --- a/build/test/data/testrunner.js +++ b/build/test/data/testrunner.js @@ -15,6 +15,8 @@ var _config = { $(function() { $('#userAgent').html(navigator.userAgent); + if($.browser.safari) + $("h1").append(" - Slowed down for Safari to prevent crashes"); runTest(); }); @@ -63,9 +65,18 @@ function runTest() { }); } -function test(name, callback) { +function test(name, callback, nowait) { + // safari seems to have some memory problems, so we need to slow it down + if($.browser.safari && !nowait) { + test("", function() { + stop(); + setTimeout(start, 250); + }, true); + } + if(_config.currentModule) name = _config.currentModule + " module: " + name; + synchronize(function() { _config.Test = []; try { @@ -82,6 +93,9 @@ function test(name, callback) { synchronize(function() { reset(); + // don't output pause tests + if(nowait) return; + if(_config.expected && _config.expected != _config.Test.length) { _config.Test.push( [ false, "Expected " + _config.expected + " assertions, but " + _config.Test.length + " were run" ] ); } diff --git a/build/test/index.html b/build/test/index.html index 9718ece6c..ffeb9f9b1 100644 --- a/build/test/index.html +++ b/build/test/index.html @@ -12,7 +12,7 @@ </head> <body id="body"> - <h1>jQuery Test Suite - Core</h1> + <h1>jQuery Test Suite</h1> <h2 id="banner"></h2> <h2 id="userAgent"></h2> |