diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-02-25 15:07:00 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-02-25 15:07:00 -0500 |
commit | 0ddd00f1959c78ce37c14fef3c83401408fca3bf (patch) | |
tree | d408e02767c86cf8aac3acbb86722b03c77ede6f /toolkit/components/passwordmgr/test/mochitest/test_xhr_2.html | |
parent | 20f0905b33cbb18d1caa80c55e2f552c2e18957b (diff) | |
download | UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.tar UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.tar.gz UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.tar.lz UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.tar.xz UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.zip |
Issue #439 - Remove tests from toolkit/
Diffstat (limited to 'toolkit/components/passwordmgr/test/mochitest/test_xhr_2.html')
-rw-r--r-- | toolkit/components/passwordmgr/test/mochitest/test_xhr_2.html | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/toolkit/components/passwordmgr/test/mochitest/test_xhr_2.html b/toolkit/components/passwordmgr/test/mochitest/test_xhr_2.html deleted file mode 100644 index fa8357792..000000000 --- a/toolkit/components/passwordmgr/test/mochitest/test_xhr_2.html +++ /dev/null @@ -1,55 +0,0 @@ -<!DOCTYPE HTML> -<html> -<!-- -https://bugzilla.mozilla.org/show_bug.cgi?id=654348 ---> -<head> - <meta charset="utf-8"> - <title>Test XHR auth with user and pass arguments</title> - <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> - <script type="text/javascript" src="pwmgr_common.js"></script> - <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> -</head> -<body onload="startTest()"> -<script class="testbody" type="text/javascript"> - -/** - * This test checks we correctly ignore authentication entry - * for a subpath and use creds from the URL when provided when XHR - * is used with filled user name and password. - * - * 1. connect authenticate.sjs that excepts user1:pass1 password - * 2. connect authenticate.sjs that this time expects differentuser2:pass2 password - * we must use the creds that are provided to the xhr witch are different and expected - */ - -function doxhr(URL, user, pass, code, next) { - var xhr = new XMLHttpRequest(); - if (user && pass) - xhr.open("POST", URL, true, user, pass); - else - xhr.open("POST", URL, true); - xhr.onload = function() { - is(xhr.status, code, "expected response code " + code); - next(); - }; - xhr.onerror = function() { - ok(false, "request passed"); - finishTest(); - }; - xhr.send(); -} - -function startTest() { - doxhr("authenticate.sjs?user=dummy&pass=pass1&realm=realm1&formauth=1", "dummy", "dummy", 403, function() { - doxhr("authenticate.sjs?user=dummy&pass=pass1&realm=realm1&formauth=1", "dummy", "pass1", 200, finishTest); - }); -} - -function finishTest() { - SimpleTest.finish(); -} - -</script> -</body> -</html> |