From 1be5d873b0143c3be28c7994505521acf406f7d0 Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Thu, 13 Mar 2014 11:42:23 -0400 Subject: [PATCH] Backed out changeset 2b3efd1687ec for landing with the wrong bug number. --- content/media/test/basic.vtt | 8 +++----- content/media/test/test_texttrackcue.html | 15 --------------- content/media/test/test_texttrackregion.html | 13 ++++++++++--- 3 files changed, 13 insertions(+), 23 deletions(-) diff --git a/content/media/test/basic.vtt b/content/media/test/basic.vtt index 7781790d04b..8859d056595 100644 --- a/content/media/test/basic.vtt +++ b/content/media/test/basic.vtt @@ -1,17 +1,15 @@ WEBVTT -Region: id=testOne lines=2 width=30% -Region: id=testTwo lines=4 width=20% 1 -00:00.500 --> 00:00.700 region:testOne +00:00.500 --> 00:00.700 This 2 -00:01.200 --> 00:02.400 region:testTwo +00:01.200 --> 00:02.400 Is 2.5 -00:02.000 --> 00:03.500 region:testOne +00:02.000 --> 00:03.500 (Over here?!) 3 diff --git a/content/media/test/test_texttrackcue.html b/content/media/test/test_texttrackcue.html index 0652ef6956a..bd428d1781f 100644 --- a/content/media/test/test_texttrackcue.html +++ b/content/media/test/test_texttrackcue.html @@ -182,21 +182,6 @@ SpecialPowers.pushPrefEnv({"set": [["media.webvtt.enabled", true]]}, trackElement.track.mode = "showing"; video.currentTime = 0; - var regionInfo = [ - { lines: 2, width: 30 }, - { lines: 4, width: 20 }, - { lines: 2, width: 30 } - ]; - - for (var i = 0; i < regionInfo.length; i++) { - var cue = cueList[i]; - isnot(cue.region, null, "Cue at " + i + " should have a region."); - for (var key in regionInfo[i]) { - is(cue.region[key], regionInfo[i][key], "Region should have a " + key + - " property with a value of " + regionInfo[i][key]) - } - } - // Test TextTrack::ActiveCues. var cueInfo = [ { startTime: 0.51, endTime: 0.71, ids: ["Cue 01"] }, diff --git a/content/media/test/test_texttrackregion.html b/content/media/test/test_texttrackregion.html index 04f4d582a91..7cc5045b617 100644 --- a/content/media/test/test_texttrackregion.html +++ b/content/media/test/test_texttrackregion.html @@ -36,11 +36,17 @@ SpecialPowers.pushPrefEnv({"set": [["media.webvtt.enabled", true]]}, } is(trackElement.readyState, 2, "Track::ReadyState should be set to LOADED."); - var cues = trackElement.track.cues; + var cues = trackElement.track.cues, + regions = trackElement.track.regions; + + is(regions.length, 1, "Region list length should be 1."); is(cues.length, 1, "Cue list length should be 1."); - var region = cues[0].region; - isnot(region, null, "Region should not be null."); + is(cues[0].regionId, "fred", "Cue regionId should be 'fred'."); + + var region = regions[0]; + + is(region.id, "fred", "Region ID should be 'fred'."); is(region.width, 62, "Region width should be 50."); is(region.lines, 5, "Region lines should be 5."); is(region.regionAnchorX, 4, "Region regionAnchorX should be 4."); @@ -48,6 +54,7 @@ SpecialPowers.pushPrefEnv({"set": [["media.webvtt.enabled", true]]}, is(region.viewportAnchorX, 10, "Region viewportAnchorX should be 10."); is(region.viewportAnchorY, 90, "Region viewportAnchorY should be 90."); is(region.scroll, "up", "Region scroll should be 'up'"); + is(region.track, trackElement.track, "Tracks should be equal."); SimpleTest.finish(); });