summaryrefslogtreecommitdiffstats
path: root/toolkit/content/tests/chrome/test_popupremoving_frame.xul
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-02-25 15:07:00 -0500
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 12:55:19 +0200
commiteb70e6e3d0bff11c25f14b1196025791bf2308fb (patch)
tree5ef4ce17db83c74d7b05ec12c8f59e095a6dd5bd /toolkit/content/tests/chrome/test_popupremoving_frame.xul
parent32ead795290b3399d56b4708fc75b77d296f6a1a (diff)
downloadUXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar
UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar.gz
UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar.lz
UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.tar.xz
UXP-eb70e6e3d0bff11c25f14b1196025791bf2308fb.zip
Issue #439 - Remove tests from toolkit/
Diffstat (limited to 'toolkit/content/tests/chrome/test_popupremoving_frame.xul')
-rw-r--r--toolkit/content/tests/chrome/test_popupremoving_frame.xul80
1 files changed, 0 insertions, 80 deletions
diff --git a/toolkit/content/tests/chrome/test_popupremoving_frame.xul b/toolkit/content/tests/chrome/test_popupremoving_frame.xul
deleted file mode 100644
index dec73c7f7..000000000
--- a/toolkit/content/tests/chrome/test_popupremoving_frame.xul
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-
-<window title="Popup Unload Test"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-<!--
- This test checks that popup elements are removed when the document is changed.
- -->
-
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
- <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-
-<iframe id="frame" width="300" height="150" src="frame_popupremoving_frame.xul"/>
-
-<script class="testbody" type="application/javascript">
-<![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-var gMenus = [];
-
-function popupsOpened()
-{
- var framedoc = $("frame").contentDocument;
- framedoc.addEventListener("DOMAttrModified", modified, false);
-
- // this is the order in which the menus should be hidden (reverse of the
- // order they were opened in). The second menu is removed during the
- // mutation listener, so gets the event afterwards.
- gMenus.push(framedoc.getElementById("nestedmenu4"));
- gMenus.push(framedoc.getElementById("nestedmenu2"));
- gMenus.push(framedoc.getElementById("nestedmenu3"));
- gMenus.push(framedoc.getElementById("nestedmenu1"));
- gMenus.push(framedoc.getElementById("separatemenu4"));
- gMenus.push(framedoc.getElementById("separatemenu2"));
- gMenus.push(framedoc.getElementById("separatemenu3"));
- gMenus.push(framedoc.getElementById("separatemenu1"));
-
- framedoc.location = "about:blank";
-}
-
-function modified(event)
-{
- if (event.attrName != "open")
- return;
-
- var framedoc = $("frame").contentDocument;
-
- var tohide = null;
- if (event.target.id == "separatemenu3")
- tohide = framedoc.getElementById("separatemenu2");
- else if (event.target.id == "nestedmenu3")
- tohide = framedoc.getElementById("nestedmenu2");
-
- if (tohide) {
- tohide.hidden = true;
- // force a layout flush
- $("frame").contentDocument.documentElement.boxObject.width;
- }
-
- is(event.target, gMenus.shift(), event.target.id + " hidden");
- if (gMenus.length == 0)
- SimpleTest.finish();
-}
-
-]]>
-</script>
-
-<body xmlns="http://www.w3.org/1999/xhtml">
-<p id="display">
-</p>
-<div id="content" style="display: none">
-</div>
-<pre id="test">
-</pre>
-</body>
-
-</window>