Backed out changeset 5d761723a899 (bug 1058438)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Mon, 25 Jul 2016 12:20:34 +0200
changeset 331400 cdca902ad554e20aa077d43374eebad54a363c43
parent 331399 b3a92e3d6ae3650c41e0075c02706279a701f1a1
child 331401 1c60e002f023347feb49fd7b1c08e51b601f2675
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1058438
milestone50.0a1
backs out5d761723a89949e567b4e118dcacad5010063c60
Backed out changeset 5d761723a899 (bug 1058438)
toolkit/components/passwordmgr/test/unit/test_disabled_hosts.js
--- a/toolkit/components/passwordmgr/test/unit/test_disabled_hosts.js
+++ b/toolkit/components/passwordmgr/test/unit/test_disabled_hosts.js
@@ -138,60 +138,20 @@ add_task(function test_rememberSignons()
 
   // Clean up.
   Services.logins.setLoginSavingEnabled(hostname2, true);
   LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(),
                                           []);
 });
 
 /**
- * Tests storing disabled hosts with non-ASCII characters where IDN is supported.
+ * Tests storing disabled hosts containing non-ASCII characters.
  */
-add_task(function* test_storage_setLoginSavingEnabled_nonascii_IDN_is_supported()
+add_task(function* test_storage_setLoginSavingEnabled_nonascii()
 {
-  let hostname = "http://大.net";
-  let encoding = "http://xn--pss.net";
+  let hostname = "http://" + String.fromCharCode(355) + ".example.com";
+  Services.logins.setLoginSavingEnabled(hostname, false);
 
-  // Test adding disabled host with nonascii URL (http://大.net).
-  Services.logins.setLoginSavingEnabled(hostname, false);
   yield* LoginTestUtils.reloadData();
-  Assert.equal(Services.logins.getLoginSavingEnabled(hostname), false);
-  Assert.equal(Services.logins.getLoginSavingEnabled(encoding), false);
-  LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(), [hostname]);
-
-  LoginTestUtils.clearData();
-
-  // Test adding disabled host with IDN ("http://xn--pss.net").
-  Services.logins.setLoginSavingEnabled(encoding, false);
-  yield* LoginTestUtils.reloadData();
-  Assert.equal(Services.logins.getLoginSavingEnabled(hostname), false);
-  Assert.equal(Services.logins.getLoginSavingEnabled(encoding), false);
-  LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(), [hostname]);
-
+  LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(),
+                                          [hostname]);
   LoginTestUtils.clearData();
 });
-
-/**
- * Tests storing disabled hosts with non-ASCII characters where IDN is not supported.
- */
-add_task(function* test_storage_setLoginSavingEnabled_nonascii_IDN_not_supported()
-{
-  let hostname = "http://√.com";
-  let encoding = "http://xn--19g.com";
-
-  // Test adding disabled host with nonascii URL (http://√.com).
-  Services.logins.setLoginSavingEnabled(hostname, false);
-  yield* LoginTestUtils.reloadData();
-  Assert.equal(Services.logins.getLoginSavingEnabled(hostname), false);
-  Assert.equal(Services.logins.getLoginSavingEnabled(encoding), false);
-  LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(), [encoding]);
-
-  LoginTestUtils.clearData();
-
-  // Test adding disabled host with IDN ("http://xn--19g.com").
-  Services.logins.setLoginSavingEnabled(encoding, false);
-  yield* LoginTestUtils.reloadData();
-  Assert.equal(Services.logins.getLoginSavingEnabled(hostname), false);
-  Assert.equal(Services.logins.getLoginSavingEnabled(encoding), false);
-  LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(), [encoding]);
-
-  LoginTestUtils.clearData();
-});