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

Unified Diff: LayoutTests/media/W3C/w3cwrapper.js

Issue 205893003: Make w3cwrapper.js's done() match the semantics in testharness.js (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/W3C/w3cwrapper.js
diff --git a/LayoutTests/media/W3C/w3cwrapper.js b/LayoutTests/media/W3C/w3cwrapper.js
index 203c74f077329ee34a1fac1c23fcef200deb28d3..bee0129cfbba100f33eab6ac55ecfd739f081325 100644
--- a/LayoutTests/media/W3C/w3cwrapper.js
+++ b/LayoutTests/media/W3C/w3cwrapper.js
@@ -7,7 +7,7 @@ function getAudioURI(dummy) {
return "../../../content/test.wav";
}
-function testStep(testFunction){
+function testStep(testFunction) {
try {
testFunction();
} catch (e) {
@@ -15,6 +15,15 @@ function testStep(testFunction){
}
}
+function testDone() {
+ // match the semantics of testharness.js done(), where nothing that
ddorwin 2014/03/20 17:25:03 nit: Match
philipj_slow 2014/03/21 03:00:52 Done.
+ // happens after that call has any effect on the test result.
ddorwin 2014/03/20 17:25:03 Does this mean that W3C tests assume the test term
philipj_slow 2014/03/21 03:00:52 It means that assertions or exceptions after t.don
+ if (!window.wasFinishJSTestCalled) {
+ finishJSTest();
+ assert_equals = assert_true = assert_false = function() { };
+ }
+}
+
function test(testFunction) {
description(document.title);
testStep(testFunction);
@@ -25,7 +34,7 @@ function async_test(title, options) {
description(title);
return {
step: testStep,
- done: finishJSTest
+ done: testDone
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698