editor/reftests/969773.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   <meta charset="utf-8">
     5   <title>Contenteditable Selection Test Case</title>
     6   <script>
     7     function runTests() {
     8       var editable = document.getElementById("editable");
     9       var text = document.getElementById("text");
    11       editable.focus();
    13       setTimeout(function () {
    14         editable.setAttribute("contenteditable", "false");
    15         text.focus();
    16         setTimeout(function () {
    17           document.body.offsetHeight;
    18           document.documentElement.removeAttribute('class');
    19         }, 0);
    20       }, 0);
    21     }
    22     document.addEventListener('MozReftestInvalidate', runTests, false);
    23   </script>
    24 </head>
    25 <body>
    26     <div id="editable" contenteditable="true" tabindex="0" spellcheck="false">This is a contenteditable.</div>
    27     <div id="text" tabindex="0">This is focusable text</div>
    28 </body>
    29 </html>

mercurial