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() |