Bug 667233 - Follow-up to loosen the restriction on preferredOriginScheme due to tests using data: and chrome:
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Sun, 29 May 2016 19:09:08 -0700
changeset 340337 6c33f0e30df2c7ce28ded1b97820149722cad493
parent 340336 1cafe268e0149021d977aca6bf5af1478e52324d
child 340338 e0354aa795ba11ec139cbe286e7217ba4fd0ad3e
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs667233
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 667233 - Follow-up to loosen the restriction on preferredOriginScheme due to tests using data: and chrome: Also disable the autocomplete/autofill tests on Android. MozReview-Commit-ID: P4mgzfNzda
toolkit/components/passwordmgr/LoginHelper.jsm
toolkit/components/passwordmgr/test/mochitest/mochitest.ini
toolkit/components/passwordmgr/test/unit/test_dedupeLogins.js
--- a/toolkit/components/passwordmgr/LoginHelper.jsm
+++ b/toolkit/components/passwordmgr/LoginHelper.jsm
@@ -370,18 +370,18 @@ this.LoginHelper = {
       try {
         preferredOriginScheme = Services.io.newURI(preferredOrigin, null, null).scheme;
       } catch (ex) {
         // Handle strings that aren't valid URIs e.g. chrome://FirefoxAccounts
       }
     }
 
     if (!preferredOriginScheme && resolveBy.includes("scheme")) {
-      throw new Error("dedupeLogins: Deduping with a scheme preference but couldn't " +
-                      "get the preferred origin scheme.");
+      log.warn("dedupeLogins: Deduping with a scheme preference but couldn't " +
+               "get the preferred origin scheme.");
     }
 
     // We use a Map to easily lookup logins by their unique keys.
     let loginsByKeys = new Map();
 
     // Generate a unique key string from a login.
     function getKey(login, uniqueKeys) {
       return uniqueKeys.reduce((prev, key) => prev + KEY_DELIMITER + login[key], "");
--- a/toolkit/components/passwordmgr/test/mochitest/mochitest.ini
+++ b/toolkit/components/passwordmgr/test/mochitest/mochitest.ini
@@ -8,17 +8,19 @@ support-files =
   ../authenticate.sjs
   ../browser/form_basic.html
   ../browser/form_cross_origin_secure_action.html
   ../notification_common.js
   ../pwmgr_common.js
   auth2/authenticate.sjs
 
 [test_autocomplete_https_upgrade.html]
+skip-if = toolkit == 'android' # autocomplete
 [test_autofill_https_upgrade.html]
+skip-if = toolkit == 'android' # Bug 1259768
 [test_autofill_password-only.html]
 [test_basic_form.html]
 [test_basic_form_0pw.html]
 [test_basic_form_1pw.html]
 [test_basic_form_1pw_2.html]
 [test_basic_form_2pw_1.html]
 [test_basic_form_2pw_2.html]
 [test_basic_form_3pw_1.html]
--- a/toolkit/components/passwordmgr/test/unit/test_dedupeLogins.js
+++ b/toolkit/components/passwordmgr/test/unit/test_dedupeLogins.js
@@ -267,24 +267,16 @@ add_task(function* test_dedupeLogins_pre
     [
       "resolveBy scheme + timePasswordChanged, empty preferredOrigin",
       /preferredOrigin/,
       [DOMAIN1_HTTPS_TO_HTTPS_U1_P1, DOMAIN1_HTTP_TO_HTTP_U1_P1],
       undefined,
       ["scheme", "timePasswordChanged"],
       "",
     ],
-    [
-      "resolveBy scheme + timePasswordChanged, invalid preferredOrigin",
-      /preferred origin/,
-      [DOMAIN1_HTTPS_TO_HTTPS_U1_P1, DOMAIN1_HTTP_TO_HTTP_U1_P1],
-      undefined,
-      ["scheme", "timePasswordChanged"],
-      "example.com",
-    ],
   ];
 
   for (let tc of testcases) {
     let description = tc.shift();
     let expectedException = tc.shift();
     Assert.throws(() => {
       LoginHelper.dedupeLogins(...tc);
     }, expectedException, `Check: ${description}`);