Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Side by Side Diff: third_party/WebKit/LayoutTests/resources/js-test.js

Issue 2503673002: Revert "Raise timeouts on smooth scroll layout tests". (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // js-test now supports lazily printing test results which dumps all test 1 // js-test now supports lazily printing test results which dumps all test
2 // results once at the end of the test instead of building them up. To enable 2 // results once at the end of the test instead of building them up. To enable
3 // this option, call setPrintTestResultsLazily() before running any tests. 3 // this option, call setPrintTestResultsLazily() before running any tests.
4 var _lazyTestResults; // Set by setPrintTestResultsLazily(). 4 var _lazyTestResults; // Set by setPrintTestResultsLazily().
5 var _lazyDescription; // Set by description() after setPrintTestResultsLazily(). 5 var _lazyDescription; // Set by description() after setPrintTestResultsLazily().
6 6
7 // svg/dynamic-updates tests set enablePixelTesting=true, as we want to dump tex t + pixel results 7 // svg/dynamic-updates tests set enablePixelTesting=true, as we want to dump tex t + pixel results
8 if (self.testRunner) { 8 if (self.testRunner) {
9 if (self.enablePixelTesting) 9 if (self.enablePixelTesting)
10 testRunner.dumpAsTextWithPixelResults(); 10 testRunner.dumpAsTextWithPixelResults();
11 else 11 else
12 testRunner.dumpAsText(); 12 testRunner.dumpAsText();
13 } 13 }
14 14
15 var isJsTest = true; 15 var isJsTest = true;
16 16
17 var description, debug, successfullyParsed, getOrCreateTestElement; 17 var description, debug, successfullyParsed, getOrCreateTestElement;
18
18 var expectingError; // set by shouldHaveError() 19 var expectingError; // set by shouldHaveError()
19 var expectedErrorMessage; // set by onerror when expectingError is true 20 var expectedErrorMessage; // set by onerror when expectingError is true
20 var unexpectedErrorMessage; // set by onerror when expectingError is not true 21 var unexpectedErrorMessage; // set by onerror when expectingError is not true
21 var defaultTimeoutForShouldBecome = self.defaultTimeoutForShouldBecome || 500;
22 22
23 (function() { 23 (function() {
24 24
25 getOrCreateTestElement = function(id, tagName) 25 getOrCreateTestElement = function(id, tagName)
26 { 26 {
27 var element = document.getElementById(id); 27 var element = document.getElementById(id);
28 if (element) 28 if (element)
29 return element; 29 return element;
30 30
31 element = document.createElement(tagName); 31 element = document.createElement(tagName);
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 }); 273 });
274 } 274 }
275 } 275 }
276 276
277 function shouldBecomeEqual(_a, _b, _completionHandler, _timeout) 277 function shouldBecomeEqual(_a, _b, _completionHandler, _timeout)
278 { 278 {
279 if (typeof _a != "string" || typeof _b != "string") 279 if (typeof _a != "string" || typeof _b != "string")
280 debug("WARN: shouldBecomeEqual() expects string arguments"); 280 debug("WARN: shouldBecomeEqual() expects string arguments");
281 281
282 if (_timeout === undefined) 282 if (_timeout === undefined)
283 _timeout = defaultTimeoutForShouldBecome; 283 _timeout = 500;
284 284
285 var _bv; 285 var _bv;
286 var _condition = function() { 286 var _condition = function() {
287 var _exception; 287 var _exception;
288 var _av; 288 var _av;
289 try { 289 try {
290 _av = eval(_a); 290 _av = eval(_a);
291 } catch (e) { 291 } catch (e) {
292 _exception = e; 292 _exception = e;
293 } 293 }
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 } 406 }
407 } else 407 } else
408 testFailed(_a + " should not be " + _bv + "."); 408 testFailed(_a + " should not be " + _bv + ".");
409 } 409 }
410 410
411 function shouldBecomeDifferent(_a, _b, _completionHandler, _timeout) 411 function shouldBecomeDifferent(_a, _b, _completionHandler, _timeout)
412 { 412 {
413 if (typeof _a != "string" || typeof _b != "string") 413 if (typeof _a != "string" || typeof _b != "string")
414 debug("WARN: shouldBecomeDifferent() expects string arguments"); 414 debug("WARN: shouldBecomeDifferent() expects string arguments");
415 if (_timeout === undefined) 415 if (_timeout === undefined)
416 _timeout = defaultTimeoutForShouldBecome; 416 _timeout = 500;
417 417
418 var _bv; 418 var _bv;
419 var _condition = function() { 419 var _condition = function() {
420 var _exception; 420 var _exception;
421 var _av; 421 var _av;
422 try { 422 try {
423 _av = eval(_a); 423 _av = eval(_a);
424 } catch (e) { 424 } catch (e) {
425 _exception = e; 425 _exception = e;
426 } 426 }
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 testPassed = function(msg) { 903 testPassed = function(msg) {
904 workerPort.postMessage('PASS:' + msg); 904 workerPort.postMessage('PASS:' + msg);
905 }; 905 };
906 finishJSTest = function() { 906 finishJSTest = function() {
907 workerPort.postMessage('DONE:'); 907 workerPort.postMessage('DONE:');
908 }; 908 };
909 debug = function(msg) { 909 debug = function(msg) {
910 workerPort.postMessage(msg); 910 workerPort.postMessage(msg);
911 }; 911 };
912 } 912 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698