summaryrefslogtreecommitdiffstats
path: root/dom/tests/mochitest/dom-level0/test_innerWidthHeight_script.html
blob: eff351dabb237f86af66d92fd6fdd54d1380ae59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<html>
<head>
  <title>Bug 602580 - Test getting and setting innerWidth and Height after using setCSSViewport</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
  <!--
    This acts funny when run in the normal content frame
    so instead We load it in a separate window.
  -->
</head>
<body onload="startTest()">
  <script class="testbody" type="text/javascript">
  SimpleTest.waitForExplicitFinish();
  var newWin = null;
  function runTest() {
     newWin = window.open("innerWidthHeight_script.html", '_new', 'width=600,height=400');
  }

  function finish() {
    newWin.close();
    SimpleTest.finish();
  }

  function startTest() {
    SpecialPowers.pushPrefEnv({"set": [
      ["dom.disable_window_move_resize", false],
      ["ui.useOverlayScrollbars", 1],
      ["dom.meta-viewport.enabled", true],
      ["dom.window_position_size_properties_replaceable.enabled", false],
    ]}, runTest);
  }
  </script>
</body>
</html>