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

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: Match 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..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
}
}
« 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