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.

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

mercurial