mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1190083 - Rename mozbrowsermediaplaybackchange to mozbrowseraudioplaybackchange; r=fabrice
This commit is contained in:
parent
1f87b6a550
commit
84b4de4b3f
@ -300,7 +300,7 @@ BrowserElementChild.prototype = {
|
||||
break;
|
||||
case 'media-playback':
|
||||
if (subject === content) {
|
||||
sendAsyncMsg('mediaplaybackchange', { _payload_: data });
|
||||
sendAsyncMsg('audioplaybackchange', { _payload_: data });
|
||||
}
|
||||
break;
|
||||
case 'xpcom-shutdown':
|
||||
|
@ -205,7 +205,7 @@ BrowserElementParent.prototype = {
|
||||
};
|
||||
|
||||
let mmSecuritySensitiveCalls = {
|
||||
"mediaplaybackchange": this._fireEventFromMsg,
|
||||
"audioplaybackchange": this._fireEventFromMsg,
|
||||
"showmodalprompt": this._handleShowModalPrompt,
|
||||
"contextmenu": this._fireCtxMenuEvent,
|
||||
"securitychange": this._fireEventFromMsg,
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* 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');
|
||||
@ -13,7 +13,7 @@ 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() {
|
||||
@ -42,14 +42,14 @@ function runTest() {
|
||||
// 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') {
|
||||
@ -59,9 +59,9 @@ function runTest() {
|
||||
});
|
||||
|
||||
// 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.
|
@ -56,7 +56,7 @@ skip-if = (toolkit == 'gonk' && !debug)
|
||||
[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]
|
||||
|
@ -40,7 +40,7 @@ support-files =
|
||||
browserElement_LoadEvents.js
|
||||
browserElement_Manifestchange.js
|
||||
browserElement_Metachange.js
|
||||
browserElement_MediaPlayback.js
|
||||
browserElement_AudioPlayback.js
|
||||
browserElement_NextPaint.js
|
||||
browserElement_OpenNamed.js
|
||||
browserElement_OpenTab.js
|
||||
@ -144,6 +144,7 @@ skip-if = buildapp == 'b2g'
|
||||
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]
|
||||
@ -180,7 +181,6 @@ skip-if = (toolkit == 'android' && processor == 'x86') #x86 only
|
||||
[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)
|
||||
|
@ -12,7 +12,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1180824
|
||||
<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>
|
@ -12,7 +12,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1180824
|
||||
<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>
|
Loading…
Reference in New Issue
Block a user