This repository has been archived by the owner on Nov 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33450 from evanxd/bug-1227825
Bug 1227825 - Marionette tests for audio channels compete each other r=lchang
- Loading branch information
Showing
6 changed files
with
786 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Audio Channel Test App</title> | ||
<style> | ||
html, body { | ||
width: 100%; | ||
height: 100%; | ||
overflow: hidden; | ||
} | ||
</style> | ||
<script defer src="/js/index.js"></script> | ||
</head> | ||
<body> | ||
<div id="normal"> | ||
<span>Normal</span> | ||
<button class="play">Play</button> | ||
<button class="pause">Pause</button> | ||
<div/> | ||
<div id="content"> | ||
<span>Content</span> | ||
<button class="play">Play</button> | ||
<button class="pause">Pause</button> | ||
<div/> | ||
<div id="alarm"> | ||
<span>Alarm</span> | ||
<button class="play">Play</button> | ||
<button class="pause">Pause</button> | ||
<div/> | ||
<div id="system"> | ||
<span>System</span> | ||
<button class="play">Play</button> | ||
<button class="pause">Pause</button> | ||
<div/> | ||
<div id="ringer"> | ||
<span>Ringer</span> | ||
<button class="play">Play</button> | ||
<button class="pause">Pause</button> | ||
<div/> | ||
<div id="telephony"> | ||
<span>Telephony</span> | ||
<button class="play">Play</button> | ||
<button class="pause">Pause</button> | ||
<div/> | ||
<div id="notification"> | ||
<span>Notification</span> | ||
<button class="play">Play</button> | ||
<button class="pause">Pause</button> | ||
<div/> | ||
<div id="publicnotification"> | ||
<span>Public Notification</span> | ||
<button class="play">Play</button> | ||
<button class="pause">Pause</button> | ||
<div/> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
'use strict'; | ||
(function() { | ||
['normal', 'content', 'alarm', 'system', 'ringer', | ||
'telephony', 'notification', 'publicnotification'].forEach(function(type){ | ||
var play = document.querySelector('#' + type + ' .play'); | ||
var pause = document.querySelector('#' + type + ' .pause'); | ||
var audio = new Audio(); | ||
|
||
audio.src = 'audio/b2g.ogg'; | ||
audio.loop = true; | ||
audio.mozAudioChannelType = type; | ||
|
||
play.addEventListener('click', function() { | ||
audio.play(); | ||
}); | ||
|
||
pause.addEventListener('click', function() { | ||
audio.pause(); | ||
}); | ||
}); | ||
}()); |
19 changes: 19 additions & 0 deletions
19
apps/system/test/apps/audio_channel_test_app/manifest.webapp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "Audio Channel Test App", | ||
"type": "certified", | ||
"description": "Audio Channel Test App", | ||
"launch_path": "/index.html", | ||
"developer": { | ||
"name": "The Gaia Team", | ||
"url": "https://github.com/mozilla-b2g/gaia" | ||
}, | ||
"permissions": { | ||
"audio-channel-content": {}, | ||
"audio-channel-alarm": {}, | ||
"audio-channel-system": {}, | ||
"audio-channel-ringer": {}, | ||
"audio-channel-telephony": {}, | ||
"audio-channel-notification": {}, | ||
"audio-channel-publicnotification": {} | ||
} | ||
} |
Oops, something went wrong.