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

Unified Diff: LayoutTests/media/video-test.js

Issue 224833002: Implement DataCue interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove text attribute Created 6 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/media/video-test.js
diff --git a/LayoutTests/media/video-test.js b/LayoutTests/media/video-test.js
index e558c1db9a90094ddbfc71a27856c090e750edfb..8c7888869f8011431a39949155bf25f5f2800208 100644
--- a/LayoutTests/media/video-test.js
+++ b/LayoutTests/media/video-test.js
@@ -88,6 +88,7 @@ function testExpected(testFuncString, expected, comparison)
case '!=': success = observed != expected; break;
case '==': success = observed == expected; break;
case '===': success = observed === expected; break;
+ case 'instanceof': success = observed instanceof expected; break;
}
reportExpected(success, testFuncString, comparison, expected, observed)
@@ -216,7 +217,7 @@ function testDOMException(testString, exceptionString)
var exception = ex;
}
logResult(exception instanceof DOMException && exception.code === eval(exceptionString),
- "TEST(" + testString + ") THROWS(" + exceptionString + ": " + exception.message + ")");
+ "TEST(" + testString + ") THROWS(" + exceptionString + ": " + (exception ? exception.message : undefined) + ")");
}
function testException(testString, exceptionString) {
@@ -229,6 +230,16 @@ function testException(testString, exceptionString) {
"TEST(" + testString + ") THROWS(" + exceptionString + ")");
}
+function testExceptionType(testString, exceptionTypeString) {
+ try {
+ eval(testString);
+ } catch (ex) {
+ var exception = ex;
+ }
+ logResult(exception instanceof eval(exceptionTypeString),
+ "TEST(" + testString + ") THROWS(" + exceptionTypeString + ")");
+}
+
var testEnded = false;
function endTest()
« no previous file with comments | « LayoutTests/media/track/track-datacue-expected.txt ('k') | Source/bindings/v8/custom/V8TextTrackCueCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698