Skip to content

Commit

Permalink
merge mozilla-inbound to mozilla-central a=merge
Browse files Browse the repository at this point in the history
  • Loading branch information
BavarianTomcat committed May 10, 2016
2 parents 9e08ce7 + 0dc6d97 commit e699576
Show file tree
Hide file tree
Showing 620 changed files with 32,480 additions and 5,605 deletions.
7 changes: 0 additions & 7 deletions browser/base/content/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -6363,13 +6363,6 @@ function checkEmptyPageOrigin(browser = gBrowser.selectedBrowser,
return false;
}
let contentPrincipal = browser.contentPrincipal;
if (gMultiProcessBrowser && browser.isRemoteBrowser &&
!contentPrincipal && uri.spec == "about:blank") {
// Need to specialcase this because of how stopping an about:blank
// load from chrome on e10s causes a permanently null contentPrincipal,
// see bug 1249362.
return true;
}
// Not all principals have URIs...
if (contentPrincipal.URI) {
// A manually entered about:blank URI is slightly magical:
Expand Down
2 changes: 1 addition & 1 deletion browser/base/content/test/chat/browser.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'mulet' || e10s
skip-if = buildapp == 'mulet' || e10s # Bug 1270943
support-files =
head.js
chat.html
Expand Down
2 changes: 1 addition & 1 deletion browser/base/content/test/general/browser.ini
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ skip-if = os == "linux" || os == "mac" # No tabs in titlebar on linux
# Disabled on OS X because of bug 967917
[browser_tabfocus.js]
[browser_tabkeynavigation.js]
skip-if = (os == "mac" && !e10s)
skip-if = (os == "mac" && !e10s) # Bug 1237713 - OSX eats keypresses for some reason
[browser_tabopen_reflows.js]
[browser_tabs_close_beforeunload.js]
support-files =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
add_task(function* test_keyword_bookmarklet() {
let bm = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
title: "bookmarklet",
url: "javascript:1;" });
url: "javascript:'1';" });
let tab = gBrowser.selectedTab = gBrowser.addTab();
registerCleanupFunction (function* () {
gBrowser.removeTab(tab);
Expand All @@ -20,7 +20,7 @@ add_task(function* test_keyword_bookmarklet() {

let originalPrincipalURI = yield getPrincipalURI();

yield PlacesUtils.keywords.insert({ keyword: "bm", url: "javascript:1;" })
yield PlacesUtils.keywords.insert({ keyword: "bm", url: "javascript:'1';" })

// Enter bookmarklet keyword in the URL bar
gURLBar.value = "bm";
Expand Down
2 changes: 1 addition & 1 deletion browser/base/content/test/general/download_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
download="just some video" id="link3">Download "just some video"</a></li>
<li><a href="data:text/plain,test"
download="with-target.txt" id="link4">Download "with-target.txt"</a></li>
<li><a href="javascript:1+2"
<li><a href="javascript:(1+2)+''"
download="javascript.txt" id="link5">Download "javascript.txt"</a></li>
</ul>
<script>
Expand Down
2 changes: 1 addition & 1 deletion browser/base/content/test/general/mochitest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ support-files =
[test_bug364677.html]
[test_bug395533.html]
[test_offlineNotification.html]
skip-if = buildapp == 'mulet' || e10s # Bug 1066070 - I don't think either popup notifications nor addon install stuff works?
skip-if = buildapp == 'mulet' || e10s # Mulet: Bug 1066070; e10s: Bug 1257785
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<script>var q = 1;</script>
<script>var q = "1";</script>
<a href="javascript:q">Click me</a>
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ support-files =
[browser_aboutURLs.js]
[browser_usercontext.js]
[browser_usercontextid_tabdrop.js]
skip-if = os == "mac" || os == "win" # Intermittent failure - bug 1268276
[browser_windowName.js]
[browser_windowOpen.js]
[browser_serviceworkers.js]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ add_task(function* test() {
// reflect the received message on title
let receiveMsg = ContentTask.spawn(receiver.browser, channelName,
function (name) {
return new Promise(resolve => {
return new content.window.wrappedJSObject.Promise(resolve => {
content.window.bc = new content.window.BroadcastChannel(name);
content.window.bc.onmessage = function (e) {
content.document.title += e.data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,10 @@ function openTabInUserContext(uri, userContextId) {

add_task(function* setup() {
// make sure userContext is enabled.
SpecialPowers.pushPrefEnv({"set": [
["privacy.userContext.enabled", true]
]});
});

add_task(function* cleanup() {
// make sure we don't leave any prefs set for the next tests
registerCleanupFunction(function() {
SpecialPowers.popPrefEnv();
yield new Promise(resolve => {
SpecialPowers.pushPrefEnv({"set": [
["privacy.userContext.enabled", true]
]}, resolve);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,10 @@ function openTabInUserContext(uri, userContextId) {

add_task(function* setup() {
// make sure userContext is enabled.
SpecialPowers.pushPrefEnv({"set": [
["privacy.userContext.enabled", true]
]});
});

add_task(function* cleanup() {
// make sure we don't leave any prefs set for the next tests
registerCleanupFunction(function() {
SpecialPowers.popPrefEnv();
yield new Promise(resolve => {
SpecialPowers.pushPrefEnv({"set": [
["privacy.userContext.enabled", true]
]}, resolve);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,11 @@ const BASE_URI = "http://mochi.test:8888/browser/browser/components/"

add_task(function* setup() {
// make sure userContext is enabled.
SpecialPowers.pushPrefEnv({"set": [
["privacy.userContext.enabled", true],
["browser.link.open_newwindow", 3],
]});
});

add_task(function* cleanup() {
// make sure we don't leave any prefs set for the next tests
registerCleanupFunction(function() {
SpecialPowers.popPrefEnv();
yield new Promise(resolve => {
SpecialPowers.pushPrefEnv({"set": [
["privacy.userContext.enabled", true],
["browser.link.open_newwindow", 3],
]}, resolve);
});
});

Expand Down
29 changes: 16 additions & 13 deletions browser/components/newtab/tests/browser/browser_newtabmessages.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,37 @@
/* globals Cu, XPCOMUtils, Preferences, is, registerCleanupFunction, NewTabWebChannel, PlacesTestUtils */
/* globals Cu, XPCOMUtils, Preferences, is, registerCleanupFunction, NewTabWebChannel, PlacesTestUtils, Task */

"use strict";

Cu.import("resource://gre/modules/Preferences.jsm");
Cu.import("resource://gre/modules/Task.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "NewTabWebChannel",
"resource:///modules/NewTabWebChannel.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "NewTabMessages",
"resource:///modules/NewTabMessages.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PlacesTestUtils",
"resource://testing-common/PlacesTestUtils.jsm");

function setup() {
let setup = Task.async(function*() {
Preferences.set("browser.newtabpage.enhanced", true);
Preferences.set("browser.newtabpage.remote.mode", "test");
Preferences.set("browser.newtabpage.remote", true);
NewTabMessages.init();
}
yield PlacesTestUtils.clearHistory();
});

function cleanup() {
let cleanup = Task.async(function*() {
NewTabMessages.uninit();
Preferences.set("browser.newtabpage.remote", false);
Preferences.set("browser.newtabpage.remote.mode", "production");
}
});
registerCleanupFunction(cleanup);

/*
* Sanity tests for pref messages
*/
add_task(function* prefMessages_request() {
setup();
yield setup();

let testURL = "https://example.com/browser/browser/components/newtab/tests/browser/newtabmessages_prefs.html";

let tabOptions = {
Expand All @@ -54,14 +57,14 @@ add_task(function* prefMessages_request() {
Preferences.set("browser.newtabpage.enhanced", false);
yield prefChangeAck;
});
cleanup();
yield cleanup();
});

/*
* Sanity tests for preview messages
*/
add_task(function* previewMessages_request() {
setup();
yield setup();
var oldEnabledPref = Services.prefs.getBoolPref("browser.pagethumbnails.capturing_disabled");
Services.prefs.setBoolPref("browser.pagethumbnails.capturing_disabled", false);

Expand All @@ -82,15 +85,15 @@ add_task(function* previewMessages_request() {
yield BrowserTestUtils.withNewTab(tabOptions, function*() {
yield previewResponseAck;
});
cleanup();
yield cleanup();
Services.prefs.setBoolPref("browser.pagethumbnails.capturing_disabled", oldEnabledPref);
});

/*
* Sanity tests for places messages
*/
add_task(function* placesMessages_request() {
setup();
yield setup();
let testURL = "https://example.com/browser/browser/components/newtab/tests/browser/newtabmessages_places.html";

// url prefix for test history population
Expand Down Expand Up @@ -139,22 +142,22 @@ add_task(function* placesMessages_request() {
let placesResponseAck = new Promise(resolve => {
NewTabWebChannel.once("numItemsAck", (_, msg) => {
ok(true, "a request response has been received");
is(msg.data, visits.length + 1, "received an expect number of history items");
is(msg.data, visits.length + 1, "received an expected number of history items");
resolve();
});
});

yield BrowserTestUtils.withNewTab(tabOptions, function*() {
yield placesResponseAck;
ok(true, "a change response has been received");
let placesChangeAck = new Promise(resolve => {
NewTabWebChannel.once("clearHistoryAck", (_, msg) => {
ok(true, "a change response has been received");
is(msg.data, "clearHistory", "a clear history message has been received");
resolve();
});
});
yield PlacesTestUtils.clearHistory();
yield placesChangeAck;
});
cleanup();
yield cleanup();
});
5 changes: 2 additions & 3 deletions browser/components/safebrowsing/content/test/browser.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ support-files = head.js
[browser_forbidden.js]
[browser_bug400731.js]
[browser_bug415846.js]
skip-if = os == "mac" || e10s
# Disabled on Mac because of its bizarre special-and-unique
# snowflake of a help menu.
# Disabled on Mac because of its bizarre special-and-unique snowflake of a help menu.
skip-if = os == "mac" || e10s # e10s: Bug 1248632
[browser_whitelisted.js]
3 changes: 1 addition & 2 deletions browser/components/sessionstore/test/browser.ini
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ skip-if = buildapp == 'mulet'
[browser_pending_tabs.js]
[browser_privatetabs.js]
[browser_purge_shistory.js]
skip-if = e10s
skip-if = e10s # Bug 1271024
[browser_replace_load.js]
[browser_restore_redirect.js]
[browser_scrollPositions.js]
Expand Down Expand Up @@ -205,7 +205,6 @@ skip-if = true # Needs to be rewritten as Marionette test, bug 995916
[browser_739531.js]
[browser_739805.js]
[browser_819510_perwindowpb.js]
skip-if = os == "linux" || e10s # Linux: Intermittent failures, bug 894063; e10s: Bug 1079073

# Disabled for frequent intermittent failures
[browser_464620_a.js]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

// Test opening default mochitest-normal-private-normal-private windows
// (saving the state with last window being private)

requestLongerTimeout(2);

add_task(function* test_1() {
let win = yield promiseNewWindowLoaded();
win.gBrowser.addTab("http://www.example.com/1");
Expand Down
1 change: 0 additions & 1 deletion browser/components/translation/test/browser.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ support-files =
[browser_translation_bing.js]
[browser_translation_yandex.js]
[browser_translation_telemetry.js]
skip-if = e10s
[browser_translation_infobar.js]
[browser_translation_exceptions.js]
2 changes: 1 addition & 1 deletion browser/locales/en-US/chrome/overrides/netError.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ was trying to connect. -->

<!ENTITY certerror.pagetitle1 "Insecure Connection">
<!ENTITY certerror.whatShouldIDo.badStsCertExplanation "This site uses HTTP
Strict Transport Security (HSTS) to specify that &brandShortName; only connect
Strict Transport Security (HSTS) to specify that &brandShortName; may only connect
to it securely. As a result, it is not possible to add an exception for this
certificate.">
<!ENTITY certerror.copyToClipboard.label "Copy text to clipboard">
Expand Down
4 changes: 3 additions & 1 deletion browser/modules/LaterRun.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,11 @@ let LaterRun = {
if (pageData.url) {
let uri = null;
try {
uri = Services.io.newURI(pageData.url.trim(), null, null);
let urlString = Services.urlFormatter.formatURL(pageData.url.trim());
uri = Services.io.newURI(urlString, null, null);
} catch (ex) {
Cu.reportError("Invalid LaterRun page URL " + pageData.url + " ignored.");
continue;
}
if (!uri.schemeIs("https")) {
Cu.reportError("Insecure LaterRun page URL " + uri.spec + " ignored.");
Expand Down
11 changes: 9 additions & 2 deletions browser/modules/test/xpcshell/test_LaterRun.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource:///modules/LaterRun.jsm");

Services.prefs.setBoolPref(kEnabledPref, true);
Components.utils.import("resource://testing-common/AppInfo.jsm");
updateAppInfo();

add_task(function* test_page_applies() {
Services.prefs.setCharPref(kPagePrefRoot + "test_LaterRun_unittest.url", "https://www.mozilla.org/");
Services.prefs.setCharPref(kPagePrefRoot + "test_LaterRun_unittest.url", "https://www.mozilla.org/%VENDOR%/%NAME%/%ID%/%VERSION%/");
Services.prefs.setIntPref(kPagePrefRoot + "test_LaterRun_unittest.minimumHoursSinceInstall", 10);
Services.prefs.setIntPref(kPagePrefRoot + "test_LaterRun_unittest.minimumSessionCount", 3);

Expand All @@ -25,7 +27,12 @@ add_task(function* test_page_applies() {
Assert.equal(page.minimumHoursSinceInstall, 10, "Needs to have 10 hours since install");
Assert.equal(page.minimumSessionCount, 3, "Needs to have 3 sessions");
Assert.equal(page.requireBoth, false, "Either requirement is enough");
Assert.equal(page.url, "https://www.mozilla.org/", "URL is stored correctly");
let expectedURL = "https://www.mozilla.org/" +
Services.appinfo.vendor + "/" +
Services.appinfo.name + "/" +
Services.appinfo.ID + "/" +
Services.appinfo.version + "/";
Assert.equal(page.url, expectedURL, "URL is stored correctly");

Assert.ok(page.applies({hoursSinceInstall: 1, sessionCount: 3}),
"Applies when session count has been met.");
Expand Down
2 changes: 2 additions & 0 deletions build/virtualenv_packages.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
altgraph.pth:python/altgraph
marionette_driver.pth:testing/marionette/client
browsermobproxy.pth:testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py
wptserve.pth:testing/web-platform/tests/tools/wptserve
Expand All @@ -13,6 +14,7 @@ optional:setup.py:python/psutil:build_ext:--inplace
optional:psutil.pth:python/psutil
which.pth:python/which
ply.pth:other-licenses/ply/
macholib.pth:python/macholib
mock.pth:python/mock-1.0.0
mozilla.pth:build
mozilla.pth:config
Expand Down
1 change: 0 additions & 1 deletion devtools/client/canvasdebugger/test/browser.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ support-files =
[browser_canvas-frontend-img-thumbnails-01.js]
[browser_canvas-frontend-img-thumbnails-02.js]
[browser_canvas-frontend-open.js]
skip-if = e10s # bug 1102301 - leaks while running as a standalone directory in e10s mode
[browser_canvas-frontend-record-01.js]
[browser_canvas-frontend-record-02.js]
[browser_canvas-frontend-record-03.js]
Expand Down
Loading

0 comments on commit e699576

Please sign in to comment.