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=492925
5 -->
6 <head>
7 <title>Test for Bug 492925</title>
8 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
10 <style>
11 @media tv, print {
12 #div2 {
13 overflow: hidden;
14 }
15 }
16 </style>
17 </head>
18 <body>
19 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=492925">Mozilla Bug 492925</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 492925 **/
29 var sheet = document.styleSheets[1];
30 var rule = sheet.cssRules[0];
31 var media = rule.media;
33 is(media.mediaText, "tv, print", "Unexpected media string");
34 is(media[0], "tv", "[0] should be 'tv'");
35 is(media[1], "print", "[1] should be 'print'");
36 is(media.item(0), "tv", ".item(0) should be 'tv'");
37 is(media.item(1), "print", ".item(1) should be 'print'");
42 </script>
43 </pre>
44 </body>
45 </html>