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

Unified Diff: LayoutTests/media/track/text-track-cue-constructor.html

Issue 98783003: Make HTMLOptionsCollection report TypeErrors. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add TextTrackCue() exception handling test Created 7 years 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/track/text-track-cue-constructor.html
diff --git a/LayoutTests/media/track/text-track-cue-constructor.html b/LayoutTests/media/track/text-track-cue-constructor.html
index 2a74a10389f4fb5e1a566f0e859d909d0938cb1a..87f9408ebcccdb660be73e3de9f9cfc498360f10 100644
--- a/LayoutTests/media/track/text-track-cue-constructor.html
+++ b/LayoutTests/media/track/text-track-cue-constructor.html
@@ -18,6 +18,16 @@
assert_true(cue instanceof TextTrackCue);
assert_true(cue instanceof VTTCue);
}, "TextTrackCue constructor returns a VTTCue");
+ test(function()
+ {
+ try {
+ new TextTrackCue(0);
+ assert_unreached("Expected a TypeError");
+ } catch (e) {
+ assert_true(e instanceof TypeError);
+ assert_equals(e.message, "Failed to construct 'TextTrackCue': 3 arguments required, but only 1 present.");
+ }
+ }, "When not fully applied, TextTrackCue constructor throws a TypeError");
</script>
</body>
</html>
« no previous file with comments | « LayoutTests/fast/js/select-options-add-expected.txt ('k') | LayoutTests/media/track/text-track-cue-constructor-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698