gfx/tests/crashtests/372094-1.xhtml

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.

     1 <html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
     2 <head>
     3 <script>
     4 <![CDATA[
     6 function init()
     7 {
     8   setTimeout(function()
     9   {
    10     targetWindow = window.frames[0];
    11     targetDocument = targetWindow.document;
    12     targetDocument.body.appendChild(targetDocument.importNode(document.getElementById('rootish'), true));
    13     targetDocument.designMode = 'on';
    14     setTimeout(boom, 30);
    15   }, 30); 
    16 }
    18 function boom()
    19 {
    20   var r = targetDocument.createRange();
    21   r.setStart(targetDocument.getElementById("bar"), 0);
    22   r.setEnd(targetDocument.getElementById("baz").firstChild, 0);
    23   targetWindow.getSelection().addRange(r);
    25   targetDocument.execCommand("indent", false, null);
    27   document.documentElement.removeAttribute("class");
    28 }
    30 ]]>
    31 </script>
    32 </head>
    34 <body onload="init()">
    36 <iframe src="data:text/html," style="width: 95%; height: 500px;"/>
    38 <div id="rootish">
    39   <div>Foo</div>
    40   <div id="bar">Bar</div>
    41   <div><select><option id="baz">baz</option></select></div>
    42 </div>
    44 </body>
    45 </html>

mercurial