Skip to content

Commit

Permalink
merge autoland to mozilla-central a=merge
Browse files Browse the repository at this point in the history
  • Loading branch information
BavarianTomcat committed Dec 16, 2016
2 parents 6ae9542 + c6f3dc1 commit 863e873
Show file tree
Hide file tree
Showing 154 changed files with 2,758 additions and 5,388 deletions.
2 changes: 2 additions & 0 deletions browser/app/profile/firefox.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ pref("browser.shell.defaultBrowserCheckCount", 0);
// The behavior of option 3 is detailed at: http://wiki.mozilla.org/Session_Restore
pref("browser.startup.page", 1);
pref("browser.startup.homepage", "chrome://branding/locale/browserconfig.properties");
// Whether we should skip the homepage when opening the first-run page
pref("browser.startup.firstrunSkipsHomepage", false);

pref("browser.slowStartup.notificationDisabled", false);
pref("browser.slowStartup.timeThreshold", 40000);
Expand Down
32 changes: 0 additions & 32 deletions browser/base/content/downloadManagerOverlay.xul

This file was deleted.

2 changes: 0 additions & 2 deletions browser/base/jar.mn
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
browser.jar:
% content browser %content/browser/ contentaccessible=yes
#ifdef XP_MACOSX
% overlay chrome://mozapps/content/downloads/downloads.xul chrome://browser/content/downloadManagerOverlay.xul
% overlay chrome://mozapps/content/update/updates.xul chrome://browser/content/softwareUpdateOverlay.xul
#endif
#ifdef XP_WIN
Expand Down Expand Up @@ -174,7 +173,6 @@ browser.jar:
* content/browser/hiddenWindow.xul (content/hiddenWindow.xul)
#ifdef XP_MACOSX
* content/browser/macBrowserOverlay.xul (content/macBrowserOverlay.xul)
* content/browser/downloadManagerOverlay.xul (content/downloadManagerOverlay.xul)
* content/browser/softwareUpdateOverlay.xul (content/softwareUpdateOverlay.xul)
#endif
* content/browser/viewSourceOverlay.xul (content/viewSourceOverlay.xul)
Expand Down
7 changes: 5 additions & 2 deletions browser/components/nsBrowserContentHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,8 +551,11 @@ nsBrowserContentHandler.prototype = {
if (startPage == "about:blank")
startPage = "";

// Only show the startPage if we're not restoring an update session.
if (overridePage && startPage && !willRestoreSession)
let skipStartPage = override == OVERRIDE_NEW_PROFILE &&
prefb.getBoolPref("browser.startup.firstrunSkipsHomepage");
// Only show the startPage if we're not restoring an update session and are
// not set to skip the start page on this profile
if (overridePage && startPage && !willRestoreSession && !skipStartPage)
return overridePage + "|" + startPage;

return overridePage || startPage || "about:blank";
Expand Down
1 change: 1 addition & 0 deletions browser/components/syncedtabs/SyncedTabsDeckComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ function SyncedTabsDeckComponent({
SyncedTabs: SyncedTabs,
clipboardHelper: Cc["@mozilla.org/widget/clipboardhelper;1"]
.getService(Ci.nsIClipboardHelper),
getChromeWindow: this._getChromeWindow,
});
}

Expand Down
11 changes: 6 additions & 5 deletions browser/components/syncedtabs/TabListComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ this.EXPORTED_SYMBOLS = [
* to state changes so it can rerender.
*/

function TabListComponent({window, store, View, SyncedTabs, clipboardHelper}) {
function TabListComponent({window, store, View, SyncedTabs, clipboardHelper,
getChromeWindow}) {
this._window = window;
this._store = store;
this._View = View;
this._clipboardHelper = clipboardHelper;
this._getChromeWindow = getChromeWindow;
// used to trigger Sync from context menu
this._SyncedTabs = SyncedTabs;
}
Expand Down Expand Up @@ -116,17 +118,16 @@ TabListComponent.prototype = {
BrowserUITelemetry.countSyncedTabEvent("open", "sidebar");
},

onOpenTabs(urls, where, params) {
onOpenTabs(urls, where) {
if (!PlacesUIUtils.confirmOpenInTabs(urls.length, this._window)) {
return;
}
if (where == "window") {
this._window.openDialog(this._window.getBrowserURL(), "_blank",
"chrome,dialog=no,all", urls.join("|"));
} else {
for (let url of urls) {
this._window.openUILinkIn(url, where, params);
}
let loadInBackground = where == "tabshifted" ? true : false;
this._getChromeWindow(this._window).gBrowser.loadTabs(urls, loadInBackground, false);
}
BrowserUITelemetry.countSyncedTabEvent("openmultiple", "sidebar");
},
Expand Down
2 changes: 1 addition & 1 deletion browser/components/syncedtabs/TabListView.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ TabListView.prototype = {
if (where != "current") {
const tabs = itemNode.querySelector(".item-tabs-list").childNodes;
const urls = [...tabs].map(tab => tab.dataset.url);
this.props.onOpenTabs(urls, where, {});
this.props.onOpenTabs(urls, where);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ add_task(function* testInitUninit() {

add_task(function* testActions() {
let store = new SyncedTabsListStore();
let chromeWindowMock = {
gBrowser: {
loadTabs() {},
},
};
let getChromeWindowMock = sinon.stub();
getChromeWindowMock.returns(chromeWindowMock);
let clipboardHelperMock = {
copyString() {},
};
Expand All @@ -84,7 +91,8 @@ add_task(function* testActions() {
};
let component = new TabListComponent({
window: windowMock, store, View: null, SyncedTabs,
clipboardHelper: clipboardHelperMock});
clipboardHelper: clipboardHelperMock,
getChromeWindow: getChromeWindowMock });

sinon.stub(store, "getData");
component.onFilter("query");
Expand Down Expand Up @@ -127,12 +135,13 @@ add_task(function* testActions() {
component.onOpenTab("uri", "where", "params");
Assert.ok(windowMock.openUILinkIn.calledWith("uri", "where", "params"));

component.onOpenTabs(["uri1", "uri2"], "where", "params");
Assert.ok(windowMock.openUILinkIn.calledWith("uri1", "where", "params"));
Assert.ok(windowMock.openUILinkIn.calledWith("uri2", "where", "params"));
sinon.spy(windowMock, "openDialog");
component.onOpenTabs(["uri1", "uri2"], "window", "params");
Assert.deepEqual(windowMock.openDialog.args[0][3], ["uri1", "uri2"].join("|"));
sinon.spy(chromeWindowMock.gBrowser, "loadTabs");
let tabsToOpen = ["uri1", "uri2"];
component.onOpenTabs(tabsToOpen, "where");
Assert.ok(getChromeWindowMock.calledWith(windowMock));
Assert.ok(chromeWindowMock.gBrowser.loadTabs.calledWith(tabsToOpen, false, false));
component.onOpenTabs(tabsToOpen, "tabshifted");
Assert.ok(chromeWindowMock.gBrowser.loadTabs.calledWith(tabsToOpen, true, false));

sinon.spy(clipboardHelperMock, "copyString");
component.onCopyTabLocation("uri");
Expand Down
4 changes: 4 additions & 0 deletions browser/components/uitour/UITour-lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ if (typeof Mozilla == 'undefined') {
});
};

Mozilla.UITour.showNewTab = function() {
_sendEvent('showNewTab');
};

Mozilla.UITour.getConfiguration = function(configName, callback) {
_sendEvent('getConfiguration', {
callbackID: _waitForCallback(callback),
Expand Down
9 changes: 9 additions & 0 deletions browser/components/uitour/UITour.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,11 @@ this.UITour = {
break;
}

case "showNewTab": {
this.showNewTab(window, browser);
break;
}

case "getConfiguration": {
if (typeof data.configuration != "string") {
log.warn("getConfiguration: No configuration option specified");
Expand Down Expand Up @@ -1744,6 +1749,10 @@ this.UITour = {
}
},

showNewTab: function(aWindow, aBrowser) {
aWindow.openLinkIn("about:newtab", "current", {targetBrowser: aBrowser});
},

hideAnnotationsForPanel: function(aEvent, aTargetPositionCallback) {
let win = aEvent.target.ownerGlobal;
let annotationElements = new Map([
Expand Down
4 changes: 4 additions & 0 deletions browser/components/uitour/test/browser.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ skip-if = true # Bug 1113038 - Intermittent "Popup was opened"
[browser_trackingProtection.js]
skip-if = os == "linux" # Intermittent NS_ERROR_NOT_AVAILABLE [nsIUrlClassifierDBService.beginUpdate]
tag = trackingprotection
support-files =
!/browser/base/content/test/general/benignPage.html
!/browser/base/content/test/general/trackingPage.html
[browser_trackingProtection_tour.js]
tag = trackingprotection
[browser_showMenu_controlCenter.js]
Expand All @@ -41,5 +44,6 @@ skip-if = true # Disabled due to frequent failures, bugs 1026310 and 1032137
skip-if = true # Disabled pending removal of pocket UI Tour
[browser_UITour_registerPageID.js]
[browser_UITour_resetProfile.js]
[browser_UITour_showNewTab.js]
[browser_UITour_sync.js]
[browser_UITour_toggleReaderMode.js]
17 changes: 17 additions & 0 deletions browser/components/uitour/test/browser_UITour_showNewTab.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"use strict";

var gTestTab;
var gContentAPI;
var gContentWindow;

add_task(setup_UITourTest);

// Test that we can switch to about:newtab
add_UITour_task(function* test_aboutNewTab() {
let newTabLoaded = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false, "about:newtab");
info("Showing about:newtab");
yield gContentAPI.showNewTab();
info("Waiting for about:newtab to load");
yield newTabLoaded;
is(gBrowser.selectedBrowser.currentURI.spec, "about:newtab", "Loaded about:newtab");
});
2 changes: 2 additions & 0 deletions browser/config/mozconfigs/linux32/artifact
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ ac_add_options --enable-artifact-builds
ac_add_options --enable-artifact-build-symbols
unset CC
unset CXX
unset RUSTC
unset CARGO
1 change: 0 additions & 1 deletion browser/config/mozconfigs/linux32/beta
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ ac_add_options --enable-verify-mar

mk_add_options MOZ_PGO=1

. "$topsrcdir/build/mozconfig.rust"
. "$topsrcdir/build/mozconfig.common.override"
1 change: 0 additions & 1 deletion browser/config/mozconfigs/linux32/debug
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ export MOZ_PACKAGE_JSSHELL=1

ac_add_options --with-branding=browser/branding/nightly

. "$topsrcdir/build/mozconfig.rust"
. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
2 changes: 2 additions & 0 deletions browser/config/mozconfigs/linux32/debug-artifact
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ ac_add_options --enable-artifact-builds
ac_add_options --enable-artifact-build-symbols
unset CC
unset CXX
unset RUSTC
unset CARGO

ac_add_options --enable-debug
1 change: 0 additions & 1 deletion browser/config/mozconfigs/linux32/nightly
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ STRIP_FLAGS="--strip-debug"

ac_add_options --with-branding=browser/branding/nightly

. "$topsrcdir/build/mozconfig.rust"
. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
1 change: 0 additions & 1 deletion browser/config/mozconfigs/linux32/release
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ mk_add_options MOZ_PGO=1
# defines.sh during the beta cycle
export BUILDING_RELEASE=1

. "$topsrcdir/build/mozconfig.rust"
. "$topsrcdir/build/mozconfig.common.override"
2 changes: 2 additions & 0 deletions browser/config/mozconfigs/linux64/artifact
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ ac_add_options --enable-artifact-builds
ac_add_options --enable-artifact-build-symbols
unset CC
unset CXX
unset RUSTC
unset CARGO
1 change: 0 additions & 1 deletion browser/config/mozconfigs/linux64/beta
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ ac_add_options --enable-verify-mar

mk_add_options MOZ_PGO=1

. "$topsrcdir/build/mozconfig.rust"
. "$topsrcdir/build/mozconfig.common.override"
1 change: 0 additions & 1 deletion browser/config/mozconfigs/linux64/debug
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ export MOZ_PACKAGE_JSSHELL=1

ac_add_options --with-branding=browser/branding/nightly

. "$topsrcdir/build/mozconfig.rust"
. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
2 changes: 2 additions & 0 deletions browser/config/mozconfigs/linux64/debug-artifact
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ ac_add_options --enable-artifact-builds
ac_add_options --enable-artifact-build-symbols
unset CC
unset CXX
unset RUSTC
unset CARGO

ac_add_options --enable-debug

5 changes: 5 additions & 0 deletions browser/config/mozconfigs/linux64/hazards
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ CFLAGS="$CFLAGS -Wno-attributes"
CPPFLAGS="$CPPFLAGS -Wno-attributes"
CXXFLAGS="$CXXFLAGS -Wno-attributes"

# Override rust toolchain paths. In this build they're in $TOOLTOOL_DIR
# instead of $topsrcdir as referenced by mozconfig.common.
RUSTC=$TOOLTOOL_DIR/rustc/bin/rustc
CARGO=$TOOLTOOL_DIR/rustc/bin/cargo

export PKG_CONFIG_LIBDIR=/usr/lib64/pkgconfig:/usr/share/pkgconfig
. $topsrcdir/build/unix/mozconfig.gtk

Expand Down
1 change: 0 additions & 1 deletion browser/config/mozconfigs/linux64/nightly
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ STRIP_FLAGS="--strip-debug"

ac_add_options --with-branding=browser/branding/nightly

. "$topsrcdir/build/mozconfig.rust"
. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
1 change: 0 additions & 1 deletion browser/config/mozconfigs/linux64/release
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ mk_add_options MOZ_PGO=1
# defines.sh during the beta cycle
export BUILDING_RELEASE=1

. "$topsrcdir/build/mozconfig.rust"
. "$topsrcdir/build/mozconfig.common.override"
1 change: 0 additions & 1 deletion browser/config/mozconfigs/macosx-universal/beta
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ fi
ac_add_options --enable-official-branding
ac_add_options --enable-verify-mar

. "$topsrcdir/build/mozconfig.rust"
. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
1 change: 0 additions & 1 deletion browser/config/mozconfigs/macosx-universal/nightly
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ fi

ac_add_options --with-branding=browser/branding/nightly

. "$topsrcdir/build/mozconfig.rust"
. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
1 change: 0 additions & 1 deletion browser/config/mozconfigs/macosx-universal/release
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ ac_add_options --enable-verify-mar
# defines.sh during the beta cycle
export BUILDING_RELEASE=1

. "$topsrcdir/build/mozconfig.rust"
. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
2 changes: 2 additions & 0 deletions browser/config/mozconfigs/macosx64/artifact
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ ac_add_options --enable-artifact-builds
ac_add_options --enable-artifact-build-symbols
unset CC
unset CXX
unset RUSTC
unset CARGO
1 change: 0 additions & 1 deletion browser/config/mozconfigs/macosx64/beta
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ fi
ac_add_options --enable-official-branding
ac_add_options --enable-verify-mar

. "$topsrcdir/build/mozconfig.rust"
. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
1 change: 0 additions & 1 deletion browser/config/mozconfigs/macosx64/debug
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ export MOZ_PACKAGE_JSSHELL=1

ac_add_options --with-branding=browser/branding/nightly

. "$topsrcdir/build/mozconfig.rust"
. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
2 changes: 2 additions & 0 deletions browser/config/mozconfigs/macosx64/debug-artifact
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ ac_add_options --enable-artifact-builds
ac_add_options --enable-artifact-build-symbols
unset CC
unset CXX
unset RUSTC
unset CARGO

ac_add_options --enable-debug
1 change: 0 additions & 1 deletion browser/config/mozconfigs/macosx64/nightly
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ fi

ac_add_options --with-branding=browser/branding/nightly

. "$topsrcdir/build/mozconfig.rust"
. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"
1 change: 0 additions & 1 deletion browser/config/mozconfigs/macosx64/opt-static-analysis
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ ac_add_options --enable-dmd

ac_add_options --enable-clang-plugin

. "$topsrcdir/build/mozconfig.rust"
. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"

Loading

0 comments on commit 863e873

Please sign in to comment.