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

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

Issue 177613005: Remove the TextTrackCue constructor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix fast/js/constructor-length.html Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
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 assert_throws(new TypeError(), function()
18 assert_true(cue instanceof TextTrackCue); 18 {
19 assert_true(cue instanceof VTTCue); 19 new TextTrackCue(0, 0, "");
20 }, "TextTrackCue constructor returns a VTTCue"); 20 });
21 test(function() 21 }, "TextTrackCue constructor should not be supported");
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");
31 </script> 22 </script>
32 </body> 23 </body>
33 </html> 24 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/js/constructor-length-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