Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=650295
5 -->
6 <head>
7 <meta charset="utf-8">
8 <title>Test for Bug 650295: Web Speech API check all classes are present</title>
9 <script type="application/javascript">
10 window.SimpleTest = parent.SimpleTest;
11 window.info = parent.info;
12 window.is = parent.is;
13 window.isnot = parent.isnot;
14 window.ok = parent.ok;
15 </script>
16 <script type="application/javascript" src="common.js"></script>
17 </head>
18 <body>
19 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=650295">Mozilla Bug 650295</a>
20 <p id="display"></p>
21 <div id="content" style="display: none">
23 </div>
24 <pre id="test">
25 <script type="application/javascript">
27 /** Test for Bug 525444 **/
29 synthAddVoice('TestSpeechServiceWithAudio', 'Male 1', 'en-GB', true);
31 var gotStartEvent = false;
32 var gotBoundaryEvent = false;
33 var utterance = new SpeechSynthesisUtterance("Hello, world!");
34 utterance.addEventListener('start', function(e) {
35 ok(speechSynthesis.speaking, "speechSynthesis is speaking.");
36 ok(!speechSynthesis.pending, "speechSynthesis has no other utterances queued.");
37 gotStartEvent = true;
38 });
40 utterance.addEventListener('end', function(e) {
41 ok(!speechSynthesis.speaking, "speechSynthesis is not speaking.");
42 ok(!speechSynthesis.pending, "speechSynthesis has no other utterances queued.");
43 ok(gotStartEvent, "Got 'start' event.");
44 info('end ' + e.elapsedTime);
45 synthCleanup();
46 SimpleTest.finish();
47 });
49 speechSynthesis.speak(utterance);
50 ok(!speechSynthesis.speaking, "speechSynthesis is not speaking yet.");
51 ok(speechSynthesis.pending, "speechSynthesis has an utterance queued.");
53 </script>
54 </pre>
55 </body>
56 </html>