Index: LayoutTests/media/W3C/w3cwrapper.js |
diff --git a/LayoutTests/media/W3C/w3cwrapper.js b/LayoutTests/media/W3C/w3cwrapper.js |
index 203c74f077329ee34a1fac1c23fcef200deb28d3..c84c66b1dc0bf57da50a7b9d7903b16e53a7a5e9 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 |
+ // happens after that call has any effect on the test result. |
+ 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 |
} |
} |