Merge m-c to fx-team, a=merge
authorWes Kocher <wkocher@mozilla.com>
Tue, 24 May 2016 11:40:34 -0700
changeset 370491 1508bf3ed15ad8a030ffb86d31a912c86ad9e3e6
parent 370490 a11b2a2868026b88fe75827f19719ade76eca1bd (current diff)
parent 370468 3b664841d774705a5b75d4aac50f524ce966c7fc (diff)
child 370492 87a6b7a4960628f43aab39f76f31deb12f28ceac
push id19081
push userjdescottes@mozilla.com
push dateTue, 24 May 2016 21:46:00 +0000
reviewersmerge
milestone49.0a1
Merge m-c to fx-team, a=merge
--- a/testing/mochitest/server.js
+++ b/testing/mochitest/server.js
@@ -707,17 +707,17 @@ function testListing(metadata, response)
           DIV({class: "clear"}),
           DIV({id: "current-test"},
             B("Currently Executing: ",
               SPAN({id: "current-test-path"}, "_")
             )
           ),
           DIV({class: "clear"}),
           DIV({class: "frameholder"},
-            IFRAME({scrolling: "no", id: "testframe", "allowfullscreen": true})
+            IFRAME({scrolling: "no", id: "testframe"})
           ),
           DIV({class: "clear"}),
           DIV({class: "toggle"},
             A({href: "#", id: "toggleNonTests"}, "Show Non-Tests"),
             BR()
           ),
 
           (
--- a/toolkit/content/tests/widgets/chrome.ini
+++ b/toolkit/content/tests/widgets/chrome.ini
@@ -1,21 +1,24 @@
 [DEFAULT]
 skip-if = buildapp == 'b2g' || os == 'android'
 support-files =
   tree_shared.js
   popup_shared.js
   window_menubar.xul
+  seek_with_sound.ogg
 
 [test_contextmenu_nested.xul]
 skip-if = os == 'linux' # Bug 1116215
 [test_contextmenu_menugroup.xul]
 skip-if = os == 'linux' # Bug 1115088
 [test_editor_currentURI.xul]
 [test_menubar.xul]
 skip-if = os == 'mac'
 [test_popupanchor.xul]
 skip-if = os == 'android'
 [test_popupreflows.xul]
 [test_tree_column_reorder.xul]
 skip-if = toolkit == 'android'
 [test_videocontrols.html]
+skip-if = toolkit == 'android'
+[test_videocontrols.html]
 [test_videocontrols_onclickplay.html]
--- a/toolkit/content/tests/widgets/mochitest.ini
+++ b/toolkit/content/tests/widgets/mochitest.ini
@@ -19,18 +19,16 @@ support-files =
   videocontrols_direction-2d.html
   videocontrols_direction-2e.html
   videocontrols_direction_test.js
   videomask.css
 
 [test_audiocontrols_dimensions.html]
 skip-if = toolkit == 'android'
 [test_mousecapture_area.html]
-[test_videocontrols.html]
-tags = fullscreen
 skip-if = toolkit == 'android' #TIMED_OUT
 [test_videocontrols_audio.html]
 [test_videocontrols_audio_direction.html]
 [test_videocontrols_jsdisabled.html]
 skip-if = toolkit == 'android' # bug 1272646
 [test_videocontrols_standalone.html]
 skip-if = toolkit == 'android' # bug 1075573
 [test_videocontrols_video_direction.html]
--- a/toolkit/content/tests/widgets/test_videocontrols.html
+++ b/toolkit/content/tests/widgets/test_videocontrols.html
@@ -1,15 +1,15 @@
 <!DOCTYPE HTML>
 <html>
 <head>
   <title>Video controls test</title>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+  <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+  <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.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">
   <video width="320" height="240" id="video" controls mozNoDynamicControls preload="auto"></video>
 </div>
 
@@ -24,18 +24,18 @@ const videoWidth = 320;
 const videoHeight = 240;
 const videoDuration = 3.8329999446868896;
 
 const playButtonWidth = 28;
 const playButtonHeight = 28;
 const muteButtonWidth = 33;
 const muteButtonHeight = 28;
 const durationWidth = 34;
-const fullscreenButtonWidth = 28;
-const fullscreenButtonHeight = 28;
+const fullscreenButtonWidth = document.fullscreenEnabled ? 28 : 0;
+const fullscreenButtonHeight = document.fullscreenEnabled ? 28 : 0;
 const volumeSliderWidth = 32;
 const scrubberWidth = videoWidth - playButtonWidth - durationWidth - muteButtonWidth - volumeSliderWidth - fullscreenButtonWidth;
 const scrubberHeight = 28;
 
 // Play button is on the bottom-left
 const playButtonCenterX = 0 + Math.round(playButtonWidth / 2);
 const playButtonCenterY = videoHeight - Math.round(playButtonHeight / 2);
 // Mute button is on the bottom-right before the full screen button and volume slider
@@ -47,24 +47,22 @@ const fullscreenButtonCenterY = videoHei
 // Scrubber bar is between the play and mute buttons. We don't need it's
 // X center, just the offset of its box.
 const scrubberOffsetX = 0 + playButtonWidth;
 const scrubberCenterY = videoHeight - Math.round(scrubberHeight / 2);
 
 var testnum = 1;
 var video = document.getElementById("video");
 
-const domUtil = SpecialPowers.Cc["@mozilla.org/inspector/dom-utils;1"]
-                             .getService(SpecialPowers.Ci.inIDOMUtils);
-
 function getButtonByAttribute(aName, aValue) {
+  var domUtil = Components.classes["@mozilla.org/inspector/dom-utils;1"]
+                          .getService(Components.interfaces.inIDOMUtils);
   var kids = domUtil.getChildrenForNode(video, true);
   var videocontrols = kids[1];
-  return SpecialPowers.wrap(document)
-    .getAnonymousElementByAttribute(videocontrols, aName, aValue);
+  return document.getAnonymousElementByAttribute(videocontrols, aName, aValue);
 }
 
 function isMuteButtonMuted() {
   var muteButton = getButtonByAttribute('class', 'muteButton');
   return muteButton.getAttribute('muted') === 'true';
 }
 
 function isVolumeSliderShowingCorrectVolume(expectedVolume) {