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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/webvtt/api/VTTRegion/lines.html

Issue 2711183003: Import wpt@a7e9c2abcf65b78fcf1c246fec6681c74e1bc352 (Closed)
Patch Set: Update test expectations and baselines. Created 3 years, 9 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
OLDNEW
(Empty)
1 <!doctype html>
2 <title>VTTRegion.lines</title>
3 <link rel="help" href="https://w3c.github.io/webvtt/#dom-vttregion-lines">
4 <script src=/resources/testharness.js></script>
5 <script src=/resources/testharnessreport.js></script>
6 <div id=log></div>
7 <script>
8 test(function() {
9 var region = new VTTRegion();
10
11 for (var i = 1; i <= 100; i++) {
12 region.lines = i;
13 assert_equals(region.lines, i);
14 }
15
16 // https://heycam.github.io/webidl/#abstract-opdef-converttoint
17 [[0, 0],
18 [-0, 0],
19 [101, 101],
20 [2147483647, 2147483647],
21 [NaN, 0],
22 [Infinity, 0],
23 [-Infinity, 0]].forEach(function (pair) {
24 var input = pair[0];
25 var expected = pair[1];
26 region.lines = input;
27 assert_equals(region.lines, expected);
28 });
29
30 [-1, -100, -2147483648, 2147483648 /* wraps to -2147483648 */].forEach(funct ion (invalid) {
31 assert_throws('IndexSizeError', function() {
32 region.lines = invalid;
33 }, invalid);
34 });
35 }, document.title + ' script-created region');
36 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698