layout/generic/test/test_bug508115.xul

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

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.

michael@0 1 <?xml version="1.0"?>
michael@0 2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
michael@0 3 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
michael@0 4 <!--
michael@0 5 https://bugzilla.mozilla.org/show_bug.cgi?id=508115
michael@0 6 -->
michael@0 7 <window title="Mozilla Bug 508115"
michael@0 8 onload="setTimeout(doTest, 0)"
michael@0 9 xmlns:html="http://www.w3.org/1999/xhtml"
michael@0 10 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
michael@0 11
michael@0 12 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
michael@0 13 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
michael@0 14 <body xmlns="http://www.w3.org/1999/xhtml">
michael@0 15 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=508115">Mozilla Bug 508115</a>
michael@0 16
michael@0 17 <p id="display"></p>
michael@0 18 <div id="content" style="display: none">
michael@0 19 </div>
michael@0 20 </body>
michael@0 21 <script class="testbody" type="application/javascript"><![CDATA[
michael@0 22 function doTest() {
michael@0 23 document.getElementById("panel").style.display = '';
michael@0 24 document.getElementById("deck").selectedIndex = 1;
michael@0 25 document.getElementById("anchor").open = true;
michael@0 26 document.getElementById("container").style.width = "0";
michael@0 27 document.getElementById("anchor2").open = true;
michael@0 28 }
michael@0 29 var count = 0;
michael@0 30 function shown(id) {
michael@0 31 ok(true, "Shown popup " + id);
michael@0 32 ++count;
michael@0 33 if (count >= 2) {
michael@0 34 SimpleTest.finish();
michael@0 35 }
michael@0 36 }
michael@0 37 SimpleTest.waitForExplicitFinish();
michael@0 38 ]]></script>
michael@0 39 <deck id="deck" style="margin:50px;">
michael@0 40 <vbox></vbox>
michael@0 41 <vbox id="panel" style="display:none">
michael@0 42 <vbox>
michael@0 43 <menulist id="anchor">
michael@0 44 <menupopup id="popup" onpopupshown="shown('anchor')">
michael@0 45 <menuitem label="One"/>
michael@0 46 <menuitem label="Two"/>
michael@0 47 <menuitem label="Three"/>
michael@0 48 </menupopup>
michael@0 49 </menulist>
michael@0 50 </vbox>
michael@0 51 </vbox>
michael@0 52 </deck>
michael@0 53 <description>
michael@0 54 <html:div id="container">
michael@0 55 <html:span id="span" style="-moz-transform: translate(0,0)">Hello Kitty
michael@0 56 <menulist id="anchor2" style="display:-moz-inline-box;">
michael@0 57 <menupopup id="popup" onpopupshown="shown('anchor2')">
michael@0 58 <menuitem label="One"/>
michael@0 59 <menuitem label="Two"/>
michael@0 60 <menuitem label="Three"/>
michael@0 61 </menupopup>
michael@0 62 </menulist>
michael@0 63 </html:span>
michael@0 64 </html:div>
michael@0 65 </description>
michael@0 66 </window>

mercurial