Bug 1253762 - Adapt test_texttrackcue_chrome to work with e10s. r=kinetik
authorRalph Giles <giles@mozilla.com>
Mon, 07 Mar 2016 09:03:16 -0800
changeset 287568 6c22c66781d352e37948c385131af420afd7d3f9
parent 287567 af346b5bd5a6cb4ebf8ce9dc925281ce24be5d67
child 287569 e0ca84de2add8a9a8c5e9920630a8ff7cd3261f1
push id73229
push userrgiles@mozilla.com
push dateWed, 09 Mar 2016 22:32:46 +0000
treeherdermozilla-inbound@a99eb961c111 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskinetik
bugs1253762
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1253762 - Adapt test_texttrackcue_chrome to work with e10s. r=kinetik Use SpecialPowers.wrap() to allow access to privileged attributes of TextTrackCue. MozReview-Commit-ID: BLtZKCW9ypF
dom/media/test/chrome.ini
dom/media/test/mochitest.ini
dom/media/test/test_texttrackcue_chrome.html
dom/media/test/test_texttrackcue_moz.html
--- a/dom/media/test/chrome.ini
+++ b/dom/media/test/chrome.ini
@@ -1,11 +1,10 @@
 #Media chrome tests
 
 [DEFAULT]
 skip-if = buildapp == 'b2g'
 support-files =
   basic.vtt
   seek.webm
 
-[test_texttrackcue_chrome.html]
 skip-if = os=='mac' && debug # bug 1130751
 [test_texttracklist_chrome.html]
--- a/dom/media/test/mochitest.ini
+++ b/dom/media/test/mochitest.ini
@@ -843,16 +843,17 @@ tags=msg capturestream
 [test_streams_individual_pause.html]
 tags=msg
 [test_streams_srcObject.html]
 tags=msg capturestream
 [test_streams_tracks.html]
 tags=msg capturestream
 [test_texttrack.html]
 [test_texttrackcue.html]
+[test_texttrackcue_moz.html]
 [test_texttrackevents_video.html]
 [test_texttracklist.html]
 [test_texttrackregion.html]
 [test_texttrack_moz.html]
 [test_timeupdate_small_files.html]
 skip-if = (toolkit == 'android' && processor == 'x86') #x86 only bug 914439
 [test_trackelementevent.html]
 [test_trackevent.html]
deleted file mode 100644
--- a/dom/media/test/test_texttrackcue_chrome.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=967157
--->
-<head>
-  <meta charset='utf-8'>
-  <title>Test for Bug 967157 - Setting TextTrackCue::DisplayState should set TextTrackCue::HasBeenReset to false</title>
-  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<p id="display"></p>
-<div id="content">
-</div>
-<pre id="test">
-<script class="testbody" type="text/javascript">
-SimpleTest.waitForExplicitFinish();
-
-var cue = new VTTCue(0, 1, "Some text.");
-is(cue.hasBeenReset, false, "Cue's hasBeenReset flag should be false.");
-is(cue.displayState, null, "Cue's displayState should be null.");
-
-cue.startTime = 0.5;
-is(cue.hasBeenReset, true, "Cue's hasBeenReset flag should now be true.");
-
-cue.displayState = document.createElement("div");
-is(cue.hasBeenReset, false, "Cue's hasBeenReset flag should now be false.");
-SimpleTest.finish();
-</script>
new file mode 100644
--- /dev/null
+++ b/dom/media/test/test_texttrackcue_moz.html
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=967157
+-->
+<head>
+  <meta charset='utf-8'>
+  <title>Test for Bug 967157 - Setting TextTrackCue::DisplayState should set TextTrackCue::HasBeenReset to false</title>
+  <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
+  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+</head>
+<body>
+<p id="display"></p>
+<div id="content">
+</div>
+<pre id="test">
+<script class="testbody" type="text/javascript">
+  SimpleTest.waitForExplicitFinish();
+
+  var cue = SpecialPowers.wrap(new VTTCue(0, 1, "Some text."));
+  is(cue.hasBeenReset, false, "Cue's hasBeenReset flag should be false.");
+  is(cue.displayState, null, "Cue's displayState should be null.");
+
+  cue.startTime = 0.5;
+  is(cue.hasBeenReset, true, "Cue's hasBeenReset flag should now be true.");
+
+  cue.displayState = document.createElement("div");
+  is(cue.hasBeenReset, false, "Cue's hasBeenReset flag should now be false.");
+
+  SimpleTest.finish();
+</script>
+</body>
+</html>