diff --git a/browser/base/content/aboutaccounts/aboutaccounts.xhtml b/browser/base/content/aboutaccounts/aboutaccounts.xhtml index 3f46162e84c3..81e4f1273d85 100644 --- a/browser/base/content/aboutaccounts/aboutaccounts.xhtml +++ b/browser/base/content/aboutaccounts/aboutaccounts.xhtml @@ -42,7 +42,7 @@
- +
@@ -56,7 +56,7 @@
- +
&aboutAccountsConfig.description;
@@ -71,7 +71,7 @@
- +
&aboutAccounts.noConnection.description;
@@ -86,7 +86,7 @@
- +
&aboutAccounts.badConfig.description;
diff --git a/browser/base/content/aboutaccounts/main.css b/browser/base/content/aboutaccounts/main.css index 2abb60f40d1a..a5d2db9bd57c 100644 --- a/browser/base/content/aboutaccounts/main.css +++ b/browser/base/content/aboutaccounts/main.css @@ -118,6 +118,8 @@ header h1 overflow: hidden; text-indent: 100%; white-space: nowrap; + -moz-context-properties: fill; + fill: #bfcbd3; } .description, diff --git a/browser/base/content/test/general/browser_windowopen_reflows.js b/browser/base/content/test/general/browser_windowopen_reflows.js index bfb79f6495f6..5cdda1ee6848 100644 --- a/browser/base/content/test/general/browser_windowopen_reflows.js +++ b/browser/base/content/test/general/browser_windowopen_reflows.js @@ -19,10 +19,6 @@ const EXPECTED_REFLOWS = [ // Focusing the content area causes a reflow. "_delayedStartup@chrome://browser/content/browser.js|", - - // Sometimes sessionstore collects data during this test, which causes a sync reflow - // (https://bugzilla.mozilla.org/show_bug.cgi?id=892154 will fix this) - "ssi_getWindowDimension@resource:///modules/sessionstore/SessionStore.jsm", ]; if (Services.appinfo.OS == "WINNT" || Services.appinfo.OS == "Darwin") { diff --git a/browser/base/content/urlbarBindings.xml b/browser/base/content/urlbarBindings.xml index 2254413b7b3b..f5cc953d63c5 100644 --- a/browser/base/content/urlbarBindings.xml +++ b/browser/base/content/urlbarBindings.xml @@ -189,9 +189,9 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. } } } else { - let originalUrl = ReaderMode.getOriginalUrl(aValue); + let originalUrl = ReaderMode.getOriginalUrlObjectForDisplay(aValue); if (originalUrl) { - returnValue = originalUrl; + returnValue = originalUrl.spec; } } @@ -825,16 +825,17 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. } // Avoid copying 'about:reader?url=', and always provide the original URI: - let readerOriginalURL = ReaderMode.getOriginalUrl(uri.spec); - if (readerOriginalURL) { - uri = uriFixup.createFixupURI(readerOriginalURL, Ci.nsIURIFixup.FIXUP_FLAG_NONE); + // Reader mode ensures we call createExposableURI itself. + let readerStrippedURI = ReaderMode.getOriginalUrlObjectForDisplay(uri.spec); + if (readerStrippedURI) { + uri = readerStrippedURI; + } else { + // Only copy exposable URIs + try { + uri = uriFixup.createExposableURI(uri); + } catch (ex) {} } - // Only copy exposable URIs - try { - uri = uriFixup.createExposableURI(uri); - } catch (ex) {} - // If the entire URL is selected, just use the actual loaded URI, // unless we want a decoded URI, or it's a data: or javascript: URI, // since those are hard to read when encoded. diff --git a/browser/components/contextualidentity/test/browser/browser.ini b/browser/components/contextualidentity/test/browser/browser.ini index af7bd6dbafaf..30150bde4c8f 100644 --- a/browser/components/contextualidentity/test/browser/browser.ini +++ b/browser/components/contextualidentity/test/browser/browser.ini @@ -12,6 +12,7 @@ support-files = [browser_favicon.js] [browser_forgetaboutsite.js] [browser_forgetAPI_cookie_getCookiesWithOriginAttributes.js] +[browser_restore_getCookiesWithOriginAttributes.js] [browser_forgetAPI_EME_forgetThisSite.js] [browser_forgetAPI_quota_clearStoragesForPrincipal.js] [browser_newtabButton.js] diff --git a/browser/components/contextualidentity/test/browser/browser_restore_getCookiesWithOriginAttributes.js b/browser/components/contextualidentity/test/browser/browser_restore_getCookiesWithOriginAttributes.js new file mode 100644 index 000000000000..35cad08c31c8 --- /dev/null +++ b/browser/components/contextualidentity/test/browser/browser_restore_getCookiesWithOriginAttributes.js @@ -0,0 +1,114 @@ +/* + * Bug 1334587 - A Test case for checking whether forgetting APIs are working for cookies. + */ + +const { classes: Cc, Constructor: CC, interfaces: Ci, utils: Cu } = Components; + +const TEST_HOST = "example.com"; +const TEST_URL = "http://" + TEST_HOST + "/browser/browser/components/contextualidentity/test/browser/"; + +const USER_CONTEXTS = [ + "default", + "personal", + "work" +]; + +const DELETE_CONTEXT = 1; +const COOKIE_NAME = "userContextId"; + +// +// Support functions. +// + +function* openTabInUserContext(uri, userContextId) { + // Open the tab in the correct userContextId. + let tab = gBrowser.addTab(uri, {userContextId}); + + // Select tab and make sure its browser is focused. + gBrowser.selectedTab = tab; + tab.ownerGlobal.focus(); + + let browser = gBrowser.getBrowserForTab(tab); + yield BrowserTestUtils.browserLoaded(browser); + return {tab, browser}; +} + +function getCookiesForOA(host, userContextId) { + return Services.cookies.getCookiesFromHost(host, {userContextId}); +} + +// +// Test functions. +// + +add_task(function* setup() { + // Make sure userContext is enabled. + yield SpecialPowers.pushPrefEnv({"set": [ + [ "privacy.userContext.enabled", true ], + ]}); +}); + +function checkCookies(ignoreContext = null) { + for (let userContextId of Object.keys(USER_CONTEXTS)) { + if (ignoreContext && userContextId === String(ignoreContext)) { + continue; + } + let enumerator = getCookiesForOA(TEST_HOST, userContextId); + ok(enumerator.hasMoreElements(), "Cookies available"); + + let foundCookie = enumerator.getNext().QueryInterface(Ci.nsICookie2); + is(foundCookie["name"], COOKIE_NAME, "Check cookie name"); + is(foundCookie["value"], USER_CONTEXTS[userContextId], "Check cookie value"); + } +} + +function deleteCookies(onlyContext = null) { + // Using getCookiesWithOriginAttributes() to get all cookies for a certain + // domain by using the originAttributes pattern, and clear all these cookies. + let enumerator = Services.cookies.getCookiesWithOriginAttributes(JSON.stringify({}), TEST_HOST); + while (enumerator.hasMoreElements()) { + let cookie = enumerator.getNext().QueryInterface(Ci.nsICookie); + if (!onlyContext || cookie.originAttributes.userContextId == onlyContext) { + Services.cookies.remove(cookie.host, cookie.name, cookie.path, false, cookie.originAttributes); + } + } +} + +add_task(function* test_cookie_getCookiesWithOriginAttributes() { + let tabs = []; + + for (let userContextId of Object.keys(USER_CONTEXTS)) { + // Load the page in different contexts and set a cookie + // which should only be visible in that context. + let value = USER_CONTEXTS[userContextId]; + + // Open our tab in the given user context. + tabs[userContextId] = yield* openTabInUserContext(TEST_URL + "file_reflect_cookie_into_title.html?" + value, userContextId); + + // Close this tab. + yield BrowserTestUtils.removeTab(tabs[userContextId].tab); + } + + // Check that cookies have been set properly. + for (let userContextId of Object.keys(USER_CONTEXTS)) { + let enumerator = getCookiesForOA(TEST_HOST, userContextId); + ok(enumerator.hasMoreElements(), "Cookies available"); + + let foundCookie = enumerator.getNext().QueryInterface(Ci.nsICookie2); + is(foundCookie["name"], COOKIE_NAME, "Check cookie name"); + is(foundCookie["value"], USER_CONTEXTS[userContextId], "Check cookie value"); + } + checkCookies(); + + deleteCookies(DELETE_CONTEXT); + + checkCookies(DELETE_CONTEXT); + + deleteCookies(); + + // Check that whether cookies has been cleared. + for (let userContextId of Object.keys(USER_CONTEXTS)) { + let e = getCookiesForOA(TEST_HOST, userContextId); + ok(!e.hasMoreElements(), "No Cookie should be here"); + } +}); diff --git a/browser/components/preferences/in-content-old/sync.xul b/browser/components/preferences/in-content-old/sync.xul index ad11fee817d4..1eb421677eae 100755 --- a/browser/components/preferences/in-content-old/sync.xul +++ b/browser/components/preferences/in-content-old/sync.xul @@ -60,7 +60,7 @@ - +