| Index: third_party/WebKit/LayoutTests/media/track/track-webvtt-tc006-cue-identifiers.html
|
| diff --git a/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc006-cue-identifiers.html b/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc006-cue-identifiers.html
|
| index 3ff51f34e17b321f5026bbc41fe034ce523b60e5..2fcb3d8bbda5f9ccb82ec4fa3aaf13f273a9e8f1 100644
|
| --- a/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc006-cue-identifiers.html
|
| +++ b/third_party/WebKit/LayoutTests/media/track/track-webvtt-tc006-cue-identifiers.html
|
| @@ -1,77 +1,27 @@
|
| <!DOCTYPE html>
|
| -<html>
|
| - <head>
|
| - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
| -
|
| - <script src=../media-file.js></script>
|
| - <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956
|
| - (Please avoid writing new tests using video-test.js) -->
|
| - <script src=../video-test.js></script>
|
| - <script>
|
| -
|
| - numberOfTrackTests = 2;
|
| -
|
| - function trackLoaded()
|
| - {
|
| - numberOfTracksLoaded++;
|
| - if (numberOfTracksLoaded == numberOfTrackTests) {
|
| - testTrack0();
|
| - testTrack1();
|
| - }
|
| - }
|
| -
|
| - function testTrack0()
|
| - {
|
| - findMediaElement();
|
| -
|
| - var expected =
|
| - {
|
| - length : 4,
|
| - tests:
|
| - [
|
| - {
|
| - property : "id",
|
| - values : ["random_id", "another random identifier", "identifier--too", "identifier--too"],
|
| - },
|
| - {
|
| - property : "startTime",
|
| - values : [0.0, 31.0, 61.0, 121.0],
|
| - },
|
| - {
|
| - property : "endTime",
|
| - values : [30.5, 60.5, 120.5, 180.5],
|
| - },
|
| - {
|
| - property : "text",
|
| - values : ["Bear is Coming!!!!!", "I said Bear is coming!!!!", "I said Bear is coming now!!!!", "Duplicate identifier"],
|
| - },
|
| - ],
|
| - };
|
| - testCues(0, expected);
|
| -
|
| - allTestsEnded();
|
| - }
|
| -
|
| - function testTrack1()
|
| - {
|
| - findMediaElement();
|
| - var expected =
|
| - {
|
| - length : 0,
|
| - tests:
|
| - [],
|
| - };
|
| - testCues(1, expected);
|
| -
|
| - allTestsEnded();
|
| - }
|
| - </script>
|
| - </head>
|
| - <body onload="enableAllTextTracks()">
|
| - <p>Tests that any text other than "-->" is recognized as optional cue identifier.</p>
|
| - <video>
|
| - <track src="captions-webvtt/tc006-cue-id.vtt" onload="trackLoaded()">
|
| - <track src="captions-webvtt/tc006-cue-id-error.vtt" onload="trackLoaded()">
|
| - </video>
|
| - </body>
|
| -</html>
|
| +<title>Tests that any text other than "-->" is recognized as optional cue identifier.</title>
|
| +<script src="track-helpers.js"></script>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script>
|
| +check_cues_from_track("captions-webvtt/tc006-cue-id.vtt", function(track) {
|
| + var expected = [
|
| + { id: "random_id", startTime: 0, endTime: 30.5, text: "Bear is Coming!!!!!" },
|
| + { id: "another random identifier", startTime: 31, endTime: 60.5, text: "I said Bear is coming!!!!" },
|
| + { id: "identifier--too", startTime: 61, endTime: 120.5, text: "I said Bear is coming now!!!!" },
|
| + { id: "identifier--too", startTime: 121, endTime: 180.5, text: "Duplicate identifier" }
|
| + ];
|
| +
|
| + assert_cues_match(track.cues, expected);
|
| +});
|
| +
|
| +check_cues_from_track("captions-webvtt/tc006-cue-id-error.vtt", function(track) {
|
| + var expected = [
|
| + { id: "", startTime: 0, endTime: 30.5, text: "Bear is Coming!!!!!" },
|
| + { id: "", startTime: 31, endTime: 60.5, text: "I said Bear is coming!!!!" },
|
| + { id: "", startTime: 61, endTime: 1200.5, text: "I said Bear is coming now!!!!" }
|
| + ];
|
| +
|
| + assert_cues_match(track.cues, expected);
|
| +});
|
| +</script>
|
|
|