Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>Audio controls test</title>
5 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
6 <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
8 </head>
9 <body>
10 <p id="display"></p>
12 <div id="content">
13 <audio id="audio" controls preload="auto"></audio>
14 </div>
16 <pre id="test">
17 <script class="testbody" type="text/javascript">
18 function loadedmetadata(event) {
19 is(event.type, "loadedmetadata", "checking event type");
20 is(audio.clientHeight, "28", "checking height of audio element");
22 SimpleTest.finish();
23 }
25 var audio = document.getElementById("audio");
27 SpecialPowers.pushPrefEnv({"set": [["media.cache_size", 40000]]}, startTest);
28 function startTest() {
29 // Kick off test once audio has loaded.
30 audio.addEventListener("loadedmetadata", loadedmetadata, false);
31 audio.src = "audio.wav";
32 }
34 SimpleTest.waitForExplicitFinish();
35 </script>
36 </pre>
37 </body>
38 </html>