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

Side by Side Diff: LayoutTests/media/track/regions-webvtt/text-track-region-parser.html

Issue 55653003: Rename TextTrackRegion/TextTrackRegionList to VTTRegion/VTTRegionList (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update test expectations Created 7 years, 1 month 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 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
6 <script src=../../media-file.js></script>
7 <script src=../../video-test.js></script>
8 <script>
9 var region;
10
11 function startTest()
12 {
13 if (!window.TextTrackRegion) {
14 failTest();
15 return;
16 }
17
18 findMediaElement();
19 testExpected("video.textTracks[0].regions.length", 5);
20
21 consoleWrite("");
22 region = video.textTracks[0].regions[0];
23 testExpected("region.id", "region_without_settings");
24
25 consoleWrite("");
26 region = video.textTracks[0].regions[1];
27 testExpected("region.id", "region_with_all_settings");
28 testExpected("region.width", 32);
29 testExpected("region.height", 5);
30 testExpected("region.regionAnchorX", 41);
31 testExpected("region.regionAnchorY", 20);
32 testExpected("region.viewportAnchorX", 31);
33 testExpected("region.viewportAnchorY", 84);
34 testExpected("region.scroll", "up");
35
36 consoleWrite("");
37 region = video.textTracks[0].regions[2];
38 testExpected("region.id", "region_floating_point_anchor");
39 testExpected("Math.round(region.regionAnchorX * 1000)", 41133);
40 testExpected("Math.round(region.regionAnchorY * 1000)", 20420);
41 testExpected("Math.round(region.viewportAnchorX * 1000)", 32330);
42 testExpected("Math.round(region.viewportAnchorY * 1000)", 32440);
43
44 consoleWrite("");
45 region = video.textTracks[0].regions[3];
46 testExpected("region.id", "not_unique_id");
47 testExpected("region.width", 67);
48
49 consoleWrite("");
50 region = video.textTracks[0].regions[4];
51 testExpected("region.id", "");
52
53 consoleWrite("");
54 endTest();
55 }
56
57 </script>
58 </head>
59 <body>
60 <p>Tests proper parsing of various regions present in WebVTT header area .</p>
61 <video controls>
62 <track src="../captions-webvtt/header-regions.vtt" kind="captions" d efault onload="startTest()">
63 </video>
64
65 </body>
66 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698