embedding/test/test_window_open_units.html
author Boris Zbarsky <bzbarsky@mit.edu>
Tue, 27 Sep 2011 13:19:35 -0400
changeset 79058 7f486771722691f933575b1dcf85fa72b6a07e42
parent 75087 1188456710819d4606e74396be333ead9fe63261
child 82404 bd5c3df1ca3356c05a5cbbfa6f5456c433a3f535
permissions -rw-r--r--
Version bump to 10.0a1 on CLOSED TREE

<!DOCTYPE HTML>
<html>
<head>
  <title>Test for Bug 594140</title>
  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  <script type="text/javascript" src="/tests/SimpleTest/WindowSnapshot.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=594140">Mozilla Bug 594140</a>
<p id="display"></p>
</div>
<pre id="test">
<script class="testbody" type="text/javascript">
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var viewer =
  window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
               .getInterface(Components.interfaces.nsIWebNavigation)
               .QueryInterface(Components.interfaces.nsIDocShell)
               .contentViewer
               .QueryInterface(Components.interfaces.nsIMarkupDocumentViewer);
viewer.fullZoom = 2;

var w = window.open("about:blank", "", "width=200,height=100");
is(w.innerWidth, 400, "wrong width");
is(w.innerHeight, 200, "wrong height");
w.close();

viewer.fullZoom = 1;

</script>
</pre>
</body>
</html>