editor/reftests/input-text-onfocus-reframe.html

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 <!DOCTYPE HTML>
     2 <html class="reftest-wait">
     3 <head>
     4 	<title>bug 536421</title>
     5 	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     6 </head>
     7 <body onload="doTest()">
     8   <input value="test" id="textbox" onfocus="triggerBug();" type="text">
     9   <script type="text/javascript">
    10     function finishTest()
    11     {
    12       document.documentElement.removeAttribute("class");
    13     }
    14     function triggerBug()
    15     {
    16       var t = document.getElementById("textbox");
    17       t.style.display = "none";
    18       document.body.offsetWidth;
    19       t.style.display = "";
    20       finishTest();
    21     }
    22     function doTest()
    23     {
    24       var t = document.getElementById("textbox");
    25       t.focus();
    26     }
    27   </script>
    28 </body>
    29 </html>

mercurial