CLOSED TREE: TraceMonkey merge head. (a=blockers)
[mozilla-central.git] / embedding / test / test_window_open_units.html
blobcb9482aff0dbb69ad036b5f448c176010a3f04c0
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>Test for Bug 594140</title>
5 <script type="text/javascript" src="/MochiKit/packed.js"></script>
6 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
7 <script type="text/javascript" src="/tests/SimpleTest/WindowSnapshot.js"></script>
8 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
9 </head>
10 <body>
11 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=594140">Mozilla Bug 594140</a>
12 <p id="display"></p>
13 </div>
14 <pre id="test">
15 <script class="testbody" type="text/javascript">
16 netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
17 var viewer =
18 window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
19 .getInterface(Components.interfaces.nsIWebNavigation)
20 .QueryInterface(Components.interfaces.nsIDocShell)
21 .contentViewer
22 .QueryInterface(Components.interfaces.nsIMarkupDocumentViewer);
23 viewer.fullZoom = 2;
25 var w = window.open("about:blank", "", "width=200,height=100");
26 is(w.innerWidth, 400, "wrong width");
27 is(w.innerHeight, 200, "wrong height");
28 w.close();
30 viewer.fullZoom = 1;
32 </script>
33 </pre>
34 </body>
35 </html>