embedding/test/test_window_open_units.html

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <head>
     4   <title>Test for Bug 594140</title>
     5   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     6   <script type="text/javascript" src="/tests/SimpleTest/WindowSnapshot.js"></script>
     7   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     8 </head>
     9 <body>
    10 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=594140">Mozilla Bug 594140</a>
    11 <p id="display"></p>
    12 </div>
    13 <pre id="test">
    14 <script class="testbody" type="text/javascript">
    15 SimpleTest.waitForExplicitFinish();
    17 SimpleTest.waitForFocus(function() {
    18   SpecialPowers.setFullZoom(window, 2);
    20   var p = window;
    21   var w = window.open("about:blank", "", "width=200,height=100");
    22   SimpleTest.waitForFocus(function() {
    23     ok(w.innerWidth <= 402 && w.innerWidth >= 398,
    24        "width (" + w.innerWidth + ") should be around twice what was requested (200)");
    25     ok(w.innerHeight <= 202 && w.innerHeight >= 198,
    26        "height (" + w.innerHeight + ") should be around twice what was requested (100)");
    28     SpecialPowers.setFullZoom(window, 1);
    29     w.close();
    30     SimpleTest.finish();
    31   }, w, true);
    32 }, window, false);
    34 </script>
    35 </pre>
    36 </body>
    37 </html>

mercurial