diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-02-25 15:07:00 -0500 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-14 12:55:19 +0200 |
commit | eb70e6e3d0bff11c25f14b1196025791bf2308fb (patch) | |
tree | 5ef4ce17db83c74d7b05ec12c8f59e095a6dd5bd /toolkit/content/tests/chrome/window_cursorsnap_dialog.xul | |
parent | 32ead795290b3399d56b4708fc75b77d296f6a1a (diff) | |
download | UXP-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/window_cursorsnap_dialog.xul')
-rw-r--r-- | toolkit/content/tests/chrome/window_cursorsnap_dialog.xul | 104 |
1 files changed, 0 insertions, 104 deletions
diff --git a/toolkit/content/tests/chrome/window_cursorsnap_dialog.xul b/toolkit/content/tests/chrome/window_cursorsnap_dialog.xul deleted file mode 100644 index df6f0bf02..000000000 --- a/toolkit/content/tests/chrome/window_cursorsnap_dialog.xul +++ /dev/null @@ -1,104 +0,0 @@ -<?xml version="1.0"?> -<?xml-stylesheet href="chrome://global/skin" type="text/css"?> -<dialog title="Cursor snapping test" id="dialog" - width="600" height="600" - onload="onload();" - onunload="onunload();" - buttons="accept,cancel" - xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> - -<script class="testbody" type="application/javascript"> -<![CDATA[ - -function ok(aCondition, aMessage) -{ - window.opener.wrappedJSObject.SimpleTest.ok(aCondition, aMessage); -} - -function is(aLeft, aRight, aMessage) -{ - window.opener.wrappedJSObject.SimpleTest.is(aLeft, aRight, aMessage); -} - -function isnot(aLeft, aRight, aMessage) -{ - window.opener.wrappedJSObject.SimpleTest.isnot(aLeft, aRight, aMessage); -} - -function canRetryTest() -{ - return window.opener.wrappedJSObject.canRetryTest(); -} - -function getTimeoutTime() -{ - return window.opener.wrappedJSObject.getTimeoutTime(); -} - -var gTimer; -var gRetry; - -function finishByTimeout() -{ - var button = document.getElementById("dialog").getButton("accept"); - if (button.disabled) - ok(true, "cursor is NOT snapped to the disabled button (dialog)"); - else if (button.hidden) - ok(true, "cursor is NOT snapped to the hidden button (dialog)"); - else { - if (!canRetryTest()) { - ok(false, "cursor is NOT snapped to the default button (dialog)"); - } else { - // otherwise, this may be unexpected timeout, we should retry the test. - gRetry = true; - } - } - finish(); -} - -function finish() -{ - window.close(); -} - -function onMouseMove(aEvent) -{ - var button = document.getElementById("dialog").getButton("accept"); - if (button.disabled) - ok(false, "cursor IS snapped to the disabled button (dialog)"); - else if (button.hidden) - ok(false, "cursor IS snapped to the hidden button (dialog)"); - else - ok(true, "cursor IS snapped to the default button (dialog)"); - clearTimeout(gTimer); - finish(); -} - -function onload() -{ - var button = document.getElementById("dialog").getButton("accept"); - button.addEventListener("mousemove", onMouseMove, false); - - if (window.opener.wrappedJSObject.gDisable) { - button.disabled = true; - } - if (window.opener.wrappedJSObject.gHidden) { - button.hidden = true; - } - gRetry = false; - gTimer = setTimeout(finishByTimeout, getTimeoutTime()); -} - -function onunload() -{ - if (gRetry) { - window.opener.wrappedJSObject.retryCurrentTest(); - } else { - window.opener.wrappedJSObject.runNextTest(); - } -} - -]]> -</script> - -</dialog> |