layout/generic/test/test_plugin_focus.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 <html title="Test plugin focus control">
     2 <head>
     3   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     4   <script type="text/javascript" src="enableTestPlugin.js"></script>
     5   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     6 </head>
     7 <body>
     9 <script class="testbody" type="application/javascript">
    11 var child;
    12 function childDone() {
    13   child.close();
    14   // This test has a history of focus issues, but waiting for focus to return
    15   // from the child window instead of attempting to reclaim it after finish
    16   // seems to prevent some kind of race on win8 (Bug 874843)
    17   SimpleTest.waitForFocus(SimpleTest.finish, window);
    18 }
    20 SimpleTest.waitForExplicitFinish();
    21 child = window.open("plugin_focus_helper.html", "", "width=620,height=320");
    22 </script>
    24 </body>
    25 </html>

mercurial