diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /dom/browser-element/mochitest/file_browserElement_AudioChannel_nested.html | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/browser-element/mochitest/file_browserElement_AudioChannel_nested.html')
-rw-r--r-- | dom/browser-element/mochitest/file_browserElement_AudioChannel_nested.html | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/dom/browser-element/mochitest/file_browserElement_AudioChannel_nested.html b/dom/browser-element/mochitest/file_browserElement_AudioChannel_nested.html new file mode 100644 index 000000000..c37a642e2 --- /dev/null +++ b/dom/browser-element/mochitest/file_browserElement_AudioChannel_nested.html @@ -0,0 +1,63 @@ +<html> +<head> +<script type="text/javascript"> + + function ok(a, msg) { + alert((!!a ? "OK" : "KO") + " " + msg); + } + + function is(a, b, msg) { + ok(a === b, msg); + } + + function finish(a, b, msg) { + alert("DONE"); + } + + addEventListener('load', function(e) { + var iframe = document.createElement('iframe'); + iframe.setAttribute('mozbrowser', 'true'); + // set 'remote' to true here will make the the iframe remote in _inproc_ + // test and in-process in _oop_ test. + iframe.setAttribute('remote', 'true'); + iframe.setAttribute('mozapp', 'http://example.org/manifest.webapp'); + + iframe.addEventListener('mozbrowserloadend', function(e) { + ok("mute" in iframe, "iframe.mute exists"); + ok("unmute" in iframe, "iframe.unmute exists"); + ok("getMuted" in iframe, "iframe.getMuted exists"); + ok("getVolume" in iframe, "iframe.getVolume exists"); + ok("setVolume" in iframe, "iframe.setVolume exists"); + + ok("allowedAudioChannels" in iframe, "allowedAudioChannels exist"); + var channels = iframe.allowedAudioChannels; + is(channels.length, 9, "9 audio channel by default"); + + var ac = channels[0]; + + ok(ac instanceof BrowserElementAudioChannel, "Correct class"); + ok("getVolume" in ac, "ac.getVolume exists"); + ok("setVolume" in ac, "ac.setVolume exists"); + ok("getMuted" in ac, "ac.getMuted exists"); + ok("setMuted" in ac, "ac.setMuted exists"); + ok("isActive" in ac, "ac.isActive exists"); + + ac.onactivestatechanged = function() { + ok(true, "activestatechanged event received."); + + ac.getVolume().onsuccess = function(e) { + ok(e.target.result, 1, "Default volume is 1"); + }; + + finish(); + } + }); + + document.body.appendChild(iframe); + iframe.src = 'chrome://mochitests/content/chrome/dom/browser-element/mochitest/file_audio.html'; + }); +</script> +</head> +<body> +</body> +</html> |