embedding/test/test_window_open_units.html

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     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