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/widgets/test_videocontrols_jsdisabled.html | |
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/widgets/test_videocontrols_jsdisabled.html')
-rw-r--r-- | toolkit/content/tests/widgets/test_videocontrols_jsdisabled.html | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/toolkit/content/tests/widgets/test_videocontrols_jsdisabled.html b/toolkit/content/tests/widgets/test_videocontrols_jsdisabled.html deleted file mode 100644 index f57cda063..000000000 --- a/toolkit/content/tests/widgets/test_videocontrols_jsdisabled.html +++ /dev/null @@ -1,70 +0,0 @@ -<!DOCTYPE HTML> -<html> -<head> - <title>Video controls test</title> - <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> - <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script> - <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> -</head> -<body> - -<pre id="test"> -<script class="testbody" type="text/javascript"> - -function runTest(event) { - info(true, "----- test #" + testnum + " -----"); - - switch (testnum) { - case 1: - is(event.type, "timeupdate", "checking event type"); - is(video.paused, false, "checking video play state"); - video.removeEventListener("timeupdate", runTest); - - // Click to toggle play/pause (now pausing) - synthesizeMouseAtCenter(video, {}, win); - break; - - case 2: - is(event.type, "pause", "checking event type"); - is(video.paused, true, "checking video play state"); - win.close(); - - SimpleTest.finish(); - break; - - default: - ok(false, "unexpected test #" + testnum + " w/ event " + event.type); - throw "unexpected test #" + testnum + " w/ event " + event.type; - } - - testnum++; -} - -SpecialPowers.pushPrefEnv({"set": [["javascript.enabled", false]]}, startTest); - -var testnum = 1; - -var video; -function loadevent(event) { - is(win["testExpando"], undefined, "expando shouldn't exist because js is disabled"); - video = win.document.querySelector("video"); - // Other events expected by the test. - video.addEventListener("timeupdate", runTest, false); - video.addEventListener("pause", runTest, false); -} - -var win; -function startTest() { - var videoURL = new URL("seek_with_sound.ogg", document.documentURI).href; - var url = "data:text/html,<video src=" + videoURL + " controls autoplay=true></video><script>window.testExpando = true;</scr" + "ipt>"; - - win = window.open(url); - win.addEventListener("load", loadevent, false); -} - -SimpleTest.waitForExplicitFinish(); - -</script> -</pre> -</body> -</html> |