Bug 1296800 - Output test numbers in test_prompt.html. r=Dolske

MozReview-Commit-ID: GaZMCUlThGW

--HG--
extra : rebase_source : 8948ea9ece26738b8971b16a10b3dc7deca80388
This commit is contained in:
Matthew Noorenberghe 2016-08-19 17:24:47 -07:00
Родитель 6fc5868042
Коммит e4a4c5cb94
1 изменённых файлов: 37 добавлений и 37 удалений

Просмотреть файл

@ -312,7 +312,7 @@ add_task(function* runTests() {
var popupNotifications = getPopupNotifications(window.top);
ok(popupNotifications, "Got popupNotifications");
// ===== test 1 =====
info("===== test 1 =====");
state = {
msg : "the message",
title : "the title",
@ -340,7 +340,7 @@ add_task(function* runTests() {
ok(isOk, "Checking dialog return value (accept)");
is(result.value, "xyz", "Checking prompt() returned value");
// ===== test 2 =====
info("===== test 2 =====");
state = {
msg : "the message",
title : "the title",
@ -365,7 +365,7 @@ add_task(function* runTests() {
yield promptDone;
ok(!isOk, "Checking dialog return value (cancel)");
// ===== test 10 =====
info("===== test 10 =====");
// Default password provided, existing logins are ignored.
state = {
msg : "the message",
@ -394,7 +394,7 @@ add_task(function* runTests() {
ok(isOk, "Checking dialog return value (accept)");
is(pword.value, "secret", "Checking returned password");
// ===== test 11 =====
info("===== test 11 =====");
// Default password provided, existing logins are ignored.
state = {
msg : "the message",
@ -421,7 +421,7 @@ add_task(function* runTests() {
yield promptDone;
ok(!isOk, "Checking dialog return value (cancel)");
// ===== test 12 =====
info("===== test 12 =====");
// No default password provided, realm does not match existing login.
state = {
msg : "the message",
@ -450,7 +450,7 @@ add_task(function* runTests() {
ok(isOk, "Checking dialog return value (accept)");
is(pword.value, "secret", "Checking returned password");
// ===== test 13 =====
info("===== test 13 =====");
// No default password provided, matching login is returned w/o prompting.
pword.value = null;
isOk = prompter1.promptPassword(defaultTitle, defaultMsg, "http://example.com",
@ -458,7 +458,7 @@ add_task(function* runTests() {
ok(isOk, "Checking dialog return value (accept)");
is(pword.value, "examplepass", "Checking returned password");
// ===== test 14 =====
info("===== test 14 =====");
// No default password provided, none of the logins from this host are
// password-only so the user is prompted.
state = {
@ -488,7 +488,7 @@ add_task(function* runTests() {
ok(isOk, "Checking dialog return value (accept)");
is(pword.value, "secret", "Checking returned password");
// ===== test 15 =====
info("===== test 15 =====");
// No default password provided, matching login is returned w/o prompting.
pword.value = null;
isOk = prompter1.promptPassword(defaultTitle, defaultMsg, "http://user1name@example2.com",
@ -496,7 +496,7 @@ add_task(function* runTests() {
ok(isOk, "Checking dialog return value (accept)");
is(pword.value, "user1pass", "Checking returned password");
// ===== test 16 =====
info("===== test 16 =====");
// No default password provided, matching login is returned w/o prompting.
pword.value = null;
isOk = prompter1.promptPassword(defaultTitle, defaultMsg, "http://user2name@example2.com",
@ -504,7 +504,7 @@ add_task(function* runTests() {
ok(isOk, "Checking dialog return value (accept)");
is(pword.value, "user2pass", "Checking returned password");
// ===== test 17 =====
info("===== test 17 =====");
// No default password provided, matching login is returned w/o prompting.
pword.value = null;
isOk = prompter1.promptPassword(defaultTitle, defaultMsg, "http://user3%2Ename%40host@example2.com",
@ -512,7 +512,7 @@ add_task(function* runTests() {
ok(isOk, "Checking dialog return value (accept)");
is(pword.value, "user3pass", "Checking returned password");
// ===== test 18 =====
info("===== test 18 =====");
// No default password provided, matching login is returned w/o prompting.
pword.value = null;
isOk = prompter1.promptPassword(defaultTitle, defaultMsg, "http://100@beef@example2.com",
@ -520,7 +520,7 @@ add_task(function* runTests() {
ok(isOk, "Checking dialog return value (accept)");
is(pword.value, "user3pass", "Checking returned password");
// ===== test 19 =====
info("===== test 19 =====");
// No default password provided, matching login is returned w/o prompting.
pword.value = null;
isOk = prompter1.promptPassword(defaultTitle, defaultMsg, "http://100%25beef@example2.com",
@ -530,7 +530,7 @@ add_task(function* runTests() {
// XXX test saving a password with Ci.nsIAuthPrompt.SAVE_PASSWORD_PERMANENTLY
// ===== test 30 =====
info("===== test 30 =====");
// We don't pre-fill or save for NS_GetAuthKey-generated realms, but we should still prompt
state = {
msg : "the message",
@ -559,7 +559,7 @@ add_task(function* runTests() {
ok(isOk, "Checking dialog return value (accept)");
is(pword.value, "fill2pass", "Checking returned password");
// ===== test 31 =====
info("===== test 31 =====");
// We don't pre-fill or save for NS_GetAuthKey-generated realms, but we should still prompt
state = {
msg : "the message",
@ -588,7 +588,7 @@ add_task(function* runTests() {
ok(isOk, "Checking dialog return value (accept)");
is(pword.value, "fill2pass", "Checking returned password");
// ===== test 100 =====
info("===== test 100 =====");
state = {
msg : "the message",
title : "the title",
@ -619,7 +619,7 @@ add_task(function* runTests() {
is(uname.value, "outuser", "Checking returned username");
is(pword.value, "outpass", "Checking returned password");
// ===== test 101 =====
info("===== test 101 =====");
state = {
msg : "the message",
title : "the title",
@ -646,7 +646,7 @@ add_task(function* runTests() {
yield promptDone;
ok(!isOk, "Checking dialog return value (cancel)");
// ===== test 102 =====
info("===== test 102 =====");
// test filling in existing password-only login
state = {
msg : "the message",
@ -676,7 +676,7 @@ add_task(function* runTests() {
is(uname.value, "", "Checking returned username");
is(pword.value, "examplepass", "Checking returned password");
// ===== test 103 =====
info("===== test 103 =====");
// test filling in existing login (undetermined from multiple selection)
// user2name/user2pass would also be valid to fill here.
state = {
@ -707,7 +707,7 @@ add_task(function* runTests() {
ok(uname.value == "user1name" || uname.value == "user2name", "Checking returned username");
ok(pword.value == "user1pass" || uname.value == "user2pass", "Checking returned password");
// ===== test 104 =====
info("===== test 104 =====");
// test filling in existing login (user1 from multiple selection)
state = {
msg : "the message",
@ -737,7 +737,7 @@ add_task(function* runTests() {
is(uname.value, "user1name", "Checking returned username");
is(pword.value, "user1pass", "Checking returned password");
// ===== test 105 =====
info("===== test 105 =====");
// test filling in existing login (user2 from multiple selection)
state = {
msg : "the message",
@ -767,7 +767,7 @@ add_task(function* runTests() {
is(uname.value, "user2name", "Checking returned username");
is(pword.value, "user2pass", "Checking returned password");
// ===== test 106 =====
info("===== test 106 =====");
// test changing password
state = {
msg : "the message",
@ -798,7 +798,7 @@ add_task(function* runTests() {
is(uname.value, "user2name", "Checking returned username");
is(pword.value, "NEWuser2pass", "Checking returned password");
// ===== test 107 =====
info("===== test 107 =====");
// test changing password (back to original value)
state = {
msg : "the message",
@ -829,7 +829,7 @@ add_task(function* runTests() {
is(uname.value, "user2name", "Checking returned username");
is(pword.value, "user2pass", "Checking returned password");
// ===== test 120 =====
info("===== test 120 =====");
// We don't pre-fill or save for NS_GetAuthKey-generated realms, but we should still prompt
state = {
msg : "the message",
@ -861,7 +861,7 @@ add_task(function* runTests() {
is(uname.value, "fill2user", "Checking returned username");
is(pword.value, "fill2pass", "Checking returned password");
// ===== test 121 =====
info("===== test 121 =====");
// We don't pre-fill or save for NS_GetAuthKey-generated realms, but we should still prompt
state = {
msg : "the message",
@ -914,7 +914,7 @@ add_task(function* runTests() {
var level = Ci.nsIAuthPrompt2.LEVEL_NONE;
// ===== test 500 =====
info("===== test 500 =====");
state = {
msg : "http://example.com is requesting your username and password.\n\nThe site says: “some realm”",
title : "Authentication Required",
@ -947,7 +947,7 @@ add_task(function* runTests() {
is(authinfo.username, "outuser", "Checking returned username");
is(authinfo.password, "outpass", "Checking returned password");
// ===== test 501 =====
info("===== test 501 =====");
state = {
msg : "http://example.com is requesting your username and password.\n\nThe site says: “some realm”",
title : "Authentication Required",
@ -972,7 +972,7 @@ add_task(function* runTests() {
ok(!isOk, "Checking dialog return value (cancel)");
// ===== test 502 =====
info("===== test 502 =====");
// test filling in password-only login
state = {
msg : "http://example.com is requesting your username and password.\n\nThe site says: “http://example.com”",
@ -1004,7 +1004,7 @@ add_task(function* runTests() {
is(authinfo.username, "", "Checking returned username");
is(authinfo.password, "examplepass", "Checking returned password");
// ===== test 503 =====
info("===== test 503 =====");
// test filling in existing login (undetermined from multiple selection)
// user2name/user2pass would also be valid to fill here.
state = {
@ -1037,7 +1037,7 @@ add_task(function* runTests() {
ok(authinfo.username == "user1name" || authinfo.username == "user2name", "Checking returned username");
ok(authinfo.password == "user1pass" || authinfo.password == "user2pass", "Checking returned password");
// ===== test 504 =====
info("===== test 504 =====");
// test filling in existing login (undetermined --> user1)
// user2name/user2pass would also be valid to fill here.
state = {
@ -1073,7 +1073,7 @@ add_task(function* runTests() {
is(authinfo.username, "user1name", "Checking returned username");
is(authinfo.password, "user1pass", "Checking returned password");
// ===== test 505 =====
info("===== test 505 =====");
// test filling in existing login (undetermined --> user2)
// user2name/user2pass would also be valid to fill here.
state = {
@ -1110,7 +1110,7 @@ add_task(function* runTests() {
is(authinfo.username, "user2name", "Checking returned username");
is(authinfo.password, "user2pass", "Checking returned password");
// ===== test 506 =====
info("===== test 506 =====");
// test changing a password (undetermined --> user2 w/ newpass)
// user2name/user2pass would also be valid to fill here.
state = {
@ -1147,7 +1147,7 @@ add_task(function* runTests() {
is(authinfo.username, "user2name", "Checking returned username");
is(authinfo.password, "NEWuser2pass", "Checking returned password");
// ===== test 507 =====
info("===== test 507 =====");
// test changing a password (undetermined --> user2 w/ origpass)
// user2name/user2pass would also be valid to fill here.
state = {
@ -1184,7 +1184,7 @@ add_task(function* runTests() {
is(authinfo.username, "user2name", "Checking returned username");
is(authinfo.password, "user2pass", "Checking returned password");
// ===== test 508 =====
info("===== test 508 =====");
// test proxy login (default = no autologin), make sure it prompts.
state = {
msg : "The proxy moz-proxy://127.0.0.1:8888 is requesting a username and password.\n\nThe site says: “Proxy Realm”",
@ -1221,7 +1221,7 @@ add_task(function* runTests() {
is(proxyAuthinfo.username, "proxuser", "Checking returned username");
is(proxyAuthinfo.password, "proxpass", "Checking returned password");
// ===== test 509 =====
info("===== test 509 =====");
// test proxy login (with autologin)
// Enable the autologin pref.
@ -1241,7 +1241,7 @@ add_task(function* runTests() {
is(proxyAuthinfo.username, "proxuser", "Checking returned username");
is(proxyAuthinfo.password, "proxpass", "Checking returned password");
// ===== test 510 =====
info("===== test 510 =====");
// test proxy login (with autologin), ensure it prompts after a failed auth.
state = {
msg : "The proxy moz-proxy://127.0.0.1:8888 is requesting a username and password.\n\nThe site says: “Proxy Realm”",
@ -1278,7 +1278,7 @@ add_task(function* runTests() {
is(proxyAuthinfo.username, "proxuser", "Checking returned username");
is(proxyAuthinfo.password, "proxpass", "Checking returned password");
// ===== test 511 =====
info("===== test 511 =====");
// test proxy login (with autologin), ensure it prompts in Private Browsing mode.
state = {
msg : "the message",
@ -1307,7 +1307,7 @@ add_task(function* runTests() {
getService(Ci.nsIHttpAuthManager);
authMgr.clearAll();
// ===== test 1000 =====
info("===== test 1000 =====");
state = {
msg : "http://mochi.test:8888 is requesting your username and password.\n\nThe site says: “mochitest”",
title : "Authentication Required",