Bug 1190083 - Rename mozbrowsermediaplaybackchange to mozbrowseraudioplaybackchange; r=fabrice
authorEhsan Akhgari <ehsan@mozilla.com>
Sat, 01 Aug 2015 11:48:52 -0400
changeset 256205 f032c7478c12bef0d343d3c8546ea368471a99b5
parent 256204 1d7026c52dbba3c0c89df3a81e3059052a128682
child 256206 13c1bf72e32fc040a70e7df79c97207c7bba61b5
push id63256
push usereakhgari@mozilla.com
push dateTue, 04 Aug 2015 22:32:01 +0000
treeherdermozilla-inbound@f032c7478c12 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfabrice
bugs1190083
milestone42.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 1190083 - Rename mozbrowsermediaplaybackchange to mozbrowseraudioplaybackchange; r=fabrice
dom/browser-element/BrowserElementChildPreload.js
dom/browser-element/BrowserElementParent.js
dom/browser-element/mochitest/browserElement_AudioPlayback.js
dom/browser-element/mochitest/browserElement_MediaPlayback.js
dom/browser-element/mochitest/mochitest-oop.ini
dom/browser-element/mochitest/mochitest.ini
dom/browser-element/mochitest/test_browserElement_inproc_AudioPlayback.html
dom/browser-element/mochitest/test_browserElement_inproc_MediaPlayback.html
dom/browser-element/mochitest/test_browserElement_oop_AudioPlayback.html
dom/browser-element/mochitest/test_browserElement_oop_MediaPlayback.html
--- a/dom/browser-element/BrowserElementChildPreload.js
+++ b/dom/browser-element/BrowserElementChildPreload.js
@@ -295,17 +295,17 @@ BrowserElementChild.prototype = {
     if (topic == 'activity-done' && docShell !== subject)
       return;
     switch (topic) {
       case 'activity-done':
         sendAsyncMsg('activitydone', { success: (data == 'activity-success') });
         break;
       case 'media-playback':
         if (subject === content) {
-          sendAsyncMsg('mediaplaybackchange', { _payload_: data });
+          sendAsyncMsg('audioplaybackchange', { _payload_: data });
         }
         break;
       case 'xpcom-shutdown':
         this._shuttingDown = true;
         break;
       case 'invalid-widget':
         sendAsyncMsg('error', { type: 'invalid-widget' });
         break;
--- a/dom/browser-element/BrowserElementParent.js
+++ b/dom/browser-element/BrowserElementParent.js
@@ -200,17 +200,17 @@ BrowserElementParent.prototype = {
       "got-audio-channel-volume": this._gotDOMRequestResult,
       "got-set-audio-channel-volume": this._gotDOMRequestResult,
       "got-audio-channel-muted": this._gotDOMRequestResult,
       "got-set-audio-channel-muted": this._gotDOMRequestResult,
       "got-is-audio-channel-active": this._gotDOMRequestResult
     };
 
     let mmSecuritySensitiveCalls = {
-      "mediaplaybackchange": this._fireEventFromMsg,
+      "audioplaybackchange": this._fireEventFromMsg,
       "showmodalprompt": this._handleShowModalPrompt,
       "contextmenu": this._fireCtxMenuEvent,
       "securitychange": this._fireEventFromMsg,
       "locationchange": this._fireEventFromMsg,
       "iconchange": this._fireEventFromMsg,
       "scrollareachanged": this._fireEventFromMsg,
       "titlechange": this._fireProfiledEventFromMsg,
       "opensearch": this._fireEventFromMsg,
rename from dom/browser-element/mochitest/browserElement_MediaPlayback.js
rename to dom/browser-element/mochitest/browserElement_AudioPlayback.js
--- a/dom/browser-element/mochitest/browserElement_MediaPlayback.js
+++ b/dom/browser-element/mochitest/browserElement_AudioPlayback.js
@@ -1,24 +1,24 @@
 /* Any copyright is dedicated to the public domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
-// Test the mozbrowsermediaplaybackchange event is fired correctly.
+// Test the mozbrowseraudioplaybackchange event is fired correctly.
 'use strict';
 
 const { Services } = SpecialPowers.Cu.import('resource://gre/modules/Services.jsm');
 
 SimpleTest.waitForExplicitFinish();
 browserElementTestHelpers.setEnabledPref(true);
 browserElementTestHelpers.addPermission();
 
 /**
  * Content script passed to the child iframe
  */
-function playMediaScript() {
+function playAudioScript() {
   var audio = new content.Audio();
   content.document.body.appendChild(audio);
   audio.oncanplay = function() {
     audio.play();
   };
   audio.src = 'audio.ogg';
 }
 
@@ -37,36 +37,36 @@ function runTest() {
 
   let iframe = createFrame();
   let iframe2 = createFrame();
 
   // When the first iframe is finished loading inject a script to create
   // an audio element and play it.
   iframe.addEventListener('mozbrowserloadend', () => {
     let mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
-    mm.loadFrameScript('data:,(' + playMediaScript.toString() + ')();', false);
+    mm.loadFrameScript('data:,(' + playAudioScript.toString() + ')();', false);
   });
 
   // Two events should come in, when the audio starts, and stops playing.
   // The first one should have a detail of 'active' and the second one
   // should have a detail of 'inactive'.
   let expectedNextData = 'active';
-  iframe.addEventListener('mozbrowsermediaplaybackchange', (e) => {
+  iframe.addEventListener('mozbrowseraudioplaybackchange', (e) => {
     is(e.detail, expectedNextData, 'Audio detail should be correct')
     is(e.target, iframe, 'event target should be the first iframe')
     if (e.detail === 'inactive') {
       SimpleTest.finish();
     }
     expectedNextData = 'inactive';
   });
 
   // Make sure an event only goes to the first iframe.
-  iframe2.addEventListener('mozbrowsermediaplaybackchange', (e) => {
+  iframe2.addEventListener('mozbrowseraudioplaybackchange', (e) => {
     ok(false,
-       'mozbrowsermediaplaybackchange should dispatch to the correct browser');
+       'mozbrowseraudioplaybackchange should dispatch to the correct browser');
   });
 
   // Load a simple page to get the process started.
   iframe.src = browserElementTestHelpers.emptyPage1;
 }
 
 addEventListener('testready', () => {
   // Audio channel service is needed for events
--- a/dom/browser-element/mochitest/mochitest-oop.ini
+++ b/dom/browser-element/mochitest/mochitest-oop.ini
@@ -51,17 +51,17 @@ skip-if = (toolkit == 'gonk' && !debug)
 [test_browserElement_oop_FrameWrongURI.html]
 skip-if = (toolkit == 'gonk' && !debug)
 [test_browserElement_oop_GetScreenshot.html]
 [test_browserElement_oop_GetScreenshotDppx.html]
 [test_browserElement_oop_Iconchange.html]
 [test_browserElement_oop_LoadEvents.html]
 [test_browserElement_oop_Manifestchange.html]
 [test_browserElement_oop_Metachange.html]
-[test_browserElement_oop_MediaPlayback.html]
+[test_browserElement_oop_AudioPlayback.html]
 [test_browserElement_oop_OpenMixedProcess.html]
 skip-if = (toolkit == 'gonk' && !debug)
 [test_browserElement_oop_OpenNamed.html]
 skip-if = (toolkit == 'gonk' && !debug)
 [test_browserElement_oop_OpenWindow.html]
 skip-if = (toolkit == 'gonk' && !debug)
 [test_browserElement_oop_OpenWindowDifferentOrigin.html]
 skip-if = (toolkit == 'gonk' && !debug)
--- a/dom/browser-element/mochitest/mochitest.ini
+++ b/dom/browser-element/mochitest/mochitest.ini
@@ -35,17 +35,17 @@ support-files =
   browserElement_ForwardName.js
   browserElement_FrameWrongURI.js
   browserElement_GetScreenshot.js
   browserElement_GetScreenshotDppx.js
   browserElement_Iconchange.js
   browserElement_LoadEvents.js
   browserElement_Manifestchange.js
   browserElement_Metachange.js
-  browserElement_MediaPlayback.js
+  browserElement_AudioPlayback.js
   browserElement_NextPaint.js
   browserElement_OpenNamed.js
   browserElement_OpenTab.js
   browserElement_OpenWindow.js
   browserElement_OpenWindowDifferentOrigin.js
   browserElement_OpenWindowInFrame.js
   browserElement_OpenWindowRejected.js
   browserElement_Opensearch.js
@@ -139,16 +139,17 @@ support-files =
 [test_browserElement_inproc_Viewmode.html]
 [test_browserElement_inproc_ThemeColor.html]
 skip-if = buildapp == 'b2g'
 [test_browserElement_inproc_AlertInFrame.html]
 [test_browserElement_inproc_AppFramePermission.html]
 skip-if = toolkit == 'android' || buildapp == 'b2g'
 [test_browserElement_inproc_AppWindowNamespace.html]
 skip-if = toolkit == 'android' || buildapp == 'b2g' # android(TIMED_OUT, bug 783509) androidx86(TIMED_OUT, bug 783509)
+[test_browserElement_inproc_AudioPlayback.html]
 [test_browserElement_inproc_Auth.html]
 skip-if = buildapp == 'b2g'
 [test_browserElement_inproc_BackForward.html]
 [test_browserElement_inproc_BadScreenshot.html]
 [test_browserElement_inproc_BrowserWindowNamespace.html]
 skip-if = buildapp == 'b2g'
 [test_browserElement_inproc_BrowserWindowResize.html]
 [test_browserElement_inproc_Close.html]
@@ -175,17 +176,16 @@ disabled = bug 1022281
 skip-if = (toolkit == 'gonk' && !debug)
 [test_browserElement_inproc_GetScreenshot.html]
 skip-if = (toolkit == 'android' && processor == 'x86') #x86 only
 [test_browserElement_inproc_GetScreenshotDppx.html]
 [test_browserElement_inproc_Iconchange.html]
 [test_browserElement_inproc_LoadEvents.html]
 [test_browserElement_inproc_Manifestchange.html]
 [test_browserElement_inproc_Metachange.html]
-[test_browserElement_inproc_MediaPlayback.html]
 [test_browserElement_inproc_NextPaint.html]
 [test_browserElement_inproc_OpenNamed.html]
 skip-if = (toolkit == 'gonk' && !debug)
 [test_browserElement_inproc_OpenTab.html]
 disabled = won't work as Firefox desktop will intercept ctrl-click
 [test_browserElement_inproc_OpenWindow.html]
 skip-if = (toolkit == 'gonk' && !debug)
 [test_browserElement_inproc_OpenWindowDifferentOrigin.html]
rename from dom/browser-element/mochitest/test_browserElement_oop_MediaPlayback.html
rename to dom/browser-element/mochitest/test_browserElement_inproc_AudioPlayback.html
--- a/dom/browser-element/mochitest/test_browserElement_oop_MediaPlayback.html
+++ b/dom/browser-element/mochitest/test_browserElement_inproc_AudioPlayback.html
@@ -7,12 +7,12 @@ https://bugzilla.mozilla.org/show_bug.cg
   <title>Test for Bug 1180824</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <script type="application/javascript" src="browserElementTestHelpers.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1180824">Mozilla Bug 1180824</a>
 
-<script type="application/javascript;version=1.7" src="browserElement_MediaPlayback.js">
+<script type="application/javascript;version=1.7" src="browserElement_AudioPlayback.js">
 </script>
 </body>
 </html>
rename from dom/browser-element/mochitest/test_browserElement_inproc_MediaPlayback.html
rename to dom/browser-element/mochitest/test_browserElement_oop_AudioPlayback.html
--- a/dom/browser-element/mochitest/test_browserElement_inproc_MediaPlayback.html
+++ b/dom/browser-element/mochitest/test_browserElement_oop_AudioPlayback.html
@@ -7,12 +7,12 @@ https://bugzilla.mozilla.org/show_bug.cg
   <title>Test for Bug 1180824</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <script type="application/javascript" src="browserElementTestHelpers.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1180824">Mozilla Bug 1180824</a>
 
-<script type="application/javascript;version=1.7" src="browserElement_MediaPlayback.js">
+<script type="application/javascript;version=1.7" src="browserElement_AudioPlayback.js">
 </script>
 </body>
 </html>