summaryrefslogtreecommitdiff
path: root/dom/html/test/test_mozaudiochannel.html
blob: 722e181bf15467c15c61749bbc69d709f768d980 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE HTML>
<html>
<head>
  <title>Test for mozaudiochannel</title>
  <script type="application/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"/>
</head>
<body>

<pre id="test">
<script type="application/javascript">

SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({"set": [["media.useAudioChannelAPI", true]]}, function() {
  var ifr = document.createElement('iframe');
  ifr.src = 'file_mozaudiochannel.html';
  onmessage = function(e) {
    if ("finish" in e.data) {
      SimpleTest.finish();
    } else {
      ok(e.data.status, e.data.msg);
    }
  }

  document.body.appendChild(ifr);
});
</script>
</pre>
</body>
</html>