summaryrefslogtreecommitdiffstats
path: root/dom/plugins/test/mochitest/test_cocoa_window_focus.html
blob: 3458c24eb9c1ba1796aefc735364c5a758e55ba8 (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
<html>
<head>
  <title>NPCocoaEventWindowFocusChanged Tests</title>
  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  <script type="application/javascript" src="plugin-utils.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>

<body onload="runTests()">
  <script class="testbody" type="application/javascript">
    SimpleTest.waitForExplicitFinish();
    setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);

    var gOtherWindow;

    function runTests() {
      // We have to have two top-level windows in play in order to run these tests.
      gOtherWindow = window.open("cocoa_window_focus.html", "", "width=200,height=200");
    }

    function testsFinished() {
      // Tests have finished running, close the new window and end tests.
      gOtherWindow.close();
      SimpleTest.finish();
    }
  </script>
</body>
</html>