toolkit/components/windowwatcher/test/test_dialog_arguments.html
author Myk Melez <myk@mykzilla.org>
Tue, 10 Jan 2017 10:34:38 -0800
changeset 376493 58c050e010a596a5cbb419472714d2d68b8906c2
parent 341039 embedding/components/windowwatcher/test/test_dialog_arguments.html@14e071360b24812c8a9107ae7adbba47e75f28b4
child 393926 a072d7934ff7c6fd2ad974d7abc0b08d11041aca
permissions -rw-r--r--
Bug 1309049 - move embedding/ files out of that directory, r=jst,mossop

<!DOCTYPE HTML>
<html>
<!--
Test that arguments can be passed to dialogs.
-->
<head>
  <meta charset="utf-8">
  <title>Test a modal window</title>

  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">

  <script type="application/javascript;version=1.8">
  const {utils: Cu, interfaces: Ci} = Components;

  Cu.import("resource://gre/modules/Services.jsm");

  const TEST_ITEM = Symbol("test-item");

  function done(returnedItem) {
    is(returnedItem, TEST_ITEM,
       "Dialog should have received test item");
    win.close();
    SimpleTest.finish();
  }

  SimpleTest.waitForExplicitFinish();
  let win = window.openDialog("file_test_dialog.html", "_blank", "width=100,height=100", TEST_ITEM);
  </script>
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
</pre>
</body>
</html>