summaryrefslogtreecommitdiffstats
path: root/toolkit/components/prompts/test/test_dom_prompts.html
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/components/prompts/test/test_dom_prompts.html
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/components/prompts/test/test_dom_prompts.html')
-rw-r--r--toolkit/components/prompts/test/test_dom_prompts.html208
1 files changed, 0 insertions, 208 deletions
diff --git a/toolkit/components/prompts/test/test_dom_prompts.html b/toolkit/components/prompts/test/test_dom_prompts.html
deleted file mode 100644
index 413ed8fd5..000000000
--- a/toolkit/components/prompts/test/test_dom_prompts.html
+++ /dev/null
@@ -1,208 +0,0 @@
-<html>
-<head>
- <title>Test for DOM prompts</title>
- <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
- <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
- <script type="text/javascript" src="prompt_common.js"></script>
- <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<pre id="test">
-</pre>
-
-<script class="testbody" type="text/javascript">
-var rv;
-var state, action;
-
-add_task(function* test_alert_ok() {
- info("Starting test: Alert");
- state = {
- msg : "This is the alert text.",
- iconClass : "alert-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "button0",
- defButton : "button0",
- };
- action = {
- buttonClick: "ok",
- };
-
- promptDone = handlePrompt(state, action);
-
- alert("This is the alert text.");
-
- yield promptDone;
-});
-
-// bug 861605 made the arguments to alert/confirm optional (prompt already was).
-add_task(function* test_alert_noargs() {
- info("Starting test: Alert with no args");
- state = {
- msg : "",
- iconClass : "alert-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "button0",
- defButton : "button0",
- };
- action = {
- buttonClick: "ok",
- };
-
- promptDone = handlePrompt(state, action);
-
- try {
- alert();
- ok(true, "alert() without arguments should not throw!");
- } catch (e) {
- ok(false, "alert() without arguments should not throw!");
- }
-
- yield promptDone;
-});
-
-
-add_task(function* test_confirm_ok() {
- info("Starting test: Confirm");
- state = {
- msg : "This is the confirm text.",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "button0",
- defButton : "button0",
- };
- action = {
- buttonClick: "ok",
- };
-
- promptDone = handlePrompt(state, action);
-
- rv = confirm("This is the confirm text.");
- is(rv, true, "check prompt return value");
-
- yield promptDone;
-});
-
-// bug 861605 made the arguments to alert/confirm optional (prompt already was).
-add_task(function* test_confirm_noargs() {
- info("Starting test: Confirm with no args");
- state = {
- msg : "",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : true,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "button0",
- defButton : "button0",
- };
- action = {
- buttonClick: "ok",
- };
-
- promptDone = handlePrompt(state, action);
-
- try {
- rv = confirm();
- ok(true, "confirm() without arguments should not throw!");
- } catch (e) {
- ok(false, "confirm() without arguments should not throw!");
- }
- is(rv, true, "check prompt return value");
-
- yield promptDone;
-});
-
-
-add_task(function* test_prompt_ok() {
- info("Starting test: Prompt");
- state = {
- msg : "This is the Prompt text.",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick: "ok",
- };
-
- promptDone = handlePrompt(state, action);
-
- rv = prompt("This is the Prompt text.");
- is(rv, "", "check prompt return value");
-
- yield promptDone;
-});
-
-// bug 861605 made the arguments to alert/confirm optional (prompt already was).
-add_task(function* test_prompt_noargs() {
- info("Starting test: Prompt with no args");
- state = {
- msg : "",
- iconClass : "question-icon",
- titleHidden : true,
- textHidden : false,
- passHidden : true,
- checkHidden : true,
- textValue : "",
- passValue : "",
- checkMsg : "",
- checked : false,
- focused : "textField",
- defButton : "button0",
- };
- action = {
- buttonClick: "ok",
- };
-
- promptDone = handlePrompt(state, action);
-
- try {
- rv = prompt();
- ok(true, "prompt() without arguments should not throw!");
- } catch (e) {
- ok(false, "prompt() without arguments should not throw!");
- }
- is(rv, "", "check prompt return value");
-
- yield promptDone;
-});
-
-</script>
-
-</body>
-</html>