Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / media / track / vtt-cue-exceptions.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4     <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7     <script>
8         description("Verify that VTTCue exceptions are properly messaged to developers.");
9
10         var cue = new VTTCue(0, 0, "Test.");
11
12         function testPercentage(property) {
13             shouldThrow("cue." + property + " = -1;");
14             shouldThrow("cue." + property + " = 101;");
15         }
16
17         cue.snapToLines = false;
18         testPercentage("line");
19
20         testPercentage("position");
21         testPercentage("size");
22     </script>
23 </body>
24 </html>