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 |
} |
} |