Bug 1355534 - Revert to longer insecure login field contextual warning string. r=johannh draft
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Tue, 11 Apr 2017 13:03:29 -0400
changeset 560612 538757e7e13da7610512a866b7bd166e81027278
parent 560377 35a1b06fe7863e118ce831d9056ad20501eec606
child 623748 6207a49d6bf6ad3c0395f6868990a17b39f21d9c
push id53471
push usermozilla@noorenberghe.ca
push dateTue, 11 Apr 2017 17:04:13 +0000
reviewersjohannh
bugs1355534
milestone53.0
Bug 1355534 - Revert to longer insecure login field contextual warning string. r=johannh MozReview-Commit-ID: F2hmNQGLvo8
toolkit/components/passwordmgr/LoginManagerContent.jsm
toolkit/components/passwordmgr/test/mochitest/test_insecure_form_field_autocomplete.html
toolkit/components/passwordmgr/test/mochitest/test_password_field_autocomplete.html
toolkit/components/passwordmgr/test/unit/test_user_autocomplete_result.js
--- a/toolkit/components/passwordmgr/LoginManagerContent.jsm
+++ b/toolkit/components/passwordmgr/LoginManagerContent.jsm
@@ -1497,17 +1497,17 @@ UserAutoCompleteResult.prototype = {
       if (formatArgs) {
         return this._stringBundle.formatStringFromName(key, formatArgs, formatArgs.length);
       }
       return this._stringBundle.GetStringFromName(key);
     };
 
     if (this._showInsecureFieldWarning && index === 0) {
       let learnMoreString = getLocalizedString("insecureFieldWarningLearnMore");
-      return getLocalizedString("insecureFieldWarningDescription3", [learnMoreString]);
+      return getLocalizedString("insecureFieldWarningDescription2", [learnMoreString]);
     }
 
     let login = this.logins[index - this._showInsecureFieldWarning];
     let username = login.username;
     // If login is empty or duplicated we want to append a modification date to it.
     if (!username || this._duplicateUsernames.has(username)) {
       if (!username) {
         username = getLocalizedString("noUsername");
--- a/toolkit/components/passwordmgr/test/mochitest/test_insecure_form_field_autocomplete.html
+++ b/toolkit/components/passwordmgr/test/mochitest/test_insecure_form_field_autocomplete.html
@@ -228,17 +228,17 @@ add_task(function* test_form1_warning_en
   restoreForm();
   let shownPromise = promiseACShown();
   doKey("down"); // open
   let results = yield shownPromise;
 
   let popupState = yield getPopupState();
   is(popupState.selectedIndex, -1, "Check no entries are selected upon opening");
 
-  let expectedMenuItems = ["Logins entered here could be compromised. Learn More",
+  let expectedMenuItems = ["This connection is not secure. Logins entered here could be compromised. Learn More",
                            "tempuser1",
                            "testuser2",
                            "testuser3",
                            "zzzuser4"];
   checkArrayValues(results, expectedMenuItems, "Check all menuitems are displayed correctly.");
 
   doKey("down"); // select insecure warning
   checkACForm("", ""); // value shouldn't update just by selecting
@@ -760,17 +760,17 @@ add_task(function* test_form9_filtering(
   checkACForm("form9userAB", "");
   uname.focus();
   doKey("left");
   shownPromise = promiseACShown();
   sendChar("A");
   let results = yield shownPromise;
 
   checkACForm("form9userAAB", "");
-  checkArrayValues(results, ["Logins entered here could be compromised. Learn More", "form9userAAB"],
+  checkArrayValues(results, ["This connection is not secure. Logins entered here could be compromised. Learn More", "form9userAAB"],
                             "Check dropdown is updated after inserting 'A'");
   doKey("down"); // skip insecure warning
   doKey("down");
   doKey("return");
   yield promiseFormsProcessed();
   checkACForm("form9userAAB", "form9pass");
 });
 
--- a/toolkit/components/passwordmgr/test/mochitest/test_password_field_autocomplete.html
+++ b/toolkit/components/passwordmgr/test/mochitest/test_password_field_autocomplete.html
@@ -193,17 +193,17 @@ add_task(function* test_form1_enabledIns
   // Trigger autocomplete popup
   let shownPromise = promiseACShown();
   doKey("down"); // open
   let results = yield shownPromise;
 
   let popupState = yield getPopupState();
   is(popupState.selectedIndex, -1, "Check no entries are selected upon opening");
 
-  let expectedMenuItems = ["Logins entered here could be compromised. Learn More",
+  let expectedMenuItems = ["This connection is not secure. Logins entered here could be compromised. Learn More",
                            "No username (" + DATE_NOW_STRING + ")",
                            "tempuser1",
                            "testuser2",
                            "testuser3",
                            "zzzuser4"];
   checkArrayValues(results, expectedMenuItems, "Check all menuitems are displayed correctly.");
 
   doKey("down"); // select insecure warning
@@ -252,17 +252,17 @@ add_task(function* test_form1_enabledIns
   // Trigger autocomplete popup
   let shownPromise = promiseACShown();
   doKey("down"); // open
   let results = yield shownPromise;
 
   let popupState = yield getPopupState();
   is(popupState.selectedIndex, -1, "Check no entries are selected upon opening");
 
-  let expectedMenuItems = ["Logins entered here could be compromised. Learn More",
+  let expectedMenuItems = ["This connection is not secure. Logins entered here could be compromised. Learn More",
                            "No username (" + DATE_NOW_STRING + ")",
                            "tempuser1",
                            "testuser2",
                            "testuser3",
                            "zzzuser4"];
   checkArrayValues(results, expectedMenuItems, "Check all menuitems are displayed correctly.");
 
   doKey("down"); // select insecure warning
--- a/toolkit/components/passwordmgr/test/unit/test_user_autocomplete_result.js
+++ b/toolkit/components/passwordmgr/test/unit/test_user_autocomplete_result.js
@@ -61,17 +61,17 @@ let expectedResults = [
   {
     insecureFieldWarningEnabled: true,
     insecureAutoFillFormsEnabled: true,
     isSecure: false,
     isPasswordField: false,
     matchingLogins,
     items: [{
       value: "",
-      label: "Logins entered here could be compromised. Learn More",
+      label: "This connection is not secure. Logins entered here could be compromised. Learn More",
       style: "insecureWarning"
     }, {
       value: "",
       label: LABEL_NO_USERNAME,
       style: "login",
     }, {
       value: "tempuser1",
       label: "tempuser1",
@@ -121,17 +121,17 @@ let expectedResults = [
   {
     insecureFieldWarningEnabled: true,
     insecureAutoFillFormsEnabled: true,
     isSecure: false,
     isPasswordField: true,
     matchingLogins,
     items: [{
       value: "",
-      label: "Logins entered here could be compromised. Learn More",
+      label: "This connection is not secure. Logins entered here could be compromised. Learn More",
       style: "insecureWarning"
     }, {
       value: "emptypass1",
       label: LABEL_NO_USERNAME,
       style: "login",
     }, {
       value: "temppass1",
       label: "tempuser1",
@@ -293,17 +293,17 @@ let expectedResults = [
   {
     insecureFieldWarningEnabled: true,
     insecureAutoFillFormsEnabled: false,
     isSecure: false,
     isPasswordField: false,
     matchingLogins,
     items: [{
       value: "",
-      label: "Logins entered here could be compromised. Learn More",
+      label: "This connection is not secure. Logins entered here could be compromised. Learn More",
       style: "insecureWarning"
     }, {
       value: "",
       label: LABEL_NO_USERNAME,
       style: "login",
     }, {
       value: "tempuser1",
       label: "tempuser1",
@@ -353,17 +353,17 @@ let expectedResults = [
   {
     insecureFieldWarningEnabled: true,
     insecureAutoFillFormsEnabled: false,
     isSecure: false,
     isPasswordField: true,
     matchingLogins,
     items: [{
       value: "",
-      label: "Logins entered here could be compromised. Learn More",
+      label: "This connection is not secure. Logins entered here could be compromised. Learn More",
       style: "insecureWarning"
     }, {
       value: "emptypass1",
       label: LABEL_NO_USERNAME,
       style: "login",
     }, {
       value: "temppass1",
       label: "tempuser1",