Bug 1318194 - Follow up, fix unit test draft
authorTimothy Guan-tin Chien <timdream@gmail.com>
Fri, 18 Nov 2016 21:45:38 +0800
changeset 441118 0073a0b7fcb7b9f302d7efcfe6fe7a76a8c0004a
parent 441029 2a1c0a7563dc86767875ba95fa43fe56f6d798f4
child 537499 608d5a248bf0903033e8ad1212e6ad0adb7669c0
push id36364
push userbmo:timdream@gmail.com
push dateFri, 18 Nov 2016 13:46:30 +0000
bugs1318194
milestone53.0a1
Bug 1318194 - Follow up, fix unit test MozReview-Commit-ID: vOhM31pqJS
toolkit/components/passwordmgr/test/unit/test_user_autocomplete_result.js
--- a/toolkit/components/passwordmgr/test/unit/test_user_autocomplete_result.js
+++ b/toolkit/components/passwordmgr/test/unit/test_user_autocomplete_result.js
@@ -295,16 +295,36 @@ let expectedResults = [
     insecureAutoFillFormsEnabled: false,
     isSecure: false,
     isPasswordField: false,
     matchingLogins: matchingLogins,
     items: [{
       value: "",
       label: "This connection is not secure. Logins entered here could be compromised.",
       style: "insecureWarning"
+    }, {
+      value: "",
+      label: LABEL_NO_USERNAME,
+      style: ""
+    }, {
+      value: "tempuser1",
+      label: "tempuser1",
+      style: ""
+    }, {
+      value: "testuser2",
+      label: "testuser2",
+      style: ""
+    }, {
+      value: "testuser3",
+      label: "testuser3",
+      style: ""
+    }, {
+      value: "zzzuser4",
+      label: "zzzuser4",
+      style: ""
     }]
   },
   {
     insecureFieldWarningEnabled: true,
     insecureAutoFillFormsEnabled: false,
     isSecure: true,
     isPasswordField: true,
     matchingLogins: matchingLogins,
@@ -335,16 +355,36 @@ let expectedResults = [
     insecureAutoFillFormsEnabled: false,
     isSecure: false,
     isPasswordField: true,
     matchingLogins: matchingLogins,
     items: [{
       value: "",
       label: "This connection is not secure. Logins entered here could be compromised.",
       style: "insecureWarning"
+    }, {
+      value: "emptypass1",
+      label: LABEL_NO_USERNAME,
+      style: ""
+    }, {
+      value: "temppass1",
+      label: "tempuser1",
+      style: ""
+    }, {
+      value: "testpass2",
+      label: "testuser2",
+      style: ""
+    }, {
+      value: "testpass3",
+      label: "testuser3",
+      style: ""
+    }, {
+      value: "zzzpass4",
+      label: "zzzuser4",
+      style: ""
     }]
   },
   {
     insecureFieldWarningEnabled: false,
     insecureAutoFillFormsEnabled: false,
     isSecure: true,
     isPasswordField: false,
     matchingLogins: matchingLogins,