Bug 1515992 - change account provisioner's dummy URL for storage to be compatible with NGLS. r=mkmelin,BenB
authorJorg K <jorgk@jorgk.com>
Sun, 23 Dec 2018 15:18:37 +0100
changeset 33199 061051149fae
parent 33198 691b074060a4
child 33200 4b4b0e0cbb00
push id2368
push userclokep@gmail.com
push dateMon, 28 Jan 2019 21:12:50 +0000
treeherdercomm-beta@56d23c07d815 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin, BenB
bugs1515992
Bug 1515992 - change account provisioner's dummy URL for storage to be compatible with NGLS. r=mkmelin,BenB
mail/app/profile/all-thunderbird.js
mail/components/newmailaccount/content/accountProvisioner.js
mail/test/mozmill/newmailaccount/test-newmailaccount.js
--- a/mail/app/profile/all-thunderbird.js
+++ b/mail/app/profile/all-thunderbird.js
@@ -445,19 +445,16 @@ pref("mail.phishing.detection.ipaddresse
 pref("mail.phishing.detection.mismatched_hosts", true);
 pref("mail.phishing.detection.disallow_form_actions", true);
 
 pref("browser.safebrowsing.reportPhishURL", "https://%LOCALE%.phish-report.mozilla.com/?hl=%LOCALE%");
 
 // prevent status-bar spoofing even if people are foolish enough to turn on JS
 pref("dom.disable_window_status_change",          true);
 
-// Disable Next Generation Local Storage Implementation, see bug 1515992.
-pref("dom.storage.next_gen", false);
-
 // If a message is opened using Enter or a double click, what should we do?
 // 0 - open it in a new window
 // 1 - open it in an existing window
 // 2 - open it in a new tab
 pref("mail.openMessageBehavior", 2);
 pref("mail.openMessageBehavior.version", 0);
 // If messages or folders are opened using the context menu or a middle click,
 // should we open them in the foreground or in the background?
--- a/mail/components/newmailaccount/content/accountProvisioner.js
+++ b/mail/components/newmailaccount/content/accountProvisioner.js
@@ -19,26 +19,23 @@ var stringBundle = new StringBundle("chr
 var RETRY_TIMEOUT = 5000; // 5 seconds
 var CONNECTION_TIMEOUT = 15000; // 15 seconds
 
 function isAccel(event) {
   return AppConstants.platform == "macosx" ? event.metaKey : event.ctrlKey;
 }
 
 /**
- * Get the localstorage for this page in a way that works in chrome.
- *
- * Cribbed from
- *   mozilla/dom/tests/mochitest/localstorage/test_localStorageFromChrome.xhtml
+ * Get fixed localstorage.
  *
  * @param {String} page The page to get the localstorage for.
  * @return {nsIDOMStorage} The localstorage for this page.
  */
-function getLocalStorage(page) {
-  var url = "chrome://content/messenger/accountProvisionerStorage/" + page;
+function getLocalStorage() {
+  var url = "https://accountprovisioner.thunderbird.invalid";
 
   var uri = Services.io.newURI(url);
   var principal = Services.scriptSecurityManager.createCodebasePrincipal(uri, {});
   return Services.domStorageManager.createStorage(null, principal, url);
 }
 
 var MAX_SMALL_ADDRESSES = 2;
 
@@ -1004,16 +1001,16 @@ var EmailAccountProvisioner = {
     element.textContent = "";
     this.searchEnabled(true);
     gLog.info("Email Account Provisioner is in online mode.");
   },
 };
 
 
 XPCOMUtils.defineLazyGetter(EmailAccountProvisioner, "storage", function() {
-  return getLocalStorage("accountProvisioner");
+  return getLocalStorage();
 });
 
 window.addEventListener("online",
                         EmailAccountProvisioner.tryToPopulateProviderList);
 
 document.addEventListener("DOMContentLoaded",
                           EmailAccountProvisioner.init);
--- a/mail/test/mozmill/newmailaccount/test-newmailaccount.js
+++ b/mail/test/mozmill/newmailaccount/test-newmailaccount.js
@@ -1196,17 +1196,17 @@ function subtest_provider_language_wildc
 
 /**
  * Tests that the search button is disabled if we start up the Account
  * Provisioner, and we have no search in the input.
  */
 function test_search_button_disabled_if_no_query_on_init() {
   // We have to do a little bit of gymnastics to access the local storage
   // for the accountProvisioner dialog...
-  let url = "chrome://content/messenger/accountProvisionerStorage/accountProvisioner";
+  let url = "https://accountprovisioner.thunderbird.invalid";
   let dsm = Services.domStorageManager;
 
   let uri = Services.io.newURI(url);
   let principal = Services.scriptSecurityManager.createCodebasePrincipal(uri, {});
   let storage = dsm.createStorage(null, principal, url);
 
   // Ok, got it. Now let's blank out the name.
   storage.setItem("name", "");