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

Side by Side Diff: third_party/WebKit/LayoutTests/resources/testharness.js

Issue 1962003002: Import web-platform-tests@41d6911b288a9624c249a406b9bf51607a2dd04d (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Skip submit-entity-body.html Created 4 years, 7 months 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
« no previous file with comments | « third_party/WebKit/LayoutTests/imported/web-platform-tests/web-animations/animation/playbackRate.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /*global self*/ 1 /*global self*/
2 /*jshint latedef: nofunc*/ 2 /*jshint latedef: nofunc*/
3 /* 3 /*
4 Distributed under both the W3C Test Suite License [1] and the W3C 4 Distributed under both the W3C Test Suite License [1] and the W3C
5 3-clause BSD License [2]. To contribute to a W3C Test Suite, see the 5 3-clause BSD License [2]. To contribute to a W3C Test Suite, see the
6 policies and contribution forms [3]. 6 policies and contribution forms [3].
7 7
8 [1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license 8 [1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license
9 [2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license 9 [2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license
10 [3] http://www.w3.org/2004/10/27-testcases 10 [3] http://www.w3.org/2004/10/27-testcases
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 function(value) { 533 function(value) {
534 if (value instanceof AssertionError) { 534 if (value instanceof AssertionError) {
535 throw value; 535 throw value;
536 } 536 }
537 assert(false, "promise_test", null, 537 assert(false, "promise_test", null,
538 "Unhandled rejection with value: ${value}", {valu e:value}); 538 "Unhandled rejection with value: ${value}", {valu e:value});
539 })); 539 }));
540 }); 540 });
541 } 541 }
542 542
543 function promise_rejects(test, expected, promise) { 543 function promise_rejects(test, expected, promise, description) {
544 return promise.then(test.unreached_func("Should have rejected.")).catch( function(e) { 544 return promise.then(test.unreached_func("Should have rejected: " + descr iption)).catch(function(e) {
545 assert_throws(expected, function() { throw e }); 545 assert_throws(expected, function() { throw e }, description);
546 }); 546 });
547 } 547 }
548 548
549 /** 549 /**
550 * This constructor helper allows DOM events to be handled using Promises, 550 * This constructor helper allows DOM events to be handled using Promises,
551 * which can make it a lot easier to test a very specific series of events, 551 * which can make it a lot easier to test a very specific series of events,
552 * including ensuring that unexpected events are not fired at any point. 552 * including ensuring that unexpected events are not fired at any point.
553 */ 553 */
554 function EventWatcher(test, watchedNode, eventTypes) 554 function EventWatcher(test, watchedNode, eventTypes)
555 { 555 {
(...skipping 2110 matching lines...) Expand 10 before | Expand all | Expand 10 after
2666 tests.status.status = tests.status.ERROR; 2666 tests.status.status = tests.status.ERROR;
2667 tests.status.message = e.message; 2667 tests.status.message = e.message;
2668 tests.status.stack = e.stack; 2668 tests.status.stack = e.stack;
2669 } 2669 }
2670 }); 2670 });
2671 2671
2672 test_environment.on_tests_ready(); 2672 test_environment.on_tests_ready();
2673 2673
2674 })(); 2674 })();
2675 // vim: set expandtab shiftwidth=4 tabstop=4: 2675 // vim: set expandtab shiftwidth=4 tabstop=4:
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/imported/web-platform-tests/web-animations/animation/playbackRate.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698