diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 891e0d6c4dd7..c0c2b93f78ee 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + @@ -23,7 +23,7 @@ - + @@ -129,7 +129,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index f6bc70db111e..06c2b8b92bc3 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,13 +19,13 @@ - + - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index a7607d964b3e..1602eb6a9a24 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,10 +17,10 @@ - + - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index e83d03f6fef3..f1aab48a4798 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + @@ -23,7 +23,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index f6bc70db111e..06c2b8b92bc3 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,13 +19,13 @@ - + - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 15d4f75d40c5..d5675726df09 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + @@ -23,7 +23,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 6a3a4f8dab1b..7b26522340c4 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,10 +17,10 @@ - + - + diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 5332e79b2bf2..15616f7d710e 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "03effd58034893d2a12907faa6a8a41d3e923b50", + "revision": "1764121939b82f4ded4ca30761df48c3841028b0", "repo_path": "integration/gaia-central" } diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 2e45fb7271b2..3195f9b97113 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,11 +17,11 @@ - + - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index c82bbe571909..91571de3f13f 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index f0b7c3e74cff..d7fe4e2722d7 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,10 +17,10 @@ - + - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 948ec2e310f8..917e60da9aad 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,12 +17,12 @@ - + - + diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 3b29ba7cd78a..ca9db831b348 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -2562,7 +2562,7 @@ let BrowserOnClick = { let mm = window.messageManager; mm.addMessageListener("Browser:CertExceptionError", this); mm.addMessageListener("Browser:SiteBlockedError", this); - mm.addMessageListener("Browser:NetworkError", this); + mm.addMessageListener("Browser:EnableOnlineMode", this); mm.addMessageListener("Browser:SendSSLErrorReport", this); mm.addMessageListener("Browser:SetSSLErrorReportAuto", this); }, @@ -2571,7 +2571,7 @@ let BrowserOnClick = { let mm = window.messageManager; mm.removeMessageListener("Browser:CertExceptionError", this); mm.removeMessageListener("Browser:SiteBlockedError", this); - mm.removeMessageListener("Browser:NetworkError", this); + mm.removeMessageListener("Browser:EnableOnlineMode", this); mm.removeMessageListener("Browser:SendSSLErrorReport", this); mm.removeMessageListener("Browser:SetSSLErrorReportAuto", this); }, @@ -2605,9 +2605,12 @@ let BrowserOnClick = { this.onAboutBlocked(msg.data.elementId, msg.data.isMalware, msg.data.isTopFrame, msg.data.location); break; - case "Browser:NetworkError": - // Reset network state, the error page will refresh on its own. - Services.io.offline = false; + case "Browser:EnableOnlineMode": + if (Services.io.offline) { + // Reset network state and refresh the page. + Services.io.offline = false; + msg.target.reload(); + } break; case "Browser:SendSSLErrorReport": this.onSSLErrorReport(msg.target, msg.data.elementId, diff --git a/browser/base/content/content.js b/browser/base/content/content.js index 9fc0fd64847e..941242cf4bec 100644 --- a/browser/base/content/content.js +++ b/browser/base/content/content.js @@ -568,7 +568,8 @@ let ClickEventHandler = { this.onAboutBlocked(originalTarget, ownerDoc); return; } else if (ownerDoc.documentURI.startsWith("about:neterror")) { - this.onAboutNetError(originalTarget, ownerDoc); + this.onAboutNetError(event, ownerDoc.documentURI); + return; } let [href, node] = this._hrefAndLinkNodeForClickEvent(event); @@ -635,12 +636,18 @@ let ClickEventHandler = { }); }, - onAboutNetError: function (targetElement, ownerDoc) { - let elmId = targetElement.getAttribute("id"); - if (elmId != "errorTryAgain" || !/e=netOffline/.test(ownerDoc.documentURI)) { + onAboutNetError: function (event, documentURI) { + let elmId = event.originalTarget.getAttribute("id"); + if (elmId != "errorTryAgain" || !/e=netOffline/.test(documentURI)) { return; } - sendSyncMessage("Browser:NetworkError", {}); + // browser front end will handle clearing offline mode and refreshing + // the page *if* we're in offline mode now. Otherwise let the error page + // handle the click. + if (Services.io.offline) { + event.preventDefault(); + sendAsyncMessage("Browser:EnableOnlineMode", {}); + } }, /** diff --git a/browser/base/content/test/general/browser_bug435325.js b/browser/base/content/test/general/browser_bug435325.js index fe05c757a12d..4b70503a7a01 100644 --- a/browser/base/content/test/general/browser_bug435325.js +++ b/browser/base/content/test/general/browser_bug435325.js @@ -56,12 +56,12 @@ function checkPage() { // the actual example.com. Services.prefs.setIntPref("network.proxy.type", proxyPrefValue); + Services.obs.addObserver(function observer(aSubject, aTopic) { + ok(!Services.io.offline, "After clicking the Try Again button, we're back " + + "online."); + finish(); + }, "network:offline-status-changed", false); gBrowser.contentDocument.getElementById("errorTryAgain").click(); - - ok(!Services.io.offline, "After clicking the Try Again button, we're back " + - "online."); - - finish(); } registerCleanupFunction(function() { diff --git a/browser/base/content/test/newtab/browser_newtab_enhanced.js b/browser/base/content/test/newtab/browser_newtab_enhanced.js index 6e48a5772b57..c45f155811ca 100644 --- a/browser/base/content/test/newtab/browser_newtab_enhanced.js +++ b/browser/base/content/test/newtab/browser_newtab_enhanced.js @@ -37,8 +37,8 @@ function runTests() { yield setLinks("-1"); // Test with enhanced = false - NewTabUtils.allPages.enhanced = false; yield addNewTabPageTab(); + yield customizeNewTabPage("classic"); let {type, enhanced, title} = getData(0); is(type, "organic", "directory link is organic"); isnot(enhanced, "", "directory link has enhanced image"); @@ -47,8 +47,8 @@ function runTests() { is(getData(1), null, "history link pushed out by directory link"); // Test with enhanced = true - NewTabUtils.allPages.enhanced = true; yield addNewTabPageTab(); + yield customizeNewTabPage("enhanced"); ({type, enhanced, title} = getData(0)); is(type, "organic", "directory link is still organic"); isnot(enhanced, "", "directory link still has enhanced image"); @@ -67,12 +67,15 @@ function runTests() { is(getData(1), null, "directory link pushed out by pinned history link"); // Test pinned link with enhanced = false - NewTabUtils.allPages.enhanced = false; yield addNewTabPageTab(); + yield customizeNewTabPage("classic"); ({type, enhanced, title} = getData(0)); isnot(type, "enhanced", "history link is not enhanced"); is(enhanced, "", "history link has no enhanced image"); is(title, "site#-1"); is(getData(1), null, "directory link still pushed out by pinned history link"); + + ok(getContentDocument().getElementById("newtab-intro-what"), + "'What is this page?' link exists"); } diff --git a/browser/base/content/test/newtab/head.js b/browser/base/content/test/newtab/head.js index d823085242b9..890939847dc8 100644 --- a/browser/base/content/test/newtab/head.js +++ b/browser/base/content/test/newtab/head.js @@ -684,3 +684,34 @@ function whenSearchInitDone() { }); return deferred.promise; } + +/** + * Changes the newtab customization option and waits for the panel to open and close + * + * @param {string} aTheme + * Can be any of("blank"|"classic"|"enhanced") + */ +function customizeNewTabPage(aTheme) { + let document = getContentDocument(); + let panel = document.getElementById("newtab-customize-panel"); + let customizeButton = document.getElementById("newtab-customize-button"); + + // Attache onShown the listener on panel + panel.addEventListener("popupshown", function onShown() { + panel.removeEventListener("popupshown", onShown); + + // Get the element for the specific option and click on it, + // then trigger an escape to close the panel + document.getElementById("newtab-customize-" + aTheme).click(); + executeSoon(() => { panel.hidePopup(); }); + }); + + // Attache the listener for panel closing, this will resolve the promise + panel.addEventListener("popuphidden", function onHidden() { + panel.removeEventListener("popuphidden", onHidden); + executeSoon(TestRunner.next); + }); + + // Click on the customize button to display the panel + customizeButton.click(); +} diff --git a/browser/devtools/animationinspector/animation-panel.js b/browser/devtools/animationinspector/animation-panel.js index d6a5825b169b..1fd762a7e6fc 100644 --- a/browser/devtools/animationinspector/animation-panel.js +++ b/browser/devtools/animationinspector/animation-panel.js @@ -193,21 +193,26 @@ PlayerWidget.prototype = { }); let titleHTML = ""; - // Name + // Name. if (state.name) { - // Css animations have names + // Css animations have names. titleHTML += L10N.getStr("player.animationNameLabel"); titleHTML += "" + state.name + ""; } else { - // Css transitions don't + // Css transitions don't. titleHTML += L10N.getStr("player.transitionNameLabel"); } - // Duration and iteration count + // Duration, delay and iteration count. titleHTML += "