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

Side by Side 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>TextTrackCue constructor</title> 4 <title>TextTrackCue constructor</title>
5 <script src="../../resources/testharness.js"></script> 5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script> 6 <script src="../../resources/testharnessreport.js"></script>
7 </head> 7 </head>
8 <body> 8 <body>
9 <div id="log"></div> 9 <div id="log"></div>
10 <script> 10 <script>
11 test(function() 11 test(function()
12 { 12 {
13 assert_not_equals(TextTrackCue, VTTCue); 13 assert_not_equals(TextTrackCue, VTTCue);
14 }, "TextTrackCue and VTTCue are separate interfaces"); 14 }, "TextTrackCue and VTTCue are separate interfaces");
15 test(function() 15 test(function()
16 { 16 {
17 var cue = new TextTrackCue(0, 0, ""); 17 var cue = new TextTrackCue(0, 0, "");
18 assert_true(cue instanceof TextTrackCue); 18 assert_true(cue instanceof TextTrackCue);
19 assert_true(cue instanceof VTTCue); 19 assert_true(cue instanceof VTTCue);
20 }, "TextTrackCue constructor returns a VTTCue"); 20 }, "TextTrackCue constructor returns a VTTCue");
21 test(function()
22 {
23 try {
24 new TextTrackCue(0);
25 assert_unreached("Expected a TypeError");
26 } catch (e) {
27 assert_true(e instanceof TypeError);
28 assert_equals(e.message, "Failed to construct 'TextTrackCue' : 3 arguments required, but only 1 present.");
29 }
30 }, "When not fully applied, TextTrackCue constructor throws a TypeEr ror");
21 </script> 31 </script>
22 </body> 32 </body>
23 </html> 33 </html>
OLDNEW
« 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