зеркало из https://github.com/mozilla/gecko-dev.git
Merge autoland to mozilla-central. a=merge
This commit is contained in:
Коммит
fcac574890
|
@ -25,9 +25,9 @@ git = "https://github.com/franziskuskiefer/cose-rust"
|
|||
rev = "43c22248d136c8b38fe42ea709d08da6355cf04b"
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source."git+https://github.com/gfx-rs/wgpu?rev=ff7b2c399301cca9bcbc5b19a869feb3c29ef785"]
|
||||
[source."git+https://github.com/gfx-rs/wgpu?rev=6dc9ccab8592645fda3204be1cfb5929fd7f924d"]
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
|
||||
rev = "6dc9ccab8592645fda3204be1cfb5929fd7f924d"
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source."git+https://github.com/hsivonen/chardetng?rev=3484d3e3ebdc8931493aa5df4d7ee9360a90e76b"]
|
||||
|
@ -60,9 +60,9 @@ git = "https://github.com/mozilla/audioipc"
|
|||
rev = "6be424d75f1367e70f2f5ddcacd6d0237e81a6a9"
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source."git+https://github.com/mozilla/cubeb-coreaudio-rs?rev=5d779af33219625a510df6bbc48a641b8a70bbc5"]
|
||||
[source."git+https://github.com/mozilla/cubeb-coreaudio-rs?rev=5fcea74fd20ff731306f0e6ebc7200d2c15abc3c"]
|
||||
git = "https://github.com/mozilla/cubeb-coreaudio-rs"
|
||||
rev = "5d779af33219625a510df6bbc48a641b8a70bbc5"
|
||||
rev = "5fcea74fd20ff731306f0e6ebc7200d2c15abc3c"
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source."git+https://github.com/mozilla/cubeb-pulse-rs?rev=c04c4d2c7f2291cb81a1c48f5a8c425748f18cd8"]
|
||||
|
|
|
@ -906,7 +906,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "coreaudio-sys-utils"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/mozilla/cubeb-coreaudio-rs?rev=5d779af33219625a510df6bbc48a641b8a70bbc5#5d779af33219625a510df6bbc48a641b8a70bbc5"
|
||||
source = "git+https://github.com/mozilla/cubeb-coreaudio-rs?rev=5fcea74fd20ff731306f0e6ebc7200d2c15abc3c#5fcea74fd20ff731306f0e6ebc7200d2c15abc3c"
|
||||
dependencies = [
|
||||
"core-foundation-sys",
|
||||
"coreaudio-sys",
|
||||
|
@ -1097,18 +1097,18 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "cubeb-backend"
|
||||
version = "0.10.3"
|
||||
version = "0.10.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8f80631cc1edd2f810162c7b8a68e465e948ad4c76ba47f100968bc911944a80"
|
||||
checksum = "3154aa90b995f098f7fade918a903c13e2c6acb96da7afed160c537f8ed29611"
|
||||
dependencies = [
|
||||
"cubeb-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cubeb-core"
|
||||
version = "0.10.4"
|
||||
version = "0.10.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4727331fcc9ab77948fe80166f99657290d09589ca0a6e0a948f63c790f09584"
|
||||
checksum = "da324c1b1487b3fe7b4048b2c797ddde9375e6cf72fb8b15ccdaf598182415b5"
|
||||
dependencies = [
|
||||
"bitflags 1.999.999",
|
||||
"cubeb-sys",
|
||||
|
@ -1117,7 +1117,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "cubeb-coreaudio"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/mozilla/cubeb-coreaudio-rs?rev=5d779af33219625a510df6bbc48a641b8a70bbc5#5d779af33219625a510df6bbc48a641b8a70bbc5"
|
||||
source = "git+https://github.com/mozilla/cubeb-coreaudio-rs?rev=5fcea74fd20ff731306f0e6ebc7200d2c15abc3c#5fcea74fd20ff731306f0e6ebc7200d2c15abc3c"
|
||||
dependencies = [
|
||||
"atomic",
|
||||
"audio-mixer",
|
||||
|
@ -1146,9 +1146,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "cubeb-sys"
|
||||
version = "0.10.3"
|
||||
version = "0.10.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d39f7f33260c72c5cbf5c59b294ae779f23569b6625bc5dea87ae254b2e949b6"
|
||||
checksum = "d028653f6b56c3b4af6dcc9adc35941e7433494bf29d1f69518a247db5a1cc8f"
|
||||
dependencies = [
|
||||
"cmake",
|
||||
"pkg-config",
|
||||
|
@ -1157,7 +1157,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "d3d12"
|
||||
version = "0.7.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=ff7b2c399301cca9bcbc5b19a869feb3c29ef785#ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=6dc9ccab8592645fda3204be1cfb5929fd7f924d#6dc9ccab8592645fda3204be1cfb5929fd7f924d"
|
||||
dependencies = [
|
||||
"bitflags 2.4.0",
|
||||
"libloading",
|
||||
|
@ -3794,7 +3794,7 @@ checksum = "a2983372caf4480544083767bf2d27defafe32af49ab4df3a0b7fc90793a3664"
|
|||
[[package]]
|
||||
name = "naga"
|
||||
version = "0.14.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=ff7b2c399301cca9bcbc5b19a869feb3c29ef785#ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=6dc9ccab8592645fda3204be1cfb5929fd7f924d#6dc9ccab8592645fda3204be1cfb5929fd7f924d"
|
||||
dependencies = [
|
||||
"bit-set",
|
||||
"bitflags 2.4.0",
|
||||
|
@ -4102,9 +4102,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.18.0"
|
||||
version = "1.19.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
|
||||
checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
|
||||
|
||||
[[package]]
|
||||
name = "oneshot-uniffi"
|
||||
|
@ -6410,7 +6410,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "wgpu-core"
|
||||
version = "0.18.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=ff7b2c399301cca9bcbc5b19a869feb3c29ef785#ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=6dc9ccab8592645fda3204be1cfb5929fd7f924d#6dc9ccab8592645fda3204be1cfb5929fd7f924d"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bit-vec",
|
||||
|
@ -6433,7 +6433,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "wgpu-hal"
|
||||
version = "0.18.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=ff7b2c399301cca9bcbc5b19a869feb3c29ef785#ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=6dc9ccab8592645fda3204be1cfb5929fd7f924d#6dc9ccab8592645fda3204be1cfb5929fd7f924d"
|
||||
dependencies = [
|
||||
"android_system_properties",
|
||||
"arrayvec",
|
||||
|
@ -6470,7 +6470,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "wgpu-types"
|
||||
version = "0.18.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=ff7b2c399301cca9bcbc5b19a869feb3c29ef785#ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=6dc9ccab8592645fda3204be1cfb5929fd7f924d#6dc9ccab8592645fda3204be1cfb5929fd7f924d"
|
||||
dependencies = [
|
||||
"bitflags 2.4.0",
|
||||
"js-sys",
|
||||
|
|
|
@ -52,6 +52,8 @@ resolver = "2"
|
|||
[workspace.dependencies]
|
||||
# Shared across multiple UniFFI consumers.
|
||||
uniffi = "0.25.3"
|
||||
# Shared across multiple application-services consumers.
|
||||
rusqlite = "0.29.0"
|
||||
|
||||
# Explicitly specify what our profiles use. The opt-level setting here is
|
||||
# a total fiction; see the setup of MOZ_RUST_DEFAULT_FLAGS for what the
|
||||
|
|
|
@ -34,6 +34,11 @@ let { Preferences } = ChromeUtils.importESModule(
|
|||
add_setup(async function () {
|
||||
await UrlClassifierTestUtils.addTestTrackers();
|
||||
|
||||
// Disable Report Broken Site, as it hides "Site not working?" when enabled.
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [["ui.new-webcompat-reporter.enabled", false]],
|
||||
});
|
||||
|
||||
registerCleanupFunction(() => {
|
||||
// Clear prefs that are touched in this test again for sanity.
|
||||
Services.prefs.clearUserPref(TP_PREF);
|
||||
|
|
|
@ -20,6 +20,10 @@ const ALWAYS_TRANSLATE_LANGS_PREF =
|
|||
const NEVER_TRANSLATE_LANGS_PREF =
|
||||
"browser.translations.neverTranslateLanguages";
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
TranslationsParent: "resource://gre/actors/TranslationsParent.sys.mjs",
|
||||
});
|
||||
|
||||
function Tree(aId, aData) {
|
||||
this._data = aData;
|
||||
this._tree = document.getElementById(aId);
|
||||
|
@ -103,18 +107,7 @@ var gTranslationsSettings = {
|
|||
}
|
||||
|
||||
// Load site permissions into an array.
|
||||
this._neverTranslateSites = [];
|
||||
for (const perm of Services.perms.getAllByTypes([
|
||||
TRANSLATIONS_PERMISSION,
|
||||
])) {
|
||||
if (perm.capability === Services.perms.DENY_ACTION) {
|
||||
this._neverTranslateSites.push(perm.principal.origin);
|
||||
}
|
||||
}
|
||||
let stripProtocol = s => s?.replace(/^\w+:/, "") || "";
|
||||
this._neverTranslateSites.sort((a, b) => {
|
||||
return stripProtocol(a).localeCompare(stripProtocol(b));
|
||||
});
|
||||
this._neverTranslateSites = TranslationsParent.listNeverTranslateSites();
|
||||
|
||||
// Load language tags into arrays.
|
||||
this._alwaysTranslateLangs = this.getAlwaysTranslateLanguages();
|
||||
|
@ -381,9 +374,7 @@ var gTranslationsSettings = {
|
|||
let removedNeverTranslateSites =
|
||||
this._neverTranslateSiteTree.getSelectedItems();
|
||||
for (let origin of removedNeverTranslateSites) {
|
||||
let principal =
|
||||
Services.scriptSecurityManager.createContentPrincipalFromOrigin(origin);
|
||||
Services.perms.removeFromPrincipal(principal, TRANSLATIONS_PERMISSION);
|
||||
TranslationsParent.setNeverTranslateSiteByOrigin(false, origin);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -419,9 +410,7 @@ var gTranslationsSettings = {
|
|||
);
|
||||
|
||||
for (let origin of removedNeverTranslateSites) {
|
||||
let principal =
|
||||
Services.scriptSecurityManager.createContentPrincipalFromOrigin(origin);
|
||||
Services.perms.removeFromPrincipal(principal, TRANSLATIONS_PERMISSION);
|
||||
TranslationsParent.setNeverTranslateSiteByOrigin(false, origin);
|
||||
}
|
||||
|
||||
this.onSelectNeverTranslateSite();
|
||||
|
|
|
@ -394,6 +394,15 @@ export var ReportBrokenSite = new (class ReportBrokenSite {
|
|||
reportSiteIssue.hidden = this.enabled || !this.reportSiteIssueEnabledPref;
|
||||
reportSiteIssue.disabled = !canReportUrl;
|
||||
}
|
||||
|
||||
// "Site not working?" on the protections panel should be hidden when
|
||||
// Report Broken Site is visible (bug 1868527).
|
||||
const siteNotWorking = document.getElementById(
|
||||
"protections-popup-tp-switch-section-footer"
|
||||
);
|
||||
if (siteNotWorking) {
|
||||
siteNotWorking.hidden = this.enabled;
|
||||
}
|
||||
}
|
||||
|
||||
#checkPrefs(whichChanged) {
|
||||
|
|
|
@ -15,6 +15,8 @@ support-files = [
|
|||
|
||||
["browser_report_site_issue_fallback.js"]
|
||||
|
||||
["browser_site_not_working_fallback.js"]
|
||||
|
||||
["browser_send_more_info.js"]
|
||||
|
||||
["browser_back_buttons.js"]
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
/* Tests that when Report Broken Site is active,
|
||||
* "Site not working?" is hidden on the protections panel.
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
add_common_setup();
|
||||
|
||||
const TP_PREF = "privacy.trackingprotection.enabled";
|
||||
|
||||
const TRACKING_PAGE =
|
||||
"https://tracking.example.org/browser/browser/base/content/test/protectionsUI/trackingPage.html";
|
||||
|
||||
const SITE_NOT_WORKING = "protections-popup-tp-switch-section-footer";
|
||||
|
||||
add_task(async function testSiteNotWorking() {
|
||||
await SpecialPowers.pushPrefEnv({ set: [[TP_PREF, true]] });
|
||||
await BrowserTestUtils.withNewTab(TRACKING_PAGE, async function () {
|
||||
const menu = ProtectionsPanel();
|
||||
|
||||
ensureReportBrokenSitePreffedOn();
|
||||
await menu.open();
|
||||
const siteNotWorking = document.getElementById(SITE_NOT_WORKING);
|
||||
isMenuItemHidden(siteNotWorking, "Site not working is hidden");
|
||||
await menu.close();
|
||||
|
||||
ensureReportBrokenSitePreffedOff();
|
||||
await menu.open();
|
||||
isMenuItemEnabled(siteNotWorking, "Site not working is shown");
|
||||
await menu.close();
|
||||
});
|
||||
});
|
|
@ -340,6 +340,7 @@ export class UrlbarController {
|
|||
}
|
||||
// Fall through, we want the SPACE key to activate this element.
|
||||
case KeyEvent.DOM_VK_RETURN:
|
||||
this.logger.debug(`Enter pressed${executeAction ? "" : " delayed"}`);
|
||||
if (executeAction) {
|
||||
this.input.handleCommand(event);
|
||||
}
|
||||
|
|
|
@ -284,6 +284,10 @@ export class UrlbarInput {
|
|||
|
||||
this.editor.newlineHandling =
|
||||
Ci.nsIEditor.eNewlinesStripSurroundingWhitespace;
|
||||
|
||||
ChromeUtils.defineLazyGetter(this, "logger", () =>
|
||||
lazy.UrlbarUtils.getLogger({ prefix: "Input" })
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -881,6 +885,9 @@ export class UrlbarInput {
|
|||
*/
|
||||
pickElement(element, event) {
|
||||
let result = this.view.getResultFromElement(element);
|
||||
this.logger.debug(
|
||||
`pickElement ${element} with event ${event?.type}, result: ${result}`
|
||||
);
|
||||
if (!result) {
|
||||
return;
|
||||
}
|
||||
|
@ -3284,6 +3291,7 @@ export class UrlbarInput {
|
|||
}
|
||||
|
||||
_on_blur(event) {
|
||||
this.logger.debug("Blur Event");
|
||||
// We cannot count every blur events after a missed engagement as abandoment
|
||||
// because the user may have clicked on some view element that executes
|
||||
// a command causing a focus change. For example opening preferences from
|
||||
|
@ -3399,6 +3407,7 @@ export class UrlbarInput {
|
|||
}
|
||||
|
||||
_on_focus(event) {
|
||||
this.logger.debug("Focus Event");
|
||||
if (!this._hideFocus) {
|
||||
this.setAttribute("focused", "true");
|
||||
}
|
||||
|
|
|
@ -77,7 +77,6 @@ export class UrlbarView {
|
|||
this.document = this.panel.ownerDocument;
|
||||
this.window = this.document.defaultView;
|
||||
|
||||
this.#mainContainer = this.panel.querySelector(".urlbarView-body-inner");
|
||||
this.#rows = this.panel.querySelector(".urlbarView-results");
|
||||
this.resultMenu = this.panel.querySelector(".urlbarView-result-menu");
|
||||
this.#resultMenuCommands = new WeakMap();
|
||||
|
@ -770,7 +769,7 @@ export class UrlbarView {
|
|||
);
|
||||
}
|
||||
|
||||
if (!this.selectedElement && !this.oneOffSearchButtons.selectedButton) {
|
||||
if (!this.#selectedElement && !this.oneOffSearchButtons.selectedButton) {
|
||||
if (firstResult.heuristic) {
|
||||
// Select the heuristic result. The heuristic may not be the first
|
||||
// result added, which is why we do this check here when each result is
|
||||
|
@ -820,10 +819,10 @@ export class UrlbarView {
|
|||
|
||||
// If we update the selected element, a new unique ID is generated for it.
|
||||
// We need to ensure that aria-activedescendant reflects this new ID.
|
||||
if (this.selectedElement && !this.oneOffSearchButtons.selectedButton) {
|
||||
if (this.#selectedElement && !this.oneOffSearchButtons.selectedButton) {
|
||||
let aadID = this.input.inputField.getAttribute("aria-activedescendant");
|
||||
if (aadID && !this.document.getElementById(aadID)) {
|
||||
this.#setAccessibleFocus(this.selectedElement);
|
||||
this.#setAccessibleFocus(this.#selectedElement);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -866,13 +865,13 @@ export class UrlbarView {
|
|||
return;
|
||||
}
|
||||
|
||||
let updateSelection = rowToRemove == this.#getSelectedRow();
|
||||
rowToRemove.remove();
|
||||
this.#updateIndices();
|
||||
|
||||
if (rowToRemove != this.#getSelectedRow()) {
|
||||
if (!updateSelection) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Select the row at the same index, if possible.
|
||||
let newSelectionIndex = index;
|
||||
if (index >= this.#queryContext.results.length) {
|
||||
|
@ -1040,7 +1039,6 @@ export class UrlbarView {
|
|||
#blobUrlsByResultUrl = null;
|
||||
#inputWidthOnLastClose = 0;
|
||||
#l10nCache;
|
||||
#mainContainer;
|
||||
#mousedownSelectedElement;
|
||||
#openPanelInstance;
|
||||
#oneOffSearchButtons;
|
||||
|
@ -1052,9 +1050,22 @@ export class UrlbarView {
|
|||
#resultMenuResult;
|
||||
#resultMenuCommands;
|
||||
#rows;
|
||||
#selectedElement;
|
||||
#rawSelectedElement;
|
||||
#zeroPrefixStopwatchInstance = null;
|
||||
|
||||
/**
|
||||
* #rawSelectedElement may be disconnected from the DOM (e.g. it was remove()d)
|
||||
* but we want a connected #selectedElement usually. We don't use a WeakRef
|
||||
* because it would depend too much on GC timing.
|
||||
*
|
||||
* @returns {DOMElement} the selected element.
|
||||
*/
|
||||
get #selectedElement() {
|
||||
return this.#rawSelectedElement?.isConnected
|
||||
? this.#rawSelectedElement
|
||||
: null;
|
||||
}
|
||||
|
||||
#createElement(name) {
|
||||
return this.document.createElementNS("http://www.w3.org/1999/xhtml", name);
|
||||
}
|
||||
|
@ -1622,7 +1633,8 @@ export class UrlbarView {
|
|||
!lazy.ObjectUtils.deepEqual(
|
||||
oldResult.payload.buttons,
|
||||
result.payload.buttons
|
||||
);
|
||||
) ||
|
||||
result.testForceNewContent;
|
||||
|
||||
if (needsNewContent) {
|
||||
while (item.lastChild) {
|
||||
|
@ -2364,7 +2376,7 @@ export class UrlbarView {
|
|||
}
|
||||
|
||||
this.#setAccessibleFocus(setAccessibleFocus && element);
|
||||
this.#selectedElement = element;
|
||||
this.#rawSelectedElement = element;
|
||||
|
||||
if (updateInput) {
|
||||
let urlOverride = null;
|
||||
|
|
|
@ -1478,6 +1478,8 @@ class TestProvider extends UrlbarProvider {
|
|||
* {@link UrlbarView.#selectElement} method is called.
|
||||
* @param {Function} [options.onEngagement]
|
||||
* If given, a function that will be called when engagement.
|
||||
* @param {Function} [options.delayResultsPromise]
|
||||
* If given, we'll await on this before returning results.
|
||||
*/
|
||||
constructor({
|
||||
results,
|
||||
|
@ -1488,7 +1490,13 @@ class TestProvider extends UrlbarProvider {
|
|||
onCancel = null,
|
||||
onSelection = null,
|
||||
onEngagement = null,
|
||||
delayResultsPromise = null,
|
||||
} = {}) {
|
||||
if (delayResultsPromise && addTimeout) {
|
||||
throw new Error(
|
||||
"Can't provide both `addTimeout` and `delayResultsPromise`"
|
||||
);
|
||||
}
|
||||
super();
|
||||
this._results = results;
|
||||
this._name = name;
|
||||
|
@ -1498,6 +1506,12 @@ class TestProvider extends UrlbarProvider {
|
|||
this._onCancel = onCancel;
|
||||
this._onSelection = onSelection;
|
||||
this._onEngagement = onEngagement;
|
||||
this._delayResultsPromise = delayResultsPromise;
|
||||
// As this has been a common source of mistakes, auto-upgrade the provider
|
||||
// type to heuristic if any result is heuristic.
|
||||
if (!type && this._results?.some(r => r.heuristic)) {
|
||||
this._type = UrlbarUtils.PROVIDER_TYPE.HEURISTIC;
|
||||
}
|
||||
}
|
||||
get name() {
|
||||
return this._name;
|
||||
|
@ -1515,6 +1529,9 @@ class TestProvider extends UrlbarProvider {
|
|||
if (!this._results.length && this._addTimeout) {
|
||||
await new Promise(resolve => lazy.setTimeout(resolve, this._addTimeout));
|
||||
}
|
||||
if (this._delayResultsPromise) {
|
||||
await this._delayResultsPromise;
|
||||
}
|
||||
for (let result of this._results) {
|
||||
if (!this._addTimeout) {
|
||||
addCallback(this, result);
|
||||
|
|
|
@ -666,6 +666,8 @@ support-files = ["file_userTypedValue.html"]
|
|||
|
||||
["browser_view_emptyResultSet.js"]
|
||||
|
||||
["browser_view_removedSelectedElement.js"]
|
||||
|
||||
["browser_view_resultDisplay.js"]
|
||||
|
||||
["browser_view_resultTypes_display.js"]
|
||||
|
|
|
@ -0,0 +1,87 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
// Tests that if the selectedElement is removed from the DOM, the view still
|
||||
// sets a selection on the next received results.
|
||||
|
||||
add_task(async function () {
|
||||
let view = gURLBar.view;
|
||||
// We need a heuristic provider that the Muxer will prefer over other
|
||||
// heuristics and that will return results after the first onQueryResults.
|
||||
// Luckily TEST providers come first in the heuristic group!
|
||||
let result = new UrlbarResult(
|
||||
UrlbarUtils.RESULT_TYPE.URL,
|
||||
UrlbarUtils.RESULT_SOURCE.OTHER_LOCAL,
|
||||
{ url: "https://example.com/1", title: "example" }
|
||||
);
|
||||
result.heuristic = true;
|
||||
// To ensure the selectedElement is removed, we use this special property that
|
||||
// asks the view to generate new content for the row.
|
||||
result.testForceNewContent = true;
|
||||
|
||||
let receivedResults = false;
|
||||
let firstSelectedElement;
|
||||
let delayResultsPromise = new Promise(resolve => {
|
||||
gURLBar.controller.addQueryListener({
|
||||
async onQueryResults(queryContext) {
|
||||
Assert.ok(!receivedResults, "Should execute only once");
|
||||
gURLBar.controller.removeQueryListener(this);
|
||||
receivedResults = true;
|
||||
// Store the corrent selection.
|
||||
firstSelectedElement = view.selectedElement;
|
||||
Assert.ok(firstSelectedElement, "There should be a selected element");
|
||||
Assert.ok(
|
||||
view.selectedResult.heuristic,
|
||||
"Selected result should be a heuristic"
|
||||
);
|
||||
Assert.notEqual(
|
||||
result,
|
||||
view.selectedResult,
|
||||
"Should not immediately select our result"
|
||||
);
|
||||
resolve();
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
let delayedHeuristicProvider = new UrlbarTestUtils.TestProvider({
|
||||
delayResultsPromise,
|
||||
results: [result],
|
||||
type: UrlbarUtils.PROVIDER_TYPE.HEURISTIC,
|
||||
});
|
||||
UrlbarProvidersManager.registerProvider(delayedHeuristicProvider);
|
||||
registerCleanupFunction(async function () {
|
||||
UrlbarProvidersManager.unregisterProvider(delayedHeuristicProvider);
|
||||
await UrlbarTestUtils.promisePopupClose(window);
|
||||
gURLBar.handleRevert();
|
||||
});
|
||||
|
||||
await UrlbarTestUtils.promiseAutocompleteResultPopup({
|
||||
window,
|
||||
value: "exa",
|
||||
});
|
||||
Assert.ok(receivedResults, "Results observer was invoked");
|
||||
Assert.ok(
|
||||
UrlbarTestUtils.getResultCount(window) > 0,
|
||||
`There should be some results in the view.`
|
||||
);
|
||||
Assert.ok(view.isOpen, `The view should be open.`);
|
||||
Assert.ok(view.selectedElement.isConnected, "selectedElement is connected");
|
||||
Assert.equal(view.selectedElementIndex, 0, "selectedElementIndex is correct");
|
||||
Assert.deepEqual(
|
||||
view.getResultFromElement(view.selectedElement),
|
||||
result,
|
||||
"result is the expected one"
|
||||
);
|
||||
Assert.notEqual(
|
||||
view.selectedElement,
|
||||
firstSelectedElement,
|
||||
"Selected element should have changed"
|
||||
);
|
||||
Assert.ok(
|
||||
!firstSelectedElement.isConnected,
|
||||
"Previous selected element should be disconnected"
|
||||
);
|
||||
});
|
|
@ -1004,7 +1004,7 @@ forms-ask-to-save-passwords =
|
|||
.label = Ask to save passwords
|
||||
.accesskey = A
|
||||
forms-exceptions =
|
||||
.label = Exceptions
|
||||
.label = Exceptions…
|
||||
.accesskey = x
|
||||
forms-suggest-passwords =
|
||||
.label = Suggest strong passwords
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "2ee934e95c1d93839f9ee8970377cd4577433b06"
|
||||
"revision": "e9997ef317db92db8520d1f30e0e5fe560e39947"
|
||||
},
|
||||
"af": {
|
||||
"pin": false,
|
||||
|
@ -51,7 +51,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "386b4325df282e483cde3cc39e26859335e0d655"
|
||||
"revision": "776fd3a51415b53096873e5280d3fc70a4c57454"
|
||||
},
|
||||
"ar": {
|
||||
"pin": false,
|
||||
|
@ -69,7 +69,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "485b1df890719acce9b536d04f249e0bacb6c552"
|
||||
"revision": "15ce3a7a257004007c4a8258955033467c9d8649"
|
||||
},
|
||||
"ast": {
|
||||
"pin": false,
|
||||
|
@ -105,7 +105,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "d9b4d86b544dc0c086ad6cdb6dbb5c97fbfc2dc1"
|
||||
"revision": "7a8c67f75d8c25888f505d263d41c08f1092d321"
|
||||
},
|
||||
"be": {
|
||||
"pin": false,
|
||||
|
@ -123,7 +123,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "d05b3c5f3f636bef1ad506d9a3c1b60bbb505c78"
|
||||
"revision": "5013917650731c9b6f00e5ca0966a2afe372a863"
|
||||
},
|
||||
"bg": {
|
||||
"pin": false,
|
||||
|
@ -141,7 +141,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "c3a06db6bfbe01aec358085e29b207dd3d6ab536"
|
||||
"revision": "5efd680c44425c0d72d2d1d1431d2963a0d36950"
|
||||
},
|
||||
"bn": {
|
||||
"pin": false,
|
||||
|
@ -159,7 +159,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "ba632ecbc814accaddc8d1ea4d7d676f1a630da6"
|
||||
"revision": "75d5bb746597b8ae7faf1fb4f1b69f3baa5dd26e"
|
||||
},
|
||||
"bo": {
|
||||
"pin": false,
|
||||
|
@ -177,7 +177,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "14b1f472b65cb78119570d494aa7d95d3293b40c"
|
||||
"revision": "4b15979635810ef244348e380bc47bf53934db38"
|
||||
},
|
||||
"br": {
|
||||
"pin": false,
|
||||
|
@ -195,7 +195,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "4b19c989ddf18a4b0b15813cbc4cc3df6424896a"
|
||||
"revision": "80f38663b5eaf596581c88ab0905f1a4d2ba4bd3"
|
||||
},
|
||||
"brx": {
|
||||
"pin": false,
|
||||
|
@ -231,7 +231,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "9e617fa6a6a7ef90619bea5a320d92e9ec9053ac"
|
||||
"revision": "51bda78a88671d7c75547555b01ac432cc504f81"
|
||||
},
|
||||
"ca": {
|
||||
"pin": false,
|
||||
|
@ -249,7 +249,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "e2f0505e3bb05aad5092e306493681636e8b07ce"
|
||||
"revision": "e305c2869d48c4908fe15e4aa9e80a15c9fb667f"
|
||||
},
|
||||
"ca-valencia": {
|
||||
"pin": false,
|
||||
|
@ -267,7 +267,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "f507a46a36593502f9baff6470d3ac79b31adfff"
|
||||
"revision": "8048ccdbb32e5eadba85d4cf621a2f1d6f748ac1"
|
||||
},
|
||||
"cak": {
|
||||
"pin": false,
|
||||
|
@ -285,7 +285,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "c7d19608627df83992f0621ba35aca8905b67166"
|
||||
"revision": "04d164328fe67ed495fb6c8398a86a825c48a8fd"
|
||||
},
|
||||
"ckb": {
|
||||
"pin": false,
|
||||
|
@ -321,7 +321,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "ac62dfe17dcc0fd1ee2d7d9baade6d6a43eb7b38"
|
||||
"revision": "201461be516ba8b1fe4ea4fd97e8009feabe971f"
|
||||
},
|
||||
"cy": {
|
||||
"pin": false,
|
||||
|
@ -339,7 +339,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "e7a3bb760ffda85d00639796dcef7b6b9ca4f339"
|
||||
"revision": "ac08a497baf7b00cd5d27a8f5fc3a80fe2f1dffc"
|
||||
},
|
||||
"da": {
|
||||
"pin": false,
|
||||
|
@ -357,7 +357,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "4a879dd8cac235f307fc392db37f2d793bd4603c"
|
||||
"revision": "f0f7c9eba22147435d7cad68d61ede53a79d16b4"
|
||||
},
|
||||
"de": {
|
||||
"pin": false,
|
||||
|
@ -375,7 +375,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "96d15d0f682d3e5f572105f1764979423104a2f4"
|
||||
"revision": "21add17e3741c3037ff314f9a615326528ed43c7"
|
||||
},
|
||||
"dsb": {
|
||||
"pin": false,
|
||||
|
@ -393,7 +393,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "3902de3d6ceaf5fd67cb682b6b301e676c9e9565"
|
||||
"revision": "b2e6c6f30930ccdf7f8f45b86c1f782757e98626"
|
||||
},
|
||||
"el": {
|
||||
"pin": false,
|
||||
|
@ -411,7 +411,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "b967588fa31afdcad8c58418699fc4e6c22441b7"
|
||||
"revision": "7407ce8beac7d54b34c831ca7f6a8f36d189bfbc"
|
||||
},
|
||||
"en-CA": {
|
||||
"pin": false,
|
||||
|
@ -429,7 +429,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "b00de19e424870f29ace6a833ef270dee8376882"
|
||||
"revision": "f39e1c5717da2b5208baf41fc4fade1f8b527566"
|
||||
},
|
||||
"en-GB": {
|
||||
"pin": false,
|
||||
|
@ -447,7 +447,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "e838a6841a8a80b849f719ce427ea10f65ff3c3a"
|
||||
"revision": "7f94be3b6717521355e19c3b90f76614efa44b5e"
|
||||
},
|
||||
"eo": {
|
||||
"pin": false,
|
||||
|
@ -465,7 +465,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "c37ddafcf5eb5734db668444376ed2fa96fb050a"
|
||||
"revision": "6f16a84235f32044cb2f674c6ff04a5beff43ea8"
|
||||
},
|
||||
"es-AR": {
|
||||
"pin": false,
|
||||
|
@ -483,7 +483,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "51295b88b8a36806b67831d39e7b35aa83b204ff"
|
||||
"revision": "038cab4735ad53384cfb7aee53b1ea9eff12fd42"
|
||||
},
|
||||
"es-CL": {
|
||||
"pin": false,
|
||||
|
@ -501,7 +501,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "1e75679a1578105c1ba850f7860231615e9f046c"
|
||||
"revision": "0486bb559a33700e8b630f1ccd469ff4311ec08b"
|
||||
},
|
||||
"es-ES": {
|
||||
"pin": false,
|
||||
|
@ -519,7 +519,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "c8391cdf284f01cbd534584cb808f648844a6e91"
|
||||
"revision": "f8f031751ab99130996e619dec0ec6f40b2bf2dd"
|
||||
},
|
||||
"es-MX": {
|
||||
"pin": false,
|
||||
|
@ -537,7 +537,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "30f1be5fafd12eb5ca70b56cb05662ea28540992"
|
||||
"revision": "5a2b5221481bec0ecbd421adda87d402c2f4c1eb"
|
||||
},
|
||||
"et": {
|
||||
"pin": false,
|
||||
|
@ -555,7 +555,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "fe09124261ee3e11c142ddf05ab7aab0ddf5e496"
|
||||
"revision": "486d5f610c2e09122969b6d6b81fdf8a0a8e18fb"
|
||||
},
|
||||
"eu": {
|
||||
"pin": false,
|
||||
|
@ -573,7 +573,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "f8c06e2b5fc30efd980975034daf85395f0ef556"
|
||||
"revision": "067eb940d3ef949035e1b06cda6a7bae4a94998f"
|
||||
},
|
||||
"fa": {
|
||||
"pin": false,
|
||||
|
@ -591,7 +591,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6ae80b2760068e5a660dae17fc716e719e9628de"
|
||||
"revision": "7a59a703ab412429f230fd1cc13d5651c0ba9919"
|
||||
},
|
||||
"ff": {
|
||||
"pin": false,
|
||||
|
@ -609,7 +609,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "e67800fc01b5576a0e96b670be89773d7b69c245"
|
||||
"revision": "8537e97f8b324d28629531aa63fdf73ad1bab2c6"
|
||||
},
|
||||
"fi": {
|
||||
"pin": false,
|
||||
|
@ -627,7 +627,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "28438cca75ddfe601322cd1359c76a88e1e43179"
|
||||
"revision": "bf7f836cde2680affd0ba6e807aabd1852c72605"
|
||||
},
|
||||
"fr": {
|
||||
"pin": false,
|
||||
|
@ -645,7 +645,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "11934ee62516fa29ff02e9f282adc92279a0393a"
|
||||
"revision": "e441e7c0a5fbced86586f56382edfc1398520950"
|
||||
},
|
||||
"fur": {
|
||||
"pin": false,
|
||||
|
@ -663,7 +663,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "7b03163343a279df9ae86da52e502cefde7a100a"
|
||||
"revision": "ea36c8f688d5771eab76231bf1b33834464b4bd5"
|
||||
},
|
||||
"fy-NL": {
|
||||
"pin": false,
|
||||
|
@ -681,7 +681,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "da12121e62d142ca1f0adf30653468cfcfd1d747"
|
||||
"revision": "bdf59c16d392fcc9c32438faba14bdce3ea64f97"
|
||||
},
|
||||
"ga-IE": {
|
||||
"pin": false,
|
||||
|
@ -717,7 +717,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "4b85dea934ef10427138e93495b20acdc3ef8022"
|
||||
"revision": "c4bf4efbd028bce4ac8c6c3cf36c6c09badf00f8"
|
||||
},
|
||||
"gl": {
|
||||
"pin": false,
|
||||
|
@ -735,7 +735,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "5700336bb3f6cbdb98f38434c97febac0b16e935"
|
||||
"revision": "5687cdf2c455dcbe12b213467c04ba5de2bcb360"
|
||||
},
|
||||
"gn": {
|
||||
"pin": false,
|
||||
|
@ -753,7 +753,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "992692e5effcfd46bea95d414f53ca336a7adcd2"
|
||||
"revision": "8c5cfc7af14350c30ad24e1c2f248ef695d370d6"
|
||||
},
|
||||
"gu-IN": {
|
||||
"pin": false,
|
||||
|
@ -771,7 +771,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "a0c3b4ec8e2fb78285b4d9fb10fa3d3138ef3219"
|
||||
"revision": "6ee9418f079f3ba64fc06af10a64a632a56cee9c"
|
||||
},
|
||||
"he": {
|
||||
"pin": false,
|
||||
|
@ -789,7 +789,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "4e518ab4100e2332abfd762404874a8314d8e1c3"
|
||||
"revision": "673b0d1a6cb0aaf8111b178f635561e5869146d7"
|
||||
},
|
||||
"hi-IN": {
|
||||
"pin": false,
|
||||
|
@ -807,7 +807,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "b2acb29b31eb89f65db1052431eb867940a3a5ae"
|
||||
"revision": "e4868d5a2bcad10d72f917c8eb83cdad6e3e6d02"
|
||||
},
|
||||
"hr": {
|
||||
"pin": false,
|
||||
|
@ -825,7 +825,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "78e475ccc748fda1aa7c468fa0499c02b934885f"
|
||||
"revision": "22d4b3449d679b4a6f2e8d649692f1e373fd0c04"
|
||||
},
|
||||
"hsb": {
|
||||
"pin": false,
|
||||
|
@ -843,7 +843,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "5751ed44491de372cc301459b1c37a962b902376"
|
||||
"revision": "b4d78d2146a135a460da20176b89c0174f13084e"
|
||||
},
|
||||
"hu": {
|
||||
"pin": false,
|
||||
|
@ -861,7 +861,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "8c86a7fbb71220b5071dbfcff276f0bc91450890"
|
||||
"revision": "44b1cf00f78e6549b9073551cda94ff266a3b0fc"
|
||||
},
|
||||
"hy-AM": {
|
||||
"pin": false,
|
||||
|
@ -879,7 +879,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "b8aa18d38d2ed30f053025b64b9ce841d25f49da"
|
||||
"revision": "c471a58f0308d80aa6ae387c49f1927abdd977f3"
|
||||
},
|
||||
"hye": {
|
||||
"pin": false,
|
||||
|
@ -897,7 +897,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "4a3c272135397bcb20e8e5e9f63963a6604f513f"
|
||||
"revision": "e2c7961cf5c19da48de158204a4a4b1eaab78580"
|
||||
},
|
||||
"ia": {
|
||||
"pin": false,
|
||||
|
@ -915,7 +915,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "dcde23c562263ed989687398d861fbb36867e2e1"
|
||||
"revision": "cea6b4820c7f1390650df62b96550a06b666c0de"
|
||||
},
|
||||
"id": {
|
||||
"pin": false,
|
||||
|
@ -933,7 +933,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "c46a0360db3bcc5af4d96107c5c0006a89a54120"
|
||||
"revision": "b109fe3ba694a4821c326bc253e33d5181aed240"
|
||||
},
|
||||
"is": {
|
||||
"pin": false,
|
||||
|
@ -951,7 +951,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "12c60eb36d3d4c8ef491bf4a1d8c8f1aa4b814df"
|
||||
"revision": "cf197e34c7b814fafcdac49073c4f1c541c187c7"
|
||||
},
|
||||
"it": {
|
||||
"pin": false,
|
||||
|
@ -969,7 +969,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "4ccc476c71d149226f4b7147602965141d8c3c92"
|
||||
"revision": "f0fd9e0e9e039bc12a0ac43284daa8e295bba5ea"
|
||||
},
|
||||
"ja": {
|
||||
"pin": false,
|
||||
|
@ -985,7 +985,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "b647dcfff5e538ae47d88289c100880badd6ae66"
|
||||
"revision": "1963b9269b68f26635ce030d36f07432e63ef76c"
|
||||
},
|
||||
"ja-JP-mac": {
|
||||
"pin": false,
|
||||
|
@ -993,7 +993,7 @@
|
|||
"macosx64",
|
||||
"macosx64-devedition"
|
||||
],
|
||||
"revision": "5e3bf8f3379ddf97d49944a79ce6116e85533225"
|
||||
"revision": "04c497bbdad9f279c9274a6f092c53933216cb4d"
|
||||
},
|
||||
"ka": {
|
||||
"pin": false,
|
||||
|
@ -1011,7 +1011,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "3d43e2589f84e4ea1f3909496c65a4a42a4b409e"
|
||||
"revision": "0dff947b108a1d544642faedfce26709db34cd57"
|
||||
},
|
||||
"kab": {
|
||||
"pin": false,
|
||||
|
@ -1029,7 +1029,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "f5e7ba1bca08b2e2e49c649c7eb24d97591e5250"
|
||||
"revision": "ea7a9ea0960b29774f2c83f95e9972863a221358"
|
||||
},
|
||||
"kk": {
|
||||
"pin": false,
|
||||
|
@ -1047,7 +1047,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "1e81fe35cc48161147ede29930223d3294a70ab6"
|
||||
"revision": "6f2c7c022b2b824189434759e13ab4b6e48de5bb"
|
||||
},
|
||||
"km": {
|
||||
"pin": false,
|
||||
|
@ -1101,7 +1101,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "599dc608481254aac7423cb18e65e9e6787cca7e"
|
||||
"revision": "cac46198a7675f91bdaf328ff412bf8804b92d77"
|
||||
},
|
||||
"lij": {
|
||||
"pin": false,
|
||||
|
@ -1119,7 +1119,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "02d092f0f3a6907d8d7ae109c89518d398e77935"
|
||||
"revision": "be237bfbd277483c4e510ca6009ad21ae55232e0"
|
||||
},
|
||||
"lo": {
|
||||
"pin": false,
|
||||
|
@ -1137,7 +1137,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "27ec45c2f0583e052c2950d5994bcb3540766fc1"
|
||||
"revision": "5746547bc73a59b0265c47d6e8726f50a41031e6"
|
||||
},
|
||||
"lt": {
|
||||
"pin": false,
|
||||
|
@ -1155,7 +1155,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "346380105c98907c66276f50b80c77e3945063f1"
|
||||
"revision": "41c626be1907f2e64a59b1dcfbafa5c0e10b6ea0"
|
||||
},
|
||||
"ltg": {
|
||||
"pin": false,
|
||||
|
@ -1173,7 +1173,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "78b19a48eddb4ecc92e28e3ce079d9d410706dfc"
|
||||
"revision": "e44eb1ecc86e6cc1830334ac8128cbcd6ddb63b6"
|
||||
},
|
||||
"lv": {
|
||||
"pin": false,
|
||||
|
@ -1191,7 +1191,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "0ea3697876c3926c3c39a05865e34e81755300d7"
|
||||
"revision": "09e1fe6ddaa3e03bd90f45b9e86eb7c97336df9f"
|
||||
},
|
||||
"meh": {
|
||||
"pin": false,
|
||||
|
@ -1245,7 +1245,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "96360223571b005cfb76ef43b9047ada71ca282e"
|
||||
"revision": "c7145c0fce757067ca81954b6a3710f03488c38d"
|
||||
},
|
||||
"ms": {
|
||||
"pin": false,
|
||||
|
@ -1263,7 +1263,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "8d0c28a2c50ec81104bea31c5102bb0b1428aa16"
|
||||
"revision": "7093e327f7f6020fe39b356ae546a060da90b49e"
|
||||
},
|
||||
"my": {
|
||||
"pin": false,
|
||||
|
@ -1299,7 +1299,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "5cf0d06986c685dc024aea07d405596120c270f7"
|
||||
"revision": "4bb380b8ea264c0f78edb7c9af02be03d72cce81"
|
||||
},
|
||||
"ne-NP": {
|
||||
"pin": false,
|
||||
|
@ -1317,7 +1317,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "95ba8a76277c03e39c8df753dbbf549d38990f06"
|
||||
"revision": "44fc0bd838e369ffaefbac577054c0b94ea43a52"
|
||||
},
|
||||
"nl": {
|
||||
"pin": false,
|
||||
|
@ -1335,7 +1335,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "eccad7b2e641031969f22bda8067a9b2d0b4f223"
|
||||
"revision": "cf92acab5d709ba0bd0f3df70c5d2a4a2f154500"
|
||||
},
|
||||
"nn-NO": {
|
||||
"pin": false,
|
||||
|
@ -1353,7 +1353,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "469585ac9ba8141d6af75bbb840cbbce00f407e0"
|
||||
"revision": "2cafe9974da343517fc39603f5813a695b0c64c6"
|
||||
},
|
||||
"oc": {
|
||||
"pin": false,
|
||||
|
@ -1371,7 +1371,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "2acb0ca8d6e4b3ed8f1ca7226150a144b83dab72"
|
||||
"revision": "b6cef413e22d35238747bcf1efff2acb043daece"
|
||||
},
|
||||
"pa-IN": {
|
||||
"pin": false,
|
||||
|
@ -1389,7 +1389,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "485ec78167aed75713db37baae25013459573b29"
|
||||
"revision": "3548e09d7bf96db9f7237db733aea8a3ba7bb008"
|
||||
},
|
||||
"pl": {
|
||||
"pin": false,
|
||||
|
@ -1407,7 +1407,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "0c00d6fda799fa331cb2ffc52bf7533f52f56046"
|
||||
"revision": "b5d9a0760ce25be4b18267efb4b16fd6691430d5"
|
||||
},
|
||||
"pt-BR": {
|
||||
"pin": false,
|
||||
|
@ -1425,7 +1425,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "d2d16fd2156b54cc4eeabc4bc8f9fd1763b961ad"
|
||||
"revision": "c7e0cb4ead67bad004ea29b2d50de1a726230ed8"
|
||||
},
|
||||
"pt-PT": {
|
||||
"pin": false,
|
||||
|
@ -1443,7 +1443,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "d7c57b3da999c5f90c18486fb4881d917f43d623"
|
||||
"revision": "e806d0594a6a500629ae3c14bc66fa92833fc0b8"
|
||||
},
|
||||
"rm": {
|
||||
"pin": false,
|
||||
|
@ -1461,7 +1461,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "2280fcc594c73f93d2992ef0e8f9221866c030c8"
|
||||
"revision": "45ccb42dbd53957636e8bf383d54b897977e91fb"
|
||||
},
|
||||
"ro": {
|
||||
"pin": false,
|
||||
|
@ -1479,7 +1479,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "c00c598b391af79ba087afa7a1f3bc8237ce5094"
|
||||
"revision": "a885c64ec351c5a32b1cd09d159ea230daa2c2c8"
|
||||
},
|
||||
"ru": {
|
||||
"pin": false,
|
||||
|
@ -1497,7 +1497,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "daf8c95d0ebca9a3586645442780854869d772b1"
|
||||
"revision": "799553ed5caaf8992f76711265ad98ad10f9ce36"
|
||||
},
|
||||
"sat": {
|
||||
"pin": false,
|
||||
|
@ -1515,7 +1515,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "b2febdf5c4a0d06b42bd07d30520de48de7d21bd"
|
||||
"revision": "4617a72dea5b54f5c9e5ecba5e4df2087b734b6d"
|
||||
},
|
||||
"sc": {
|
||||
"pin": false,
|
||||
|
@ -1569,7 +1569,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "641f98779350626ea32834efb4cba59977f3c5af"
|
||||
"revision": "da3926531b2abca4af6cc36f735121db2d7b4e33"
|
||||
},
|
||||
"si": {
|
||||
"pin": false,
|
||||
|
@ -1605,7 +1605,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "212a8f146248f9f7d1e3d946585db752f532f80f"
|
||||
"revision": "024de6c78e80fba6d01ea6bdf1698657918b7522"
|
||||
},
|
||||
"skr": {
|
||||
"pin": false,
|
||||
|
@ -1623,7 +1623,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "68cc30af667e992f77740b0b83f79a7265a15cc3"
|
||||
"revision": "5c74c1ec14cc64100419342b4cdc8f21d394b5ae"
|
||||
},
|
||||
"sl": {
|
||||
"pin": false,
|
||||
|
@ -1641,7 +1641,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "f97c395294cbc86eb4dd1b99af5f1b4b68af3416"
|
||||
"revision": "394c2dc6b40a2bc73a8eaa0f6528fe2dbf35a4d9"
|
||||
},
|
||||
"son": {
|
||||
"pin": false,
|
||||
|
@ -1677,7 +1677,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "63c6a5d66210ce4d7f7cec4ba02e61e376cb2c56"
|
||||
"revision": "25c0cf3448c020974555b38ba7ddab2bc05b5ba5"
|
||||
},
|
||||
"sr": {
|
||||
"pin": false,
|
||||
|
@ -1695,7 +1695,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "cdf63c60d6dac90fffb6f2f812195bb5ea887a3d"
|
||||
"revision": "902fff499f8821d363804cd77fa3860d7e3787d8"
|
||||
},
|
||||
"sv-SE": {
|
||||
"pin": false,
|
||||
|
@ -1713,7 +1713,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "a1ee9ae6623ebfa03b5deb3e41681835cc8a6970"
|
||||
"revision": "53715aab424bd2e5a3d1f243a4bc58af1cc52889"
|
||||
},
|
||||
"szl": {
|
||||
"pin": false,
|
||||
|
@ -1731,7 +1731,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "d11f457257fa07b0563dc58c69010a77021e64e0"
|
||||
"revision": "09cd8bbff3db5b38ae580d6ea7540e15f672bd53"
|
||||
},
|
||||
"ta": {
|
||||
"pin": false,
|
||||
|
@ -1785,7 +1785,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "b25186543c9643edee324f233cc90f65c3aba038"
|
||||
"revision": "c5c6f9b77b4b15f15139fc156606ae56d3423497"
|
||||
},
|
||||
"th": {
|
||||
"pin": false,
|
||||
|
@ -1803,7 +1803,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "029e3192fde5833b7ade2193ae0caf647b7a3e82"
|
||||
"revision": "87f55268bca6b2e9cd48ee59d6302dde062cb01f"
|
||||
},
|
||||
"tl": {
|
||||
"pin": false,
|
||||
|
@ -1821,7 +1821,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "ccbfccb75a6ef2f349765ea0617dad8164a1eed6"
|
||||
"revision": "b9457848f6f4a761634196b52bd856e816bb4542"
|
||||
},
|
||||
"tr": {
|
||||
"pin": false,
|
||||
|
@ -1839,7 +1839,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "509008d470d311b47dd5dfe8a54b0f89feda7536"
|
||||
"revision": "71e6cb442bd9c42e3bf1a1044bfcee804740c272"
|
||||
},
|
||||
"trs": {
|
||||
"pin": false,
|
||||
|
@ -1857,7 +1857,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "630c349a700ac879088712cb0bc12eebf75653e3"
|
||||
"revision": "1df03a579596ec5b30b5f9a9c7d97b83937be8f7"
|
||||
},
|
||||
"uk": {
|
||||
"pin": false,
|
||||
|
@ -1875,7 +1875,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "f0daf0c79c3aa745433d163e1d2d00b6903e77f9"
|
||||
"revision": "dd52f926b7dc642baed7d94609f882fc706d3da2"
|
||||
},
|
||||
"ur": {
|
||||
"pin": false,
|
||||
|
@ -1929,7 +1929,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "0bfd724ddacd85cae4950be50f16c4f8d14f6f77"
|
||||
"revision": "1645c189d91213f6e3bd06b467e7bdf6bf1e86f5"
|
||||
},
|
||||
"wo": {
|
||||
"pin": false,
|
||||
|
@ -1983,7 +1983,7 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "b9f11cac2c7792dfea3ede663a43840b874f04bc"
|
||||
"revision": "172e1345c67b902f34d77198a1226ae9b050e89b"
|
||||
},
|
||||
"zh-TW": {
|
||||
"pin": false,
|
||||
|
@ -2001,6 +2001,6 @@
|
|||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "6e0c3f00d652194364116b282a040b49e0334431"
|
||||
"revision": "84e3dcb73e08dc23ee49cf4a0ca7a8e017e21fcc"
|
||||
}
|
||||
}
|
|
@ -56,10 +56,9 @@ export const ThemeVariableMap = [
|
|||
},
|
||||
],
|
||||
[
|
||||
"--lwt-tabs-border-color",
|
||||
"--tabs-navbar-shadow-color",
|
||||
{
|
||||
lwtProperty: "toolbar_top_separator",
|
||||
optionalElementID: "navigator-toolbox",
|
||||
},
|
||||
],
|
||||
[
|
||||
|
|
|
@ -8,11 +8,41 @@
|
|||
@namespace html url("http://www.w3.org/1999/xhtml");
|
||||
|
||||
/**
|
||||
* We intentionally do not include browser-custom-colors.css,
|
||||
* instead choosing to fall back to system colours and transparencies
|
||||
* in order to accomodate the wider variety of system themes on that
|
||||
* platform.
|
||||
* We intentionally do not include browser-custom-colors.css, instead choosing to
|
||||
* fall back to system colors and transparencies in order to accommodate the
|
||||
* wider variety of GTK system themes.
|
||||
*
|
||||
* We still want to do some of the tweaks that browser-custom-colors does, like
|
||||
* disabling the toolbar field border and backgrounds.
|
||||
*/
|
||||
@media not (prefers-contrast) {
|
||||
:root:not(:-moz-lwtheme) {
|
||||
--toolbar-field-border-color: transparent;
|
||||
|
||||
/* These colors don't exactly match the default dark color that buttons and
|
||||
* textfields have in Adwaita[1][2], which would end up computing to
|
||||
* rgba(0, 0, 0, .8 * .1) and rgba(255, 255, 255, 1 * .1) for light and
|
||||
* dark, respectively.
|
||||
*
|
||||
* Instead, for the light theme we use .05 alpha, to increase the contrast
|
||||
* of the text. For the dark theme, we use a darker background, which works
|
||||
* because the toolbar background applies some white unconditionally, and
|
||||
* matches what our default themes do in other platforms too.
|
||||
*
|
||||
* [1]: https://gitlab.gnome.org/GNOME/libadwaita/-/blob/42c04e038f19b2123560da662692d65480a67931/src/stylesheet/widgets/_buttons.scss#L1
|
||||
* [2]: https://gitlab.gnome.org/GNOME/libadwaita/-/blob/42c04e038f19b2123560da662692d65480a67931/src/stylesheet/widgets/_entries.scss#L9
|
||||
*/
|
||||
--toolbar-field-background-color: light-dark(rgba(0, 0, 0, .05), rgba(0, 0, 0, .3));
|
||||
--toolbar-field-color: inherit;
|
||||
|
||||
@media (-moz-gtk-theme-family) {
|
||||
--tabs-navbar-shadow-color: transparent;
|
||||
@media (prefers-color-scheme: light) {
|
||||
--urlbar-box-bgcolor: #fafafa;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#menubar-items {
|
||||
flex-direction: column; /* for flex hack */
|
||||
|
@ -75,12 +105,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
#nav-bar:not([tabs-hidden="true"]) {
|
||||
box-shadow: 0 calc(-1 * var(--tabs-navbar-shadow-size)) 0 var(--lwt-tabs-border-color, rgba(0,0,0,.3));
|
||||
/* This is needed for some toolbar button animations. Gross :( */
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Bookmark menus */
|
||||
.bookmark-item {
|
||||
&:is(menu, menuitem) {
|
||||
|
|
|
@ -70,18 +70,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
/* Draw the bottom border of the tabs toolbar when titlebar isn't using vibrancy */
|
||||
:root:not([inFullscreen], [tabsintitlebar]) #nav-bar:not([tabs-hidden="true"]),
|
||||
#nav-bar:not([tabs-hidden="true"]):-moz-lwtheme {
|
||||
box-shadow: 0 calc(-1 * var(--tabs-navbar-shadow-size)) 0 var(--lwt-tabs-border-color, rgba(0,0,0,.3));
|
||||
}
|
||||
|
||||
#nav-bar:not([tabs-hidden="true"]) {
|
||||
/* The toolbar buttons that animate are only visible when the #TabsToolbar is not collapsed.
|
||||
The animations use position:absolute and require a positioned #nav-bar. */
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* ----- BOOKMARK TOOLBAR ----- */
|
||||
|
||||
#nav-bar-customization-target > #wrapper-personal-bookmarks > #personal-bookmarks {
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
--tab-icon-overlay-stroke: light-dark(rgb(255, 255, 255), rgb(66, 65, 77));
|
||||
--tab-icon-overlay-fill: light-dark(rgb(91, 91, 102), rgb(251, 251, 254));
|
||||
--tab-attention-icon-color: light-dark(rgb(42, 195, 162), rgb(84, 255, 189));
|
||||
--tabs-navbar-shadow-color: transparent;
|
||||
|
||||
--toolbox-non-lwt-bgcolor: light-dark(rgb(240, 240, 244), rgb(28, 27, 34));
|
||||
--toolbox-non-lwt-textcolor: light-dark(rgb(21, 20, 26), rgb(251, 251, 254));
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
--chrome-content-separator-color: ThreeDShadow;
|
||||
|
||||
--tabs-navbar-shadow-size: 1px;
|
||||
--tabs-navbar-shadow-color: ThreeDShadow;
|
||||
|
||||
--panelui-subview-transition-duration: 150ms;
|
||||
|
||||
|
@ -95,6 +96,7 @@
|
|||
|
||||
--link-color: light-dark(rgb(0, 97, 224), rgb(0, 221, 255));
|
||||
--chrome-content-separator-color: rgba(0,0,0,.3);
|
||||
--tabs-navbar-shadow-color: light-dark(rgba(0,0,0,.1), rgba(0,0,0,.3));
|
||||
|
||||
@media not (prefers-contrast) {
|
||||
--focus-outline-color: light-dark(#0061E0, #00DDFF);
|
||||
|
@ -182,6 +184,13 @@
|
|||
transition: var(--ext-theme-background-transition);
|
||||
}
|
||||
|
||||
#nav-bar:not([tabs-hidden="true"]) {
|
||||
/* The toolbar buttons that animate are only visible when the #TabsToolbar is not collapsed.
|
||||
The animations use position:absolute and require a positioned #nav-bar. */
|
||||
position: relative;
|
||||
box-shadow: 0 calc(-1 * var(--tabs-navbar-shadow-size)) 0 var(--tabs-navbar-shadow-color);
|
||||
}
|
||||
|
||||
/* Bookmarks toolbar */
|
||||
|
||||
#PersonalToolbar {
|
||||
|
|
|
@ -78,21 +78,6 @@
|
|||
color: var(--toolbar-color);
|
||||
}
|
||||
|
||||
#nav-bar:not([tabs-hidden="true"]) {
|
||||
/* This is needed for some toolbar button animations. Gross :( */
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@media (prefers-contrast) {
|
||||
#nav-bar:not(:-moz-lwtheme) {
|
||||
box-shadow: 0 calc(-1 * var(--tabs-navbar-shadow-size)) 0 ThreeDShadow;
|
||||
}
|
||||
}
|
||||
|
||||
#nav-bar:-moz-lwtheme {
|
||||
box-shadow: 0 calc(-1 * var(--tabs-navbar-shadow-size)) 0 var(--lwt-tabs-border-color, rgba(0,0,0,.3));
|
||||
}
|
||||
|
||||
#print-preview-toolbar:not(:-moz-lwtheme) {
|
||||
appearance: auto;
|
||||
-moz-default-appearance: toolbox;
|
||||
|
|
|
@ -61,6 +61,9 @@ function createPanelReloadTest(recordName, toolId) {
|
|||
// the main DevTools loader, which keeps the module loaded until the
|
||||
// shutdown of Firefox
|
||||
await testScript(toolbox);
|
||||
// Running it a second time is helpful for the debugger which allocates different objects
|
||||
// on the second run... which would be taken as leak otherwise.
|
||||
await testScript(toolbox);
|
||||
|
||||
await startRecordingAllocations({
|
||||
alsoRecordContentProcess: true,
|
||||
|
|
|
@ -3,34 +3,91 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const TEST_CONTENT = `<h1 title="test title">test h1</h1>`;
|
||||
const TEST_CONTENT = `<h1 title="test title" style="margin: 5px">test h1</h1>`;
|
||||
const TEST_URL = `data:text/html;charset=utf-8,${TEST_CONTENT}`;
|
||||
|
||||
// Test for the tooltip coordinate on the browsing document in RDM.
|
||||
|
||||
addRDMTask(TEST_URL, async ({ ui }) => {
|
||||
// On ubuntu1804, the test fails if the real mouse cursor is on the test document.
|
||||
// See Bug 1600183
|
||||
info("Disable non test mouse event");
|
||||
window.windowUtils.disableNonTestMouseEvents(true);
|
||||
registerCleanupFunction(() => {
|
||||
window.windowUtils.disableNonTestMouseEvents(false);
|
||||
});
|
||||
// Make this synthesize mouse events via the parent process because some
|
||||
// code may cache the mouse cursor position like PresShell. That may prevent
|
||||
// unexpected DOM events coming from the parent process.
|
||||
await pushPref("test.events.async.enabled", true);
|
||||
|
||||
info("Create a promise which waits until the tooltip will be shown");
|
||||
const tooltip = ui.browserWindow.gBrowser.ownerDocument.getElementById(
|
||||
"remoteBrowserTooltip"
|
||||
);
|
||||
const onTooltipShown = BrowserTestUtils.waitForEvent(tooltip, "popupshown");
|
||||
const onTooltipHidden = BrowserTestUtils.waitForEvent(tooltip, "popuphidden");
|
||||
|
||||
info("Show a tooltip");
|
||||
await spawnViewportTask(ui, {}, async () => {
|
||||
const target = content.document.querySelector("h1");
|
||||
|
||||
// First, make sure to move mouse cursor outside the target.
|
||||
info("Waiting for initial mousemove");
|
||||
{
|
||||
// FYI: Some `mousemove` events may not be sent to the content process
|
||||
// until all preparations done in the main process and the content
|
||||
// process. Therefore, we need to synthesize `mousemove`s until we
|
||||
// get it in the remote process at least once. Therefore, we cannot
|
||||
// use a promise to wait a `mousemove` here and we need to use the while
|
||||
// loop below.
|
||||
let mouseMoveFired = false;
|
||||
content.document.addEventListener(
|
||||
"mousemove",
|
||||
event => {
|
||||
isnot(
|
||||
event.target,
|
||||
target,
|
||||
"The first mousemove should be fired outside the target"
|
||||
);
|
||||
mouseMoveFired = true;
|
||||
},
|
||||
{
|
||||
once: true,
|
||||
}
|
||||
);
|
||||
while (!mouseMoveFired) {
|
||||
await EventUtils.synthesizeMouse(
|
||||
target,
|
||||
-2,
|
||||
-2,
|
||||
{ type: "mousemove" },
|
||||
content
|
||||
);
|
||||
await EventUtils.synthesizeMouse(
|
||||
target,
|
||||
-1,
|
||||
-1,
|
||||
{ type: "mousemove" },
|
||||
content
|
||||
);
|
||||
// Wait for the tooltip for the target is hidden even if it was visible.
|
||||
await new Promise(resolve =>
|
||||
content.window.requestAnimationFrame(() =>
|
||||
content.window.requestAnimationFrame(resolve)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const eventLogger = event =>
|
||||
info(
|
||||
`${event.type}: path=[${event.composedPath()}], outerHTML=${
|
||||
event.target.outerHTML
|
||||
}, relatedTarget=${event.relatedTarget?.outerHTML}`
|
||||
);
|
||||
target.addEventListener("mouseover", eventLogger);
|
||||
target.addEventListener("mouseout", eventLogger);
|
||||
content.document.addEventListener("mousemove", eventLogger);
|
||||
// Then, move cursor over the target.
|
||||
await EventUtils.synthesizeMouse(
|
||||
target,
|
||||
1,
|
||||
1,
|
||||
{ type: "mouseover", isSynthesized: false },
|
||||
{ type: "mousemove", isSynthesized: false },
|
||||
content
|
||||
);
|
||||
await EventUtils.synthesizeMouse(
|
||||
|
@ -54,4 +111,19 @@ addRDMTask(TEST_URL, async ({ ui }) => {
|
|||
|
||||
info("Test the X coordinate of the tooltip");
|
||||
isnot(tooltip.screenX, 0, "The X coordinate of tooltip should not be 0");
|
||||
|
||||
// Finally, clean up the tooltip if we're running in the verify mode.
|
||||
info("Wait for hiding the tooltip");
|
||||
await spawnViewportTask(ui, {}, async () => {
|
||||
info("Cleaning up the tooltip with moving the cursor");
|
||||
const target = content.document.querySelector("h1");
|
||||
await EventUtils.synthesizeMouse(
|
||||
target,
|
||||
-1,
|
||||
-1,
|
||||
{ type: "mousemove", isSynthesized: false },
|
||||
content
|
||||
);
|
||||
});
|
||||
await onTooltipHidden;
|
||||
});
|
||||
|
|
|
@ -37,5 +37,5 @@ DevToolsModules(
|
|||
MOCHITEST_CHROME_MANIFESTS += ["test/chrome/chrome.toml"]
|
||||
BROWSER_CHROME_MANIFESTS += [
|
||||
"test/browser/browser.toml",
|
||||
"test/node/stubs/reps/stubs.ini",
|
||||
"test/node/stubs/reps/stubs.toml",
|
||||
]
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
[DEFAULT]
|
||||
tags = devtools
|
||||
subsuite = devtools
|
||||
support-files =
|
||||
attribute.js
|
||||
comment-node.js
|
||||
date-time.js
|
||||
infinity.js
|
||||
nan.js
|
||||
null.js
|
||||
number.js
|
||||
stylesheet.js
|
||||
symbol.js
|
||||
text-node.js
|
||||
undefined.js
|
||||
window.js
|
||||
|
||||
[browser_dummy.js]
|
||||
skip-if=true #This is only here so we can expose the support files in other ini files.
|
|
@ -0,0 +1,20 @@
|
|||
[DEFAULT]
|
||||
tags = "devtools"
|
||||
subsuite = "devtools"
|
||||
support-files = [
|
||||
"attribute.js",
|
||||
"comment-node.js",
|
||||
"date-time.js",
|
||||
"infinity.js",
|
||||
"nan.js",
|
||||
"null.js",
|
||||
"number.js",
|
||||
"stylesheet.js",
|
||||
"symbol.js",
|
||||
"text-node.js",
|
||||
"undefined.js",
|
||||
"window.js",
|
||||
]
|
||||
|
||||
["browser_dummy.js"]
|
||||
skip-if = ["true"] #This is only here so we can expose the support files in other toml files.
|
|
@ -29,9 +29,9 @@ DevToolsModules(
|
|||
|
||||
BROWSER_CHROME_MANIFESTS += [
|
||||
"test/browser/_browser_console.toml",
|
||||
"test/browser/_jsterm.ini",
|
||||
"test/browser/_jsterm.toml",
|
||||
"test/browser/_webconsole.toml",
|
||||
"test/node/fixtures/stubs/stubs.ini",
|
||||
"test/node/fixtures/stubs/stubs.toml",
|
||||
]
|
||||
|
||||
MOCHITEST_CHROME_MANIFESTS += [
|
||||
|
|
|
@ -1,175 +0,0 @@
|
|||
[DEFAULT]
|
||||
tags = devtools
|
||||
subsuite = devtools
|
||||
support-files =
|
||||
head.js
|
||||
test-autocomplete-in-stackframe.html
|
||||
test-autocomplete-mapped.html
|
||||
test-autocomplete-mapped.js
|
||||
test-autocomplete-mapped.js.map
|
||||
test-autocomplete-mapped.src.js
|
||||
test-block-action.html
|
||||
test-block-action-style.css
|
||||
test-console-evaluation-context-selector-child.html
|
||||
test-console-evaluation-context-selector.html
|
||||
test-console.html
|
||||
test-dynamic-import.html
|
||||
test-dynamic-import.mjs
|
||||
test-iframe-child.html
|
||||
test-iframe-parent.html
|
||||
test_jsterm_screenshot_command.html
|
||||
test-mangled-function.js
|
||||
test-mangled-function.js.map
|
||||
test-mangled-function.src.js
|
||||
test-simple-function.html
|
||||
test-simple-function.js
|
||||
!/devtools/client/shared/test/shared-head.js
|
||||
!/devtools/client/debugger/test/mochitest/shared-head.js
|
||||
!/devtools/client/framework/browser-toolbox/test/helpers-browser-toolbox.js
|
||||
!/devtools/client/shared/test/telemetry-test-helpers.js
|
||||
!/devtools/client/shared/test/highlighter-test-actor.js
|
||||
../../../../../toolkit/components/reader/test/readerModeArticle.html
|
||||
|
||||
[browser_jsterm_add_edited_input_to_history.js]
|
||||
[browser_jsterm_autocomplete_accept_no_scroll.js]
|
||||
[browser_jsterm_autocomplete_array_no_index.js]
|
||||
[browser_jsterm_autocomplete_arrow_keys.js]
|
||||
skip-if = debug && (os == "win" && bits == 32) #bug 1620638
|
||||
[browser_jsterm_autocomplete_await.js]
|
||||
[browser_jsterm_autocomplete_toggle.js]
|
||||
[browser_jsterm_autocomplete_cached_results.js]
|
||||
[browser_jsterm_autocomplete_commands.js]
|
||||
[browser_jsterm_autocomplete_control_space.js]
|
||||
[browser_jsterm_autocomplete_crossdomain_iframe.js]
|
||||
[browser_jsterm_autocomplete_disabled.js]
|
||||
[browser_jsterm_autocomplete_eager_evaluation.js]
|
||||
[browser_jsterm_autocomplete_del_key.js]
|
||||
[browser_jsterm_autocomplete_escape_key.js]
|
||||
[browser_jsterm_autocomplete_expression_variables.js]
|
||||
[browser_jsterm_autocomplete_extraneous_closing_brackets.js]
|
||||
[browser_jsterm_autocomplete_getters_cache.js]
|
||||
[browser_jsterm_autocomplete_getters_cancel.js]
|
||||
[browser_jsterm_autocomplete_getters_confirm.js]
|
||||
[browser_jsterm_autocomplete_getters_learn_more_link.js]
|
||||
fail-if = a11y_checks # Bug 1849028
|
||||
[browser_jsterm_autocomplete_helpers.js]
|
||||
[browser_jsterm_autocomplete_in_chrome_tab.js]
|
||||
[browser_jsterm_autocomplete_in_debugger_stackframe.js]
|
||||
skip-if = (os == "win" && os_version == "6.1") # Bug 1620521
|
||||
[browser_jsterm_autocomplete_inside_text.js]
|
||||
skip-if = (os == "win" && os_version == "6.1") # Bug 1620521
|
||||
[browser_jsterm_autocomplete_mapped_variables.js]
|
||||
skip-if =
|
||||
http3 # Bug 1829298
|
||||
http2
|
||||
a11y_checks # Bugs 1849028 and 1802390 - clicked <input> is inconsistently not accessible
|
||||
[browser_jsterm_autocomplete_native_getters.js]
|
||||
[browser_jsterm_autocomplete_nav_and_tab_key.js]
|
||||
[browser_jsterm_autocomplete_null.js]
|
||||
skip-if = tsan # bug 1778033
|
||||
[browser_jsterm_autocomplete_paste_undo.js]
|
||||
[browser_jsterm_autocomplete_race_on_enter.js]
|
||||
[browser_jsterm_autocomplete_return_key_no_selection.js]
|
||||
[browser_jsterm_autocomplete_return_key.js]
|
||||
[browser_jsterm_autocomplete_width.js]
|
||||
[browser_jsterm_autocomplete_will_navigate.js]
|
||||
[browser_jsterm_autocomplete-properties-with-non-alphanumeric-names.js]
|
||||
skip-if = debug && (os == "win" && bits == 32) # Bug 1620856
|
||||
[browser_jsterm_await_assignments.js]
|
||||
[browser_jsterm_await_concurrent_same_result.js]
|
||||
[browser_jsterm_await_concurrent.js]
|
||||
[browser_jsterm_await_dynamic_import.js]
|
||||
[browser_jsterm_await_error.js]
|
||||
[browser_jsterm_await_helper_dollar_underscore.js]
|
||||
[browser_jsterm_await_paused.js]
|
||||
skip-if =
|
||||
debug # crashes on "Unexpected UpdateTransformLayer hint" bug 1570685
|
||||
[browser_jsterm_await.js]
|
||||
[browser_jsterm_block_command.js]
|
||||
[browser_jsterm_commands.js]
|
||||
[browser_jsterm_completion_bracket_cached_results.js]
|
||||
[browser_jsterm_completion_bracket.js]
|
||||
skip-if = debug && (os == "win" && os_version == "6.1") # Bug 1620724
|
||||
[browser_jsterm_completion_case_sensitivity.js]
|
||||
[browser_jsterm_completion_perfect_match.js]
|
||||
[browser_jsterm_completion_dollar_underscore.js]
|
||||
[browser_jsterm_completion_dollar_zero.js]
|
||||
[browser_jsterm_completion.js]
|
||||
[browser_jsterm_content_defined_helpers.js]
|
||||
[browser_jsterm_context_menu_labels.js]
|
||||
skip-if = (os == "win" && processor == "aarch64") # disabled on aarch64 due to 1531571
|
||||
[browser_jsterm_copy_command.js]
|
||||
[browser_jsterm_ctrl_a_select_all.js]
|
||||
[browser_jsterm_ctrl_key_nav.js]
|
||||
skip-if = os != 'mac' # The tested ctrl+key shortcuts are OSX only
|
||||
[browser_jsterm_document_no_xray.js]
|
||||
[browser_jsterm_eager_evaluation_element_highlight.js]
|
||||
[browser_jsterm_eager_evaluation_in_debugger_stackframe.js]
|
||||
[browser_jsterm_eager_evaluation_warnings.js]
|
||||
[browser_jsterm_eager_evaluation.js]
|
||||
[browser_jsterm_editor.js]
|
||||
[browser_jsterm_editor_code_folding.js]
|
||||
[browser_jsterm_editor_disabled_history_nav_with_keyboard.js]
|
||||
[browser_jsterm_editor_enter.js]
|
||||
[browser_jsterm_editor_execute_selection.js]
|
||||
[browser_jsterm_editor_execute.js]
|
||||
[browser_jsterm_editor_gutter.js]
|
||||
[browser_jsterm_editor_onboarding.js]
|
||||
[browser_jsterm_editor_toggle_keyboard_shortcut.js]
|
||||
[browser_jsterm_editor_resize.js]
|
||||
fail-if = a11y_checks # Bug 1849028
|
||||
[browser_jsterm_editor_reverse_search_button.js]
|
||||
[browser_jsterm_editor_reverse_search_keyboard_navigation.js]
|
||||
[browser_jsterm_editor_toolbar.js]
|
||||
[browser_jsterm_error_docs.js]
|
||||
[browser_jsterm_error_outside_valid_range.js]
|
||||
[browser_jsterm_evaluation_context_selector_iframe_picker.js]
|
||||
[browser_jsterm_evaluation_context_selector_pause_in_debugger.js]
|
||||
[browser_jsterm_evaluation_context_selector_targets_update.js]
|
||||
skip-if =
|
||||
http3 # Bug 1829298
|
||||
http2
|
||||
[browser_jsterm_evaluation_context_selector_inspector.js]
|
||||
[browser_jsterm_evaluation_context_selector.js]
|
||||
[browser_jsterm_evaluation_notification_original_variable_mapping_warning.js]
|
||||
[browser_jsterm_file_load_save_keyboard_shortcut.js]
|
||||
[browser_jsterm_focus_reload.js]
|
||||
[browser_jsterm_helper_clear.js]
|
||||
[browser_jsterm_helper_dollar_dollar.js]
|
||||
[browser_jsterm_helper_dollar_x.js]
|
||||
[browser_jsterm_helper_dollar.js]
|
||||
[browser_jsterm_helper_help.js]
|
||||
[browser_jsterm_helper_keys_values.js]
|
||||
[browser_jsterm_helpers_no_override.js]
|
||||
[browser_jsterm_hide_when_devtools_chrome_enabled_false.js]
|
||||
fail-if = a11y_checks # Bug 1849028
|
||||
[browser_jsterm_history.js]
|
||||
[browser_jsterm_history_command.js]
|
||||
[browser_jsterm_history_arrow_keys.js]
|
||||
[browser_jsterm_history_nav.js]
|
||||
[browser_jsterm_history_persist.js]
|
||||
[browser_jsterm_insert_tab_when_overflows_no_scroll.js]
|
||||
[browser_jsterm_inspect.js]
|
||||
[browser_jsterm_inspect_panels.js]
|
||||
[browser_jsterm_instance_of.js]
|
||||
[browser_jsterm_middle_click_paste.js]
|
||||
fail-if = a11y_checks # Bug 1849028
|
||||
[browser_jsterm_multiline.js]
|
||||
[browser_jsterm_no_input_and_tab_key_pressed.js]
|
||||
skip-if = (os == "win" && processor == "aarch64") # disabled on aarch64 due to 1531573
|
||||
[browser_jsterm_null_undefined.js]
|
||||
[browser_jsterm_popup_close_on_tab_switch.js]
|
||||
[browser_jsterm_screenshot_command_clipboard.js]
|
||||
[browser_jsterm_screenshot_command_user.js]
|
||||
[browser_jsterm_screenshot_command_file.js]
|
||||
[browser_jsterm_screenshot_command_fixed_header.js]
|
||||
[browser_jsterm_screenshot_command_selector.js]
|
||||
[browser_jsterm_screenshot_command_warnings.js]
|
||||
skip-if =
|
||||
os == "win" && os_version == "6.1" # Getting the clipboard image dimensions throws an exception
|
||||
os == 'linux' && bits == 64 && !debug # Bug 1701439
|
||||
[browser_jsterm_selfxss.js]
|
||||
[browser_jsterm_syntax_highlight_output.js]
|
||||
skip-if =
|
||||
os == "win" && processor == "aarch64" # disabled on aarch64 due to 1531574
|
||||
[browser_jsterm_trace_command.js]
|
|
@ -0,0 +1,283 @@
|
|||
[DEFAULT]
|
||||
tags = "devtools"
|
||||
subsuite = "devtools"
|
||||
support-files = [
|
||||
"head.js",
|
||||
"test-autocomplete-in-stackframe.html",
|
||||
"test-autocomplete-mapped.html",
|
||||
"test-autocomplete-mapped.js",
|
||||
"test-autocomplete-mapped.js.map",
|
||||
"test-autocomplete-mapped.src.js",
|
||||
"test-block-action.html",
|
||||
"test-block-action-style.css",
|
||||
"test-console-evaluation-context-selector-child.html",
|
||||
"test-console-evaluation-context-selector.html",
|
||||
"test-console.html",
|
||||
"test-dynamic-import.html",
|
||||
"test-dynamic-import.mjs",
|
||||
"test-iframe-child.html",
|
||||
"test-iframe-parent.html",
|
||||
"test_jsterm_screenshot_command.html",
|
||||
"test-mangled-function.js",
|
||||
"test-mangled-function.js.map",
|
||||
"test-mangled-function.src.js",
|
||||
"test-simple-function.html",
|
||||
"test-simple-function.js",
|
||||
"!/devtools/client/shared/test/shared-head.js",
|
||||
"!/devtools/client/debugger/test/mochitest/shared-head.js",
|
||||
"!/devtools/client/framework/browser-toolbox/test/helpers-browser-toolbox.js",
|
||||
"!/devtools/client/shared/test/telemetry-test-helpers.js",
|
||||
"!/devtools/client/shared/test/highlighter-test-actor.js",
|
||||
"../../../../../toolkit/components/reader/test/readerModeArticle.html",
|
||||
]
|
||||
|
||||
["browser_jsterm_add_edited_input_to_history.js"]
|
||||
|
||||
["browser_jsterm_autocomplete-properties-with-non-alphanumeric-names.js"]
|
||||
skip-if = ["debug && os == 'win' && bits == 32"] # Bug 1620856
|
||||
|
||||
["browser_jsterm_autocomplete_accept_no_scroll.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_array_no_index.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_arrow_keys.js"]
|
||||
skip-if = ["debug && os == 'win' && bits == 32"] # Bug 1620856
|
||||
|
||||
["browser_jsterm_autocomplete_await.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_cached_results.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_commands.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_control_space.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_crossdomain_iframe.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_del_key.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_disabled.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_eager_evaluation.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_escape_key.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_expression_variables.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_extraneous_closing_brackets.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_getters_cache.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_getters_cancel.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_getters_confirm.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_getters_learn_more_link.js"]
|
||||
fail-if = ["a11y_checks"] # Bug 1849028
|
||||
|
||||
["browser_jsterm_autocomplete_helpers.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_in_chrome_tab.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_in_debugger_stackframe.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_inside_text.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_mapped_variables.js"]
|
||||
skip-if = [
|
||||
"http3", # Bug 1829298
|
||||
"http2",
|
||||
"a11y_checks", # Bugs 1849028 and 1802390 - clicked <input> is inconsistently not accessible
|
||||
]
|
||||
|
||||
["browser_jsterm_autocomplete_native_getters.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_nav_and_tab_key.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_null.js"]
|
||||
skip-if = ["tsan"] # bug 1778033
|
||||
|
||||
["browser_jsterm_autocomplete_paste_undo.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_race_on_enter.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_return_key.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_return_key_no_selection.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_toggle.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_width.js"]
|
||||
|
||||
["browser_jsterm_autocomplete_will_navigate.js"]
|
||||
|
||||
["browser_jsterm_await.js"]
|
||||
|
||||
["browser_jsterm_await_assignments.js"]
|
||||
|
||||
["browser_jsterm_await_concurrent.js"]
|
||||
|
||||
["browser_jsterm_await_concurrent_same_result.js"]
|
||||
|
||||
["browser_jsterm_await_dynamic_import.js"]
|
||||
|
||||
["browser_jsterm_await_error.js"]
|
||||
|
||||
["browser_jsterm_await_helper_dollar_underscore.js"]
|
||||
|
||||
["browser_jsterm_await_paused.js"]
|
||||
skip-if = ["debug"] # crashes on "Unexpected UpdateTransformLayer hint" bug 1570685
|
||||
|
||||
["browser_jsterm_block_command.js"]
|
||||
|
||||
["browser_jsterm_commands.js"]
|
||||
|
||||
["browser_jsterm_completion.js"]
|
||||
|
||||
["browser_jsterm_completion_bracket.js"]
|
||||
|
||||
["browser_jsterm_completion_bracket_cached_results.js"]
|
||||
|
||||
["browser_jsterm_completion_case_sensitivity.js"]
|
||||
|
||||
["browser_jsterm_completion_dollar_underscore.js"]
|
||||
|
||||
["browser_jsterm_completion_dollar_zero.js"]
|
||||
|
||||
["browser_jsterm_completion_perfect_match.js"]
|
||||
|
||||
["browser_jsterm_content_defined_helpers.js"]
|
||||
|
||||
["browser_jsterm_context_menu_labels.js"]
|
||||
|
||||
["browser_jsterm_copy_command.js"]
|
||||
|
||||
["browser_jsterm_ctrl_a_select_all.js"]
|
||||
|
||||
["browser_jsterm_ctrl_key_nav.js"]
|
||||
run-if = ["os == 'mac'"] # The tested ctrl+key shortcuts are OSX only
|
||||
|
||||
["browser_jsterm_document_no_xray.js"]
|
||||
|
||||
["browser_jsterm_eager_evaluation.js"]
|
||||
|
||||
["browser_jsterm_eager_evaluation_element_highlight.js"]
|
||||
|
||||
["browser_jsterm_eager_evaluation_in_debugger_stackframe.js"]
|
||||
|
||||
["browser_jsterm_eager_evaluation_warnings.js"]
|
||||
|
||||
["browser_jsterm_editor.js"]
|
||||
|
||||
["browser_jsterm_editor_code_folding.js"]
|
||||
|
||||
["browser_jsterm_editor_disabled_history_nav_with_keyboard.js"]
|
||||
|
||||
["browser_jsterm_editor_enter.js"]
|
||||
|
||||
["browser_jsterm_editor_execute.js"]
|
||||
|
||||
["browser_jsterm_editor_execute_selection.js"]
|
||||
|
||||
["browser_jsterm_editor_gutter.js"]
|
||||
|
||||
["browser_jsterm_editor_onboarding.js"]
|
||||
|
||||
["browser_jsterm_editor_resize.js"]
|
||||
fail-if = ["a11y_checks"] # Bug 1849028
|
||||
|
||||
["browser_jsterm_editor_reverse_search_button.js"]
|
||||
|
||||
["browser_jsterm_editor_reverse_search_keyboard_navigation.js"]
|
||||
|
||||
["browser_jsterm_editor_toggle_keyboard_shortcut.js"]
|
||||
|
||||
["browser_jsterm_editor_toolbar.js"]
|
||||
|
||||
["browser_jsterm_error_docs.js"]
|
||||
|
||||
["browser_jsterm_error_outside_valid_range.js"]
|
||||
|
||||
["browser_jsterm_evaluation_context_selector.js"]
|
||||
|
||||
["browser_jsterm_evaluation_context_selector_iframe_picker.js"]
|
||||
|
||||
["browser_jsterm_evaluation_context_selector_inspector.js"]
|
||||
|
||||
["browser_jsterm_evaluation_context_selector_pause_in_debugger.js"]
|
||||
|
||||
["browser_jsterm_evaluation_context_selector_targets_update.js"]
|
||||
skip-if = [
|
||||
"http3", # Bug 1829298
|
||||
"http2",
|
||||
]
|
||||
|
||||
["browser_jsterm_evaluation_notification_original_variable_mapping_warning.js"]
|
||||
|
||||
["browser_jsterm_file_load_save_keyboard_shortcut.js"]
|
||||
|
||||
["browser_jsterm_focus_reload.js"]
|
||||
|
||||
["browser_jsterm_helper_clear.js"]
|
||||
|
||||
["browser_jsterm_helper_dollar.js"]
|
||||
|
||||
["browser_jsterm_helper_dollar_dollar.js"]
|
||||
|
||||
["browser_jsterm_helper_dollar_x.js"]
|
||||
|
||||
["browser_jsterm_helper_help.js"]
|
||||
|
||||
["browser_jsterm_helper_keys_values.js"]
|
||||
|
||||
["browser_jsterm_helpers_no_override.js"]
|
||||
|
||||
["browser_jsterm_hide_when_devtools_chrome_enabled_false.js"]
|
||||
fail-if = ["a11y_checks"] # Bug 1849028
|
||||
|
||||
["browser_jsterm_history.js"]
|
||||
|
||||
["browser_jsterm_history_arrow_keys.js"]
|
||||
|
||||
["browser_jsterm_history_command.js"]
|
||||
|
||||
["browser_jsterm_history_nav.js"]
|
||||
|
||||
["browser_jsterm_history_persist.js"]
|
||||
|
||||
["browser_jsterm_insert_tab_when_overflows_no_scroll.js"]
|
||||
|
||||
["browser_jsterm_inspect.js"]
|
||||
|
||||
["browser_jsterm_inspect_panels.js"]
|
||||
|
||||
["browser_jsterm_instance_of.js"]
|
||||
|
||||
["browser_jsterm_middle_click_paste.js"]
|
||||
fail-if = ["a11y_checks"] # Bug 1849028
|
||||
|
||||
["browser_jsterm_multiline.js"]
|
||||
|
||||
["browser_jsterm_no_input_and_tab_key_pressed.js"]
|
||||
|
||||
["browser_jsterm_null_undefined.js"]
|
||||
|
||||
["browser_jsterm_popup_close_on_tab_switch.js"]
|
||||
|
||||
["browser_jsterm_screenshot_command_clipboard.js"]
|
||||
|
||||
["browser_jsterm_screenshot_command_file.js"]
|
||||
|
||||
["browser_jsterm_screenshot_command_fixed_header.js"]
|
||||
|
||||
["browser_jsterm_screenshot_command_selector.js"]
|
||||
|
||||
["browser_jsterm_screenshot_command_user.js"]
|
||||
|
||||
["browser_jsterm_screenshot_command_warnings.js"]
|
||||
skip-if = ["os == 'linux' && bits == 64 && !debug"] # Bug 1701439
|
||||
|
||||
["browser_jsterm_selfxss.js"]
|
||||
|
||||
["browser_jsterm_syntax_highlight_output.js"]
|
||||
|
||||
["browser_jsterm_trace_command.js"]
|
|
@ -1,14 +0,0 @@
|
|||
[DEFAULT]
|
||||
tags = devtools
|
||||
subsuite = devtools
|
||||
support-files =
|
||||
consoleApi.js
|
||||
cssMessage.js
|
||||
evaluationResult.js
|
||||
index.js
|
||||
networkEvent.js
|
||||
pageError.js
|
||||
platformMessage.js
|
||||
|
||||
[browser_dummy.js]
|
||||
skip-if=true #This is only here so we can expose the support files in other ini files.
|
|
@ -0,0 +1,15 @@
|
|||
[DEFAULT]
|
||||
tags = "devtools"
|
||||
subsuite = "devtools"
|
||||
support-files = [
|
||||
"consoleApi.js",
|
||||
"cssMessage.js",
|
||||
"evaluationResult.js",
|
||||
"index.js",
|
||||
"networkEvent.js",
|
||||
"pageError.js",
|
||||
"platformMessage.js",
|
||||
]
|
||||
|
||||
["browser_dummy.js"]
|
||||
skip-if = ["true"] #This is only here so we can expose the support files in other toml files.
|
|
@ -103,6 +103,50 @@ function logAccessDeniedWarning(window, callerInfo, extensionPolicy) {
|
|||
Services.console.logMessage(error);
|
||||
}
|
||||
|
||||
function extensionAllowedToInspectPrincipal(extensionPolicy, principal) {
|
||||
if (principal.isNullPrincipal) {
|
||||
// data: and sandboxed documents.
|
||||
//
|
||||
// Rather than returning true unconditionally, we go through additional
|
||||
// checks to prevent execution in sandboxed documents created by principals
|
||||
// that extensions cannot access otherwise.
|
||||
principal = principal.precursorPrincipal;
|
||||
if (!principal) {
|
||||
// Top-level about:blank, etc.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (!principal.isContentPrincipal) {
|
||||
return false;
|
||||
}
|
||||
const principalURI = principal.URI;
|
||||
if (principalURI.schemeIs("https") || principalURI.schemeIs("http")) {
|
||||
if (WebExtensionPolicy.isRestrictedURI(principalURI)) {
|
||||
return false;
|
||||
}
|
||||
if (extensionPolicy.quarantinedFromURI(principalURI)) {
|
||||
return false;
|
||||
}
|
||||
// Common case: http(s) allowed.
|
||||
return true;
|
||||
}
|
||||
|
||||
if (principalURI.schemeIs("moz-extension")) {
|
||||
// Ordinarily, we don't allow extensions to execute arbitrary code in
|
||||
// their own context. The devtools.inspectedWindow.eval API is a special
|
||||
// case - this can only be used through the devtools_page feature, which
|
||||
// requires the user to open the developer tools first. If an extension
|
||||
// really wants to debug itself, we let it do so.
|
||||
return extensionPolicy.id === principal.addonId;
|
||||
}
|
||||
|
||||
if (principalURI.schemeIs("file")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
class CustomizedReload {
|
||||
constructor(params) {
|
||||
this.docShell = params.targetActor.window.docShell;
|
||||
|
@ -508,57 +552,22 @@ class WebExtensionInspectedWindowActor extends Actor {
|
|||
});
|
||||
}
|
||||
|
||||
// Log the error for the user to know that the extension request has been denied
|
||||
// (the extension may not warn the user at all).
|
||||
const logEvalDenied = () => {
|
||||
if (
|
||||
!extensionAllowedToInspectPrincipal(
|
||||
extensionPolicy,
|
||||
window.document.nodePrincipal
|
||||
)
|
||||
) {
|
||||
// Log the error for the user to know that the extension request has been
|
||||
// denied (the extension may not warn the user at all).
|
||||
logAccessDeniedWarning(window, callerInfo, extensionPolicy);
|
||||
};
|
||||
|
||||
if (isSystemPrincipalWindow(window)) {
|
||||
logEvalDenied();
|
||||
|
||||
// On denied JS evaluation, report it to the extension using the same data format
|
||||
// used in the corresponding chrome API method to report issues that are
|
||||
// not exceptions raised in the evaluated javascript code.
|
||||
// The error message is generic here. If access is disallowed, we do not
|
||||
// expose the URL either.
|
||||
return createExceptionInfoResult({
|
||||
description: "Inspector protocol error: %s",
|
||||
details: [
|
||||
"This target has a system principal. inspectedWindow.eval denied.",
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
const docPrincipalURI = window.document.nodePrincipal.URI;
|
||||
|
||||
// Deny on document principals listed as restricted or
|
||||
// related to the about: pages (only about:blank and about:srcdoc are
|
||||
// allowed and their are expected to not have their about URI associated
|
||||
// to the principal).
|
||||
if (
|
||||
WebExtensionPolicy.isRestrictedURI(docPrincipalURI) ||
|
||||
docPrincipalURI.schemeIs("about")
|
||||
) {
|
||||
logEvalDenied();
|
||||
|
||||
return createExceptionInfoResult({
|
||||
description: "Inspector protocol error: %s %s",
|
||||
details: [
|
||||
"This extension is not allowed on the current inspected window origin",
|
||||
docPrincipalURI.spec,
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
const windowAddonId = window.document.nodePrincipal.addonId;
|
||||
|
||||
if (windowAddonId && extensionPolicy.id !== windowAddonId) {
|
||||
logEvalDenied();
|
||||
|
||||
return createExceptionInfoResult({
|
||||
description: "Inspector protocol error: %s on %s",
|
||||
details: [
|
||||
"This extension is not allowed to access this extension page.",
|
||||
window.document.location.origin,
|
||||
],
|
||||
});
|
||||
}
|
||||
|
|
|
@ -8,5 +8,13 @@ support-files = [
|
|||
"head.js",
|
||||
"inspectedwindow-reload-target.sjs",
|
||||
]
|
||||
prefs = [
|
||||
# restrictedDomains must be set as early as possible, before the first use of
|
||||
# the preference. browser_webextension_inspected_window_access.js relies on
|
||||
# this pref to be set. We cannot use "prefs =" at the individual file, because
|
||||
# another test in this manifest may already have resulted in browser startup.
|
||||
"extensions.webextensions.restrictedDomains=test2.example.com"
|
||||
]
|
||||
|
||||
["browser_webextension_inspected_window.js"]
|
||||
["browser_webextension_inspected_window_access.js"]
|
||||
|
|
|
@ -233,48 +233,6 @@ add_task(async function test_error_inspectedWindowEval_result() {
|
|||
await teardown({ commands, extension });
|
||||
});
|
||||
|
||||
add_task(
|
||||
async function test_system_principal_denied_error_inspectedWindowEval_result() {
|
||||
const { commands, extension, fakeExtCallerInfo } = await setup(
|
||||
"about:addons"
|
||||
);
|
||||
|
||||
const result = await commands.inspectedWindowCommand.eval(
|
||||
fakeExtCallerInfo,
|
||||
"window",
|
||||
{}
|
||||
);
|
||||
|
||||
ok(!result.value, "Got a null result from inspectedWindow eval");
|
||||
ok(
|
||||
result.exceptionInfo.isError,
|
||||
"Got an API Error result from inspectedWindow eval on a system principal page"
|
||||
);
|
||||
is(
|
||||
result.exceptionInfo.code,
|
||||
"E_PROTOCOLERROR",
|
||||
"Got the expected 'code' property in the error result"
|
||||
);
|
||||
is(
|
||||
result.exceptionInfo.description,
|
||||
"Inspector protocol error: %s",
|
||||
"Got the expected 'description' property in the error result"
|
||||
);
|
||||
is(
|
||||
result.exceptionInfo.details.length,
|
||||
1,
|
||||
"The 'details' array property should contains 1 element"
|
||||
);
|
||||
is(
|
||||
result.exceptionInfo.details[0],
|
||||
"This target has a system principal. inspectedWindow.eval denied.",
|
||||
"Got the expected content in the error results's details"
|
||||
);
|
||||
|
||||
await teardown({ commands, extension });
|
||||
}
|
||||
);
|
||||
|
||||
add_task(async function test_exception_inspectedWindowEval_result() {
|
||||
const { commands, extension, fakeExtCallerInfo } = await setup(URL_ROOT_SSL);
|
||||
|
||||
|
|
|
@ -0,0 +1,315 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
async function run_inspectedWindow_eval({ tab, codeToEval, extension }) {
|
||||
const fakeExtCallerInfo = {
|
||||
url: `moz-extension://${extension.uuid}/another/fake-caller-script.js`,
|
||||
lineNumber: 1,
|
||||
addonId: extension.id,
|
||||
};
|
||||
const commands = await CommandsFactory.forTab(tab, { isWebExtension: true });
|
||||
await commands.targetCommand.startListening();
|
||||
const result = await commands.inspectedWindowCommand.eval(
|
||||
fakeExtCallerInfo,
|
||||
codeToEval,
|
||||
{}
|
||||
);
|
||||
await commands.destroy();
|
||||
return result;
|
||||
}
|
||||
|
||||
async function openAboutBlankTabWithExtensionOrigin(extension) {
|
||||
const tab = await BrowserTestUtils.openNewForegroundTab(
|
||||
gBrowser,
|
||||
`moz-extension://${extension.uuid}/manifest.json`
|
||||
);
|
||||
const loaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
await ContentTask.spawn(tab.linkedBrowser, null, () => {
|
||||
// about:blank inherits the principal when opened from content.
|
||||
content.wrappedJSObject.location.assign("about:blank");
|
||||
});
|
||||
await loaded;
|
||||
// Sanity checks:
|
||||
is(tab.linkedBrowser.currentURI.spec, "about:blank", "expected tab");
|
||||
is(
|
||||
tab.linkedBrowser.contentPrincipal.originNoSuffix,
|
||||
`moz-extension://${extension.uuid}`,
|
||||
"about:blank should be at the extension origin"
|
||||
);
|
||||
return tab;
|
||||
}
|
||||
|
||||
async function checkEvalResult({
|
||||
extension,
|
||||
description,
|
||||
url,
|
||||
createTab = () => BrowserTestUtils.openNewForegroundTab(gBrowser, url),
|
||||
expectedResult,
|
||||
}) {
|
||||
const tab = await createTab();
|
||||
is(tab.linkedBrowser.currentURI.spec, url, "Sanity check: tab URL");
|
||||
const result = await run_inspectedWindow_eval({
|
||||
tab,
|
||||
codeToEval: "'code executed at ' + location.href",
|
||||
extension,
|
||||
});
|
||||
BrowserTestUtils.removeTab(tab);
|
||||
SimpleTest.isDeeply(
|
||||
result,
|
||||
expectedResult,
|
||||
`eval result for devtools.inspectedWindow.eval at ${url} (${description})`
|
||||
);
|
||||
}
|
||||
|
||||
async function checkEvalAllowed({ extension, description, url, createTab }) {
|
||||
info(`checkEvalAllowed: ${description} (at URL: ${url})`);
|
||||
await checkEvalResult({
|
||||
extension,
|
||||
description,
|
||||
url,
|
||||
createTab,
|
||||
expectedResult: { value: `code executed at ${url}` },
|
||||
});
|
||||
}
|
||||
async function checkEvalDenied({ extension, description, url, createTab }) {
|
||||
info(`checkEvalDenied: ${description} (at URL: ${url})`);
|
||||
await checkEvalResult({
|
||||
extension,
|
||||
description,
|
||||
url,
|
||||
createTab,
|
||||
expectedResult: {
|
||||
exceptionInfo: {
|
||||
isError: true,
|
||||
code: "E_PROTOCOLERROR",
|
||||
details: [
|
||||
"This extension is not allowed on the current inspected window origin",
|
||||
],
|
||||
description: "Inspector protocol error: %s",
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
add_task(async function test_eval_at_http() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [["dom.security.https_first", false]],
|
||||
});
|
||||
|
||||
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
|
||||
const httpUrl = "http://example.com/";
|
||||
|
||||
// When running with --use-http3-server, http:-URLs cannot be loaded.
|
||||
try {
|
||||
await fetch(httpUrl);
|
||||
} catch {
|
||||
info("Skipping test_eval_at_http because http:-URL cannot be loaded");
|
||||
return;
|
||||
}
|
||||
|
||||
const extension = ExtensionTestUtils.loadExtension({});
|
||||
await extension.startup();
|
||||
|
||||
await checkEvalAllowed({
|
||||
extension,
|
||||
description: "http:-URL",
|
||||
url: httpUrl,
|
||||
});
|
||||
await extension.unload();
|
||||
|
||||
await SpecialPowers.popPrefEnv();
|
||||
});
|
||||
|
||||
add_task(async function test_eval_at_https() {
|
||||
const extension = ExtensionTestUtils.loadExtension({});
|
||||
await extension.startup();
|
||||
|
||||
const privilegedExtension = ExtensionTestUtils.loadExtension({
|
||||
isPrivileged: true,
|
||||
});
|
||||
await privilegedExtension.startup();
|
||||
|
||||
await checkEvalAllowed({
|
||||
extension,
|
||||
description: "https:-URL",
|
||||
url: "https://example.com/",
|
||||
});
|
||||
|
||||
await checkEvalDenied({
|
||||
extension,
|
||||
description: "a restricted domain",
|
||||
// Domain in extensions.webextensions.restrictedDomains by browser.toml.
|
||||
url: "https://test2.example.com/",
|
||||
});
|
||||
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [["extensions.quarantinedDomains.list", "example.com"]],
|
||||
});
|
||||
|
||||
await checkEvalDenied({
|
||||
extension,
|
||||
description: "a quarantined domain",
|
||||
url: "https://example.com/",
|
||||
});
|
||||
|
||||
await checkEvalAllowed({
|
||||
extension: privilegedExtension,
|
||||
description: "a quarantined domain",
|
||||
url: "https://example.com/",
|
||||
});
|
||||
|
||||
await SpecialPowers.popPrefEnv();
|
||||
|
||||
await extension.unload();
|
||||
await privilegedExtension.unload();
|
||||
});
|
||||
|
||||
add_task(async function test_eval_at_sandboxed_page() {
|
||||
const extension = ExtensionTestUtils.loadExtension({});
|
||||
await extension.startup();
|
||||
|
||||
await checkEvalAllowed({
|
||||
extension,
|
||||
description: "page with CSP sandbox",
|
||||
url: "https://example.com/document-builder.sjs?headers=Content-Security-Policy:sandbox&html=x",
|
||||
});
|
||||
await checkEvalDenied({
|
||||
extension,
|
||||
description: "restricted domain with CSP sandbox",
|
||||
url: "https://test2.example.com/document-builder.sjs?headers=Content-Security-Policy:sandbox&html=x",
|
||||
});
|
||||
|
||||
await extension.unload();
|
||||
});
|
||||
|
||||
add_task(async function test_eval_at_own_extension_origin_allowed() {
|
||||
const extension = ExtensionTestUtils.loadExtension({
|
||||
background() {
|
||||
// eslint-disable-next-line no-undef
|
||||
browser.test.sendMessage(
|
||||
"blob_url",
|
||||
URL.createObjectURL(new Blob(["blob: here", { type: "text/html" }]))
|
||||
);
|
||||
},
|
||||
files: {
|
||||
"mozext.html": `<!DOCTYPE html>moz-extension: here`,
|
||||
},
|
||||
});
|
||||
await extension.startup();
|
||||
const blobUrl = await extension.awaitMessage("blob_url");
|
||||
|
||||
await checkEvalAllowed({
|
||||
extension,
|
||||
description: "moz-extension:-URL from own extension",
|
||||
url: `moz-extension://${extension.uuid}/mozext.html`,
|
||||
});
|
||||
await checkEvalAllowed({
|
||||
extension,
|
||||
description: "blob:-URL from own extension",
|
||||
url: blobUrl,
|
||||
});
|
||||
await checkEvalAllowed({
|
||||
extension,
|
||||
description: "about:blank with origin from own extension",
|
||||
url: "about:blank",
|
||||
createTab: () => openAboutBlankTabWithExtensionOrigin(extension),
|
||||
});
|
||||
|
||||
await extension.unload();
|
||||
});
|
||||
|
||||
add_task(async function test_eval_at_other_extension_denied() {
|
||||
// The extension for which we simulate devtools_page, chosen as caller of
|
||||
// devtools.inspectedWindow.eval API calls.
|
||||
const extension = ExtensionTestUtils.loadExtension({});
|
||||
await extension.startup();
|
||||
|
||||
// The other extension, that |extension| should not be able to access:
|
||||
const otherExt = ExtensionTestUtils.loadExtension({
|
||||
background() {
|
||||
// eslint-disable-next-line no-undef
|
||||
browser.test.sendMessage(
|
||||
"blob_url",
|
||||
URL.createObjectURL(new Blob(["blob: here", { type: "text/html" }]))
|
||||
);
|
||||
},
|
||||
files: {
|
||||
"mozext.html": `<!DOCTYPE html>moz-extension: here`,
|
||||
},
|
||||
});
|
||||
await otherExt.startup();
|
||||
const otherExtBlobUrl = await otherExt.awaitMessage("blob_url");
|
||||
|
||||
await checkEvalDenied({
|
||||
extension,
|
||||
description: "moz-extension:-URL from another extension",
|
||||
url: `moz-extension://${otherExt.uuid}/mozext.html`,
|
||||
});
|
||||
await checkEvalDenied({
|
||||
extension,
|
||||
description: "blob:-URL from another extension",
|
||||
url: otherExtBlobUrl,
|
||||
});
|
||||
await checkEvalDenied({
|
||||
extension,
|
||||
description: "about:blank with origin from another extension",
|
||||
url: "about:blank",
|
||||
createTab: () => openAboutBlankTabWithExtensionOrigin(otherExt),
|
||||
});
|
||||
|
||||
await otherExt.unload();
|
||||
await extension.unload();
|
||||
});
|
||||
|
||||
add_task(async function test_eval_at_about() {
|
||||
const extension = ExtensionTestUtils.loadExtension({});
|
||||
await extension.startup();
|
||||
await checkEvalAllowed({
|
||||
extension,
|
||||
description: "about:blank (null principal)",
|
||||
url: "about:blank",
|
||||
});
|
||||
await checkEvalDenied({
|
||||
extension,
|
||||
description: "about:addons (system principal)",
|
||||
url: "about:addons",
|
||||
});
|
||||
await checkEvalDenied({
|
||||
extension,
|
||||
description: "about:robots (about page)",
|
||||
url: "about:robots",
|
||||
});
|
||||
await extension.unload();
|
||||
});
|
||||
|
||||
add_task(async function test_eval_at_file() {
|
||||
// FYI: There is also an equivalent test case with a full end-to-end test at:
|
||||
// browser/components/extensions/test/browser/browser_ext_devtools_inspectedWindow_eval_file.js
|
||||
|
||||
const extension = ExtensionTestUtils.loadExtension({});
|
||||
await extension.startup();
|
||||
|
||||
// A dummy file URL that can be loaded in a tab.
|
||||
const fileUrl =
|
||||
"file://" +
|
||||
getTestFilePath("browser_webextension_inspected_window_access.js");
|
||||
|
||||
// checkEvalAllowed test helper cannot be used, because the file:-URL may
|
||||
// redirect elsewhere, so the comparison with the full URL fails.
|
||||
const tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, fileUrl);
|
||||
const result = await run_inspectedWindow_eval({
|
||||
tab,
|
||||
codeToEval: "'code executed at ' + location.protocol",
|
||||
extension,
|
||||
});
|
||||
BrowserTestUtils.removeTab(tab);
|
||||
SimpleTest.isDeeply(
|
||||
result,
|
||||
{ value: "code executed at file:" },
|
||||
`eval result for devtools.inspectedWindow.eval at ${fileUrl}`
|
||||
);
|
||||
|
||||
await extension.unload();
|
||||
});
|
|
@ -8752,34 +8752,36 @@ nsresult nsDocShell::HandleSameDocumentNavigation(
|
|||
("Upgraded URI to %s", newURI->GetSpecOrDefault().get()));
|
||||
}
|
||||
|
||||
// check if aLoadState->URI(), principalURI, mCurrentURI are same origin
|
||||
// skip handling otherwise
|
||||
nsCOMPtr<nsIPrincipal> origPrincipal = doc->NodePrincipal();
|
||||
nsCOMPtr<nsIURI> principalURI = origPrincipal->GetURI();
|
||||
if (origPrincipal->GetIsNullPrincipal()) {
|
||||
nsCOMPtr<nsIPrincipal> precursor = origPrincipal->GetPrecursorPrincipal();
|
||||
if (precursor) {
|
||||
principalURI = precursor->GetURI();
|
||||
if (StaticPrefs::dom_security_setdocumenturi()) {
|
||||
// check if aLoadState->URI(), principalURI, mCurrentURI are same origin
|
||||
// skip handling otherwise
|
||||
nsCOMPtr<nsIPrincipal> origPrincipal = doc->NodePrincipal();
|
||||
nsCOMPtr<nsIURI> principalURI = origPrincipal->GetURI();
|
||||
if (origPrincipal->GetIsNullPrincipal()) {
|
||||
nsCOMPtr<nsIPrincipal> precursor = origPrincipal->GetPrecursorPrincipal();
|
||||
if (precursor) {
|
||||
principalURI = precursor->GetURI();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
auto isLoadableViaInternet = [](nsIURI* uri) {
|
||||
return (uri && (net::SchemeIsHTTP(uri) || net::SchemeIsHTTPS(uri)));
|
||||
};
|
||||
auto isLoadableViaInternet = [](nsIURI* uri) {
|
||||
return (uri && (net::SchemeIsHTTP(uri) || net::SchemeIsHTTPS(uri)));
|
||||
};
|
||||
|
||||
if (isLoadableViaInternet(principalURI) &&
|
||||
isLoadableViaInternet(mCurrentURI) && isLoadableViaInternet(newURI)) {
|
||||
nsIScriptSecurityManager* ssm = nsContentUtils::GetSecurityManager();
|
||||
if (!NS_SUCCEEDED(
|
||||
ssm->CheckSameOriginURI(newURI, principalURI, false, false)) ||
|
||||
!NS_SUCCEEDED(
|
||||
ssm->CheckSameOriginURI(mCurrentURI, principalURI, false, false))) {
|
||||
MOZ_LOG(gSHLog, LogLevel::Debug,
|
||||
("nsDocShell[%p]: possible violation of the same origin policy "
|
||||
"during same document navigation",
|
||||
this));
|
||||
aSameDocument = false;
|
||||
return NS_OK;
|
||||
if (isLoadableViaInternet(principalURI) &&
|
||||
isLoadableViaInternet(mCurrentURI) && isLoadableViaInternet(newURI)) {
|
||||
nsIScriptSecurityManager* ssm = nsContentUtils::GetSecurityManager();
|
||||
if (!NS_SUCCEEDED(
|
||||
ssm->CheckSameOriginURI(newURI, principalURI, false, false)) ||
|
||||
!NS_SUCCEEDED(ssm->CheckSameOriginURI(mCurrentURI, principalURI,
|
||||
false, false))) {
|
||||
MOZ_LOG(gSHLog, LogLevel::Debug,
|
||||
("nsDocShell[%p]: possible violation of the same origin policy "
|
||||
"during same document navigation",
|
||||
this));
|
||||
aSameDocument = false;
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9668,17 +9668,6 @@ Document* Document::Open(const Optional<nsAString>& /* unused */,
|
|||
}
|
||||
}
|
||||
|
||||
// document.open() inherits the CSP from the opening document.
|
||||
// Please create an actual copy of the CSP (do not share the same
|
||||
// reference) otherwise appending a new policy within the opened
|
||||
// document will be incorrectly propagated to the opening doc.
|
||||
nsCOMPtr<nsIContentSecurityPolicy> csp = callerDoc->GetCsp();
|
||||
if (csp) {
|
||||
RefPtr<nsCSPContext> cspToInherit = new nsCSPContext();
|
||||
cspToInherit->InitFromOther(static_cast<nsCSPContext*>(csp.get()));
|
||||
mCSP = cspToInherit;
|
||||
}
|
||||
|
||||
// At this point we know this is a valid-enough document.open() call
|
||||
// and not a no-op. Increment our use counter.
|
||||
SetUseCounter(eUseCounter_custom_DocumentOpen);
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
[DEFAULT]
|
||||
prefs = [ "browser.privatebrowsing.autostart=true",
|
||||
"dom.cache.privateBrowsing.enabled=true",]
|
||||
|
||||
prefs = [
|
||||
"browser.privatebrowsing.autostart=true",
|
||||
"dom.cache.privateBrowsing.enabled=true",
|
||||
]
|
||||
dupe-manifest = true
|
||||
|
||||
tags = "dom-cache-api dom-cache-api-private"
|
||||
|
||||
["include:mochitest-common.ini"]
|
||||
["include:mochitest-common.toml"]
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
[DEFAULT]
|
||||
dupe-manifest = true
|
||||
|
||||
tags = "dom-cache-api dom-cache-api-regular"
|
||||
|
||||
["include:mochitest-common.ini"]
|
||||
["include:mochitest-common.toml"]
|
||||
|
|
|
@ -5980,17 +5980,15 @@ nsresult CanvasRenderingContext2D::GetImageDataArray(
|
|||
RefPtr<DataSourceSurface> readback = snapshot->GetDataSurface();
|
||||
mBufferProvider->ReturnSnapshot(snapshot.forget());
|
||||
|
||||
// Check for site-specific permission. This check is not needed if the
|
||||
// canvas was created with a docshell (that is only done for special
|
||||
// internal uses).
|
||||
bool usePlaceholder = false;
|
||||
// Check for site-specific permission.
|
||||
CanvasUtils::ImageExtraction permission =
|
||||
CanvasUtils::ImageExtraction::Unrestricted;
|
||||
if (mCanvasElement) {
|
||||
nsCOMPtr<Document> ownerDoc = mCanvasElement->OwnerDoc();
|
||||
usePlaceholder = !CanvasUtils::IsImageExtractionAllowed(ownerDoc, aCx,
|
||||
aSubjectPrincipal);
|
||||
permission = CanvasUtils::ImageExtractionResult(mCanvasElement, aCx,
|
||||
aSubjectPrincipal);
|
||||
} else if (mOffscreenCanvas) {
|
||||
usePlaceholder = mOffscreenCanvas->ShouldResistFingerprinting(
|
||||
RFPTarget::CanvasImageExtractionPrompt);
|
||||
permission = CanvasUtils::ImageExtractionResult(mOffscreenCanvas, aCx,
|
||||
aSubjectPrincipal);
|
||||
}
|
||||
|
||||
// Clone the data source surface if canvas randomization is enabled. We need
|
||||
|
@ -5999,10 +5997,7 @@ nsresult CanvasRenderingContext2D::GetImageDataArray(
|
|||
//
|
||||
// Note that we don't need to clone if we will use the place holder because
|
||||
// the place holder doesn't use actual image data.
|
||||
bool needRandomizePixels = false;
|
||||
if (!usePlaceholder &&
|
||||
ShouldResistFingerprinting(RFPTarget::CanvasRandomization)) {
|
||||
needRandomizePixels = true;
|
||||
if (permission == CanvasUtils::ImageExtraction::Randomize) {
|
||||
if (readback) {
|
||||
readback = CreateDataSourceSurfaceByCloning(readback);
|
||||
}
|
||||
|
@ -6015,12 +6010,12 @@ nsresult CanvasRenderingContext2D::GetImageDataArray(
|
|||
|
||||
do {
|
||||
uint8_t* randomData;
|
||||
if (usePlaceholder) {
|
||||
if (permission == CanvasUtils::ImageExtraction::Placeholder) {
|
||||
// Since we cannot call any GC-able functions (like requesting the RNG
|
||||
// service) after we call JS_GetUint8ClampedArrayData, we will
|
||||
// pre-generate the randomness required for GeneratePlaceholderCanvasData.
|
||||
randomData = TryToGenerateRandomDataForPlaceholderCanvasData();
|
||||
} else if (needRandomizePixels) {
|
||||
} else if (permission == CanvasUtils::ImageExtraction::Randomize) {
|
||||
// Apply the random noises if canvan randomization is enabled. We don't
|
||||
// need to calculate random noises if we are going to use the place
|
||||
// holder.
|
||||
|
@ -6036,7 +6031,7 @@ nsresult CanvasRenderingContext2D::GetImageDataArray(
|
|||
uint8_t* data = JS_GetUint8ClampedArrayData(darray, &isShared, nogc);
|
||||
MOZ_ASSERT(!isShared); // Should not happen, data was created above
|
||||
|
||||
if (usePlaceholder) {
|
||||
if (permission == CanvasUtils::ImageExtraction::Placeholder) {
|
||||
FillPlaceholderCanvas(randomData, len.value(), data);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -48,6 +48,16 @@
|
|||
|
||||
using namespace mozilla::gfx;
|
||||
|
||||
static bool IsUnrestrictedPrincipal(nsIPrincipal& aPrincipal) {
|
||||
// The system principal can always extract canvas data.
|
||||
if (aPrincipal.IsSystemPrincipal()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Allow extension principals.
|
||||
return aPrincipal.GetIsAddonOrExpandedAddonPrincipal();
|
||||
}
|
||||
|
||||
namespace mozilla::CanvasUtils {
|
||||
|
||||
bool IsImageExtractionAllowed(dom::Document* aDocument, JSContext* aCx,
|
||||
|
@ -103,14 +113,8 @@ bool IsImageExtractionAllowed(dom::Document* aDocument, JSContext* aCx,
|
|||
return false;
|
||||
}
|
||||
|
||||
// The system principal can always extract canvas data.
|
||||
if (aPrincipal.IsSystemPrincipal()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Allow extension principals.
|
||||
auto* principal = BasePrincipal::Cast(&aPrincipal);
|
||||
if (principal->AddonPolicy() || principal->ContentScriptAddonPolicy()) {
|
||||
// The system and extension principals can always extract canvas data.
|
||||
if (IsUnrestrictedPrincipal(aPrincipal)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -176,7 +180,7 @@ bool IsImageExtractionAllowed(dom::Document* aDocument, JSContext* aCx,
|
|||
// Either permit or block extraction if a stored permission setting exists.
|
||||
uint32_t permission;
|
||||
rv = permissionManager->TestPermissionFromPrincipal(
|
||||
principal, PERMISSION_CANVAS_EXTRACT_DATA, &permission);
|
||||
&aPrincipal, PERMISSION_CANVAS_EXTRACT_DATA, &permission);
|
||||
NS_ENSURE_SUCCESS(rv, false);
|
||||
switch (permission) {
|
||||
case nsIPermissionManager::ALLOW_ACTION:
|
||||
|
@ -238,7 +242,7 @@ bool IsImageExtractionAllowed(dom::Document* aDocument, JSContext* aCx,
|
|||
// maybe not
|
||||
nsPIDOMWindowOuter* win = aDocument->GetWindow();
|
||||
nsAutoCString origin;
|
||||
rv = principal->GetOrigin(origin);
|
||||
rv = aPrincipal.GetOrigin(origin);
|
||||
NS_ENSURE_SUCCESS(rv, false);
|
||||
|
||||
if (XRE_IsContentProcess()) {
|
||||
|
@ -262,6 +266,45 @@ bool IsImageExtractionAllowed(dom::Document* aDocument, JSContext* aCx,
|
|||
return false;
|
||||
}
|
||||
|
||||
ImageExtraction ImageExtractionResult(dom::HTMLCanvasElement* aCanvasElement,
|
||||
JSContext* aCx,
|
||||
nsIPrincipal& aPrincipal) {
|
||||
if (IsUnrestrictedPrincipal(aPrincipal)) {
|
||||
return ImageExtraction::Unrestricted;
|
||||
}
|
||||
|
||||
nsCOMPtr<dom::Document> ownerDoc = aCanvasElement->OwnerDoc();
|
||||
if (!IsImageExtractionAllowed(ownerDoc, aCx, aPrincipal)) {
|
||||
return ImageExtraction::Placeholder;
|
||||
}
|
||||
|
||||
if (ownerDoc->ShouldResistFingerprinting(RFPTarget::CanvasRandomization)) {
|
||||
return ImageExtraction::Randomize;
|
||||
}
|
||||
|
||||
return ImageExtraction::Unrestricted;
|
||||
}
|
||||
|
||||
ImageExtraction ImageExtractionResult(dom::OffscreenCanvas* aOffscreenCanvas,
|
||||
JSContext* aCx,
|
||||
nsIPrincipal& aPrincipal) {
|
||||
if (IsUnrestrictedPrincipal(aPrincipal)) {
|
||||
return ImageExtraction::Unrestricted;
|
||||
}
|
||||
|
||||
if (aOffscreenCanvas->ShouldResistFingerprinting(
|
||||
RFPTarget::CanvasImageExtractionPrompt)) {
|
||||
return ImageExtraction::Placeholder;
|
||||
}
|
||||
|
||||
if (aOffscreenCanvas->ShouldResistFingerprinting(
|
||||
RFPTarget::CanvasRandomization)) {
|
||||
return ImageExtraction::Randomize;
|
||||
}
|
||||
|
||||
return ImageExtraction::Unrestricted;
|
||||
}
|
||||
|
||||
bool GetCanvasContextType(const nsAString& str,
|
||||
dom::CanvasContextType* const out_type) {
|
||||
if (str.EqualsLiteral("2d")) {
|
||||
|
|
|
@ -63,6 +63,19 @@ bool IsOffscreenCanvasEnabled(JSContext* aCx, JSObject* aObj);
|
|||
bool IsImageExtractionAllowed(dom::Document* aDocument, JSContext* aCx,
|
||||
nsIPrincipal& aPrincipal);
|
||||
|
||||
enum class ImageExtraction {
|
||||
Unrestricted,
|
||||
Placeholder,
|
||||
Randomize,
|
||||
};
|
||||
|
||||
// Returns whether the result of an image extraction should be replaced
|
||||
// by a placeholder or randomized.
|
||||
ImageExtraction ImageExtractionResult(dom::HTMLCanvasElement* aCanvasElement,
|
||||
JSContext* aCx, nsIPrincipal& aPrincipal);
|
||||
ImageExtraction ImageExtractionResult(dom::OffscreenCanvas* aOffscreenCanvas,
|
||||
JSContext* aCx, nsIPrincipal& aPrincipal);
|
||||
|
||||
// Make a double out of |v|, treating undefined values as 0.0 (for
|
||||
// the sake of sparse arrays). Return true iff coercion
|
||||
// succeeded.
|
||||
|
|
|
@ -4571,6 +4571,13 @@ static UniquePtr<WidgetMouseEvent> CreateMouseOrPointerWidgetEvent(
|
|||
aMouseEvent->mWidget,
|
||||
WidgetMouseEvent::eReal);
|
||||
}
|
||||
|
||||
// Inherit whether the event is synthesized by the test API or not.
|
||||
// Then, when the event is synthesized by a test API and handled in a remote
|
||||
// process, it won't be ignored. See PresShell::HandleEvent().
|
||||
newEvent->mFlags.mIsSynthesizedForTests =
|
||||
aMouseEvent->mFlags.mIsSynthesizedForTests;
|
||||
|
||||
newEvent->mRelatedTarget = aRelatedTarget;
|
||||
newEvent->mRefPoint = aMouseEvent->mRefPoint;
|
||||
newEvent->mModifiers = aMouseEvent->mModifiers;
|
||||
|
|
|
@ -203,7 +203,12 @@ void HTMLSelectElement::ShowPicker(ErrorResult& aRv) {
|
|||
}
|
||||
|
||||
// Step 5. Show the picker, if applicable, for this.
|
||||
if (IsCombobox() && !OpenInParentProcess()) {
|
||||
#if !defined(ANDROID)
|
||||
if (!IsCombobox()) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if (!OpenInParentProcess()) {
|
||||
RefPtr<Document> doc = OwnerDoc();
|
||||
nsContentUtils::DispatchChromeEvent(doc, this, u"mozshowdropdown"_ns,
|
||||
CanBubble::eYes, Cancelable::eNo);
|
||||
|
|
|
@ -8,9 +8,9 @@ with Files("**"):
|
|||
BUG_COMPONENT = ("Core", "Storage: IndexedDB")
|
||||
|
||||
MOCHITEST_MANIFESTS += [
|
||||
"test/mochitest-intl-api.ini",
|
||||
"test/mochitest-private.ini",
|
||||
"test/mochitest-regular.ini",
|
||||
"test/mochitest-intl-api.toml",
|
||||
"test/mochitest-private.toml",
|
||||
"test/mochitest-regular.toml",
|
||||
]
|
||||
|
||||
BROWSER_CHROME_MANIFESTS += ["test/browser.toml"]
|
||||
|
|
|
@ -1,278 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
[DEFAULT]
|
||||
prefs =
|
||||
extensions.blocklist.enabled=false
|
||||
support-files =
|
||||
bfcache_page1.html
|
||||
bfcache_page2.html
|
||||
blob_worker_crash_iframe.html
|
||||
!/dom/events/test/event_leak_utils.js
|
||||
error_events_abort_transactions_iframe.html
|
||||
event_propagation_iframe.html
|
||||
exceptions_in_events_iframe.html
|
||||
file.js
|
||||
helpers.js
|
||||
leaving_page_iframe.html
|
||||
unit/test_abort_deleted_index.js
|
||||
unit/test_abort_deleted_objectStore.js
|
||||
unit/test_add_put.js
|
||||
unit/test_add_twice_failure.js
|
||||
unit/test_advance.js
|
||||
unit/test_autoIncrement.js
|
||||
unit/test_autoIncrement_indexes.js
|
||||
unit/test_blob_file_backed.js
|
||||
unit/test_blocked_order.js
|
||||
unit/test_clear.js
|
||||
unit/test_complex_keyPaths.js
|
||||
unit/test_constraint_error_messages.js
|
||||
unit/test_count.js
|
||||
unit/test_create_index.js
|
||||
unit/test_create_index_with_integer_keys.js
|
||||
unit/test_create_locale_aware_index.js
|
||||
unit/test_create_objectStore.js
|
||||
unit/test_cursor_mutation.js
|
||||
unit/test_cursor_update_updates_indexes.js
|
||||
unit/test_cursors.js
|
||||
unit/test_database_onclose.js
|
||||
unit/test_deleteDatabase.js
|
||||
unit/test_deleteDatabase_interactions.js
|
||||
unit/test_deleteDatabase_onblocked.js
|
||||
unit/test_deleteDatabase_onblocked_duringVersionChange.js
|
||||
unit/test_event_source.js
|
||||
unit/test_getAll.js
|
||||
unit/test_globalObjects_ipc.js
|
||||
unit/test_globalObjects_other.js
|
||||
unit/test_globalObjects_xpc.js
|
||||
unit/test_global_data.js
|
||||
unit/test_index_empty_keyPath.js
|
||||
unit/test_index_getAll.js
|
||||
unit/test_index_getAllObjects.js
|
||||
unit/test_index_object_cursors.js
|
||||
unit/test_index_update_delete.js
|
||||
unit/test_indexes.js
|
||||
unit/test_indexes_bad_values.js
|
||||
unit/test_indexes_funny_things.js
|
||||
unit/test_invalid_cursor.js
|
||||
unit/test_invalid_version.js
|
||||
unit/test_invalidate.js
|
||||
unit/test_key_requirements.js
|
||||
unit/test_keys.js
|
||||
unit/test_locale_aware_indexes.js
|
||||
unit/test_locale_aware_index_getAll.js
|
||||
unit/test_locale_aware_index_getAllObjects.js
|
||||
unit/test_maximal_serialized_object_size.js
|
||||
unit/test_multientry.js
|
||||
unit/test_names_sorted.js
|
||||
unit/test_objectCursors.js
|
||||
unit/test_objectStore_getAllKeys.js
|
||||
unit/test_objectStore_inline_autoincrement_key_added_on_put.js
|
||||
unit/test_objectStore_openKeyCursor.js
|
||||
unit/test_objectStore_remove_values.js
|
||||
unit/test_object_identity.js
|
||||
unit/test_odd_result_order.js
|
||||
unit/test_open_empty_db.js
|
||||
unit/test_open_for_principal.js
|
||||
unit/test_open_objectStore.js
|
||||
unit/test_optionalArguments.js
|
||||
unit/test_overlapping_transactions.js
|
||||
unit/test_put_get_values.js
|
||||
unit/test_put_get_values_autoIncrement.js
|
||||
unit/test_readonly_transactions.js
|
||||
unit/test_readwriteflush_disabled.js
|
||||
unit/test_remove_index.js
|
||||
unit/test_remove_objectStore.js
|
||||
unit/test_rename_index.js
|
||||
unit/test_rename_index_errors.js
|
||||
unit/test_rename_objectStore.js
|
||||
unit/test_rename_objectStore_errors.js
|
||||
unit/test_request_readyState.js
|
||||
unit/test_setVersion.js
|
||||
unit/test_setVersion_abort.js
|
||||
unit/test_setVersion_events.js
|
||||
unit/test_setVersion_exclusion.js
|
||||
unit/test_setVersion_throw.js
|
||||
unit/test_storage_manager_estimate.js
|
||||
unit/test_success_events_after_abort.js
|
||||
unit/test_table_locks.js
|
||||
unit/test_table_rollback.js
|
||||
unit/test_temporary_storage.js
|
||||
unit/test_traffic_jam.js
|
||||
unit/test_transaction_abort.js
|
||||
unit/test_transaction_abort_hang.js
|
||||
unit/test_transaction_duplicate_store_names.js
|
||||
unit/test_transaction_error.js
|
||||
unit/test_transaction_lifetimes.js
|
||||
unit/test_transaction_lifetimes_nested.js
|
||||
unit/test_transaction_ordering.js
|
||||
unit/test_upgrade_add_index.js
|
||||
unit/test_unique_index_update.js
|
||||
unit/test_view_put_get_values.js
|
||||
unit/test_wasm_put_get_values.js
|
||||
unit/test_writer_starvation.js
|
||||
|
||||
[test_abort_deleted_index.html]
|
||||
[test_abort_deleted_objectStore.html]
|
||||
[test_abort_on_reload.html]
|
||||
support-files =
|
||||
abort_on_reload.html
|
||||
skip-if =
|
||||
http3
|
||||
http2
|
||||
[test_add_put.html]
|
||||
[test_add_twice_failure.html]
|
||||
[test_advance.html]
|
||||
[test_autoIncrement.html]
|
||||
[test_autoIncrement_indexes.html]
|
||||
[test_bfcache.html]
|
||||
skip-if =
|
||||
http3
|
||||
http2
|
||||
[test_blob_file_backed.html]
|
||||
[test_blob_simple.html]
|
||||
[test_blob_worker_crash.html]
|
||||
skip-if = os == 'win' && os_version == '6.1' # Bug 1342415
|
||||
[test_blob_worker_xhr_post.html]
|
||||
skip-if =
|
||||
(os == 'win' && os_version == '6.1') || (verify && (os == 'win')) # Bug 1342415
|
||||
http3
|
||||
http2
|
||||
socketprocess_networking # Bug 1827221: test is toggled off here rather than in private.ini
|
||||
# because socketprocess_networking is an un-released feature so we
|
||||
# do not loose much coverage by disabling it here.
|
||||
|
||||
[test_blob_worker_xhr_post_multifile.html]
|
||||
skip-if =
|
||||
os == 'win' && os_version == '6.1' # Bug 1342415
|
||||
http3
|
||||
http2
|
||||
socketprocess_networking # Bug 1827221: test is toggled off here rather than in private.ini
|
||||
# because socketprocess_networking is an un-released feature so we
|
||||
# do not loose much coverage by disabling it here.
|
||||
|
||||
[test_blob_worker_xhr_read.html]
|
||||
[test_blob_worker_xhr_read_slice.html]
|
||||
[test_blocked_order.html]
|
||||
[test_bug937006.html]
|
||||
[test_clear.html]
|
||||
[test_complex_keyPaths.html]
|
||||
[test_constraint_error_messages.html]
|
||||
[test_count.html]
|
||||
[test_create_index.html]
|
||||
[test_create_index_with_integer_keys.html]
|
||||
[test_create_objectStore.html]
|
||||
[test_cursor_mutation.html]
|
||||
[test_cursor_update_updates_indexes.html]
|
||||
[test_cursors.html]
|
||||
[test_database_onclose.html]
|
||||
[test_deleteDatabase.html]
|
||||
[test_deleteDatabase_interactions.html]
|
||||
[test_deleteDatabase_onblocked.html]
|
||||
[test_deleteDatabase_onblocked_duringVersionChange.html]
|
||||
[test_error_events_abort_transactions.html]
|
||||
skip-if = verify
|
||||
[test_event_listener_leaks.html]
|
||||
skip-if = (os == "win" && processor == "aarch64") #bug 1535784
|
||||
[test_event_propagation.html]
|
||||
skip-if = verify
|
||||
[test_event_source.html]
|
||||
[test_exceptions_in_events.html]
|
||||
[test_file_array.html]
|
||||
[test_file_cross_database_copying.html]
|
||||
[test_file_delete.html]
|
||||
[test_file_put_get_object.html]
|
||||
[test_file_put_get_values.html]
|
||||
[test_file_replace.html]
|
||||
[test_file_resurrection_delete.html]
|
||||
skip-if = toolkit == 'android'
|
||||
[test_file_resurrection_transaction_abort.html]
|
||||
skip-if = toolkit == 'android'
|
||||
[test_file_sharing.html]
|
||||
[test_file_transaction_abort.html]
|
||||
[test_getAll.html]
|
||||
[test_getFileId.html]
|
||||
[test_globalObjects_content.html]
|
||||
[test_global_data.html]
|
||||
[test_index_empty_keyPath.html]
|
||||
[test_index_getAll.html]
|
||||
[test_index_getAllObjects.html]
|
||||
[test_index_object_cursors.html]
|
||||
[test_index_update_delete.html]
|
||||
[test_indexes.html]
|
||||
[test_indexes_bad_values.html]
|
||||
[test_indexes_funny_things.html]
|
||||
[test_invalid_cursor.html]
|
||||
[test_invalid_version.html]
|
||||
[test_invalidate.html]
|
||||
# disabled for the moment
|
||||
skip-if = true
|
||||
[test_key_requirements.html]
|
||||
[test_keys.html]
|
||||
[test_leaving_page.html]
|
||||
[test_maximal_serialized_object_size.html]
|
||||
[test_message_manager_ipc.html]
|
||||
[test_multientry.html]
|
||||
[test_names_sorted.html]
|
||||
skip-if =
|
||||
(xorigin && !debug) # Hangs
|
||||
os == "linux" && bits == 64 && !debug # Bug 1602927
|
||||
[test_objectCursors.html]
|
||||
[test_objectStore_getAllKeys.html]
|
||||
[test_objectStore_inline_autoincrement_key_added_on_put.html]
|
||||
[test_objectStore_openKeyCursor.html]
|
||||
[test_objectStore_remove_values.html]
|
||||
[test_object_identity.html]
|
||||
[test_odd_result_order.html]
|
||||
[test_open_empty_db.html]
|
||||
[test_open_for_principal.html]
|
||||
[test_open_objectStore.html]
|
||||
[test_optionalArguments.html]
|
||||
[test_overlapping_transactions.html]
|
||||
[test_put_get_values.html]
|
||||
[test_put_get_values_autoIncrement.html]
|
||||
[test_readonly_transactions.html]
|
||||
[test_readwriteflush_disabled.html]
|
||||
[test_remove_index.html]
|
||||
[test_remove_objectStore.html]
|
||||
[test_rename_index.html]
|
||||
skip-if = os == "linux" && os_version == "18.04" #Bug 1601601
|
||||
[test_rename_index_errors.html]
|
||||
[test_rename_objectStore.html]
|
||||
[test_rename_objectStore_errors.html]
|
||||
[test_request_readyState.html]
|
||||
[test_sandbox.html]
|
||||
skip-if = verify
|
||||
[test_setVersion.html]
|
||||
[test_setVersion_abort.html]
|
||||
[test_setVersion_events.html]
|
||||
[test_setVersion_exclusion.html]
|
||||
[test_setVersion_throw.html]
|
||||
[test_success_events_after_abort.html]
|
||||
[test_table_locks.html]
|
||||
[test_table_rollback.html]
|
||||
[test_third_party.html]
|
||||
support-files =
|
||||
third_party_window.html
|
||||
third_party_iframe1.html
|
||||
third_party_iframe2.html
|
||||
skip-if =
|
||||
http3
|
||||
http2
|
||||
[test_traffic_jam.html]
|
||||
[test_transaction_abort.html]
|
||||
[test_transaction_abort_hang.html]
|
||||
[test_transaction_duplicate_store_names.html]
|
||||
[test_transaction_error.html]
|
||||
[test_transaction_lifetimes.html]
|
||||
[test_transaction_lifetimes_nested.html]
|
||||
[test_transaction_ordering.html]
|
||||
[test_unique_index_update.html]
|
||||
[test_upgrade_add_index.html]
|
||||
skip-if = (!debug && bits == 64 && (os == "linux" || os == "mac")) || (os == "win") #Bug 1637715
|
||||
scheme = https
|
||||
[test_view_put_get_values.html]
|
||||
[test_wasm_put_get_values.html]
|
||||
[test_writer_starvation.html]
|
||||
skip-if = true #Bug 595368
|
|
@ -0,0 +1,396 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
[DEFAULT]
|
||||
prefs = [
|
||||
"extensions.blocklist.enabled=false",
|
||||
]
|
||||
support-files = [
|
||||
"bfcache_page1.html",
|
||||
"bfcache_page2.html",
|
||||
"blob_worker_crash_iframe.html",
|
||||
"!/dom/events/test/event_leak_utils.js",
|
||||
"error_events_abort_transactions_iframe.html",
|
||||
"event_propagation_iframe.html",
|
||||
"exceptions_in_events_iframe.html",
|
||||
"file.js",
|
||||
"helpers.js",
|
||||
"leaving_page_iframe.html",
|
||||
"unit/test_abort_deleted_index.js",
|
||||
"unit/test_abort_deleted_objectStore.js",
|
||||
"unit/test_add_put.js",
|
||||
"unit/test_add_twice_failure.js",
|
||||
"unit/test_advance.js",
|
||||
"unit/test_autoIncrement.js",
|
||||
"unit/test_autoIncrement_indexes.js",
|
||||
"unit/test_blob_file_backed.js",
|
||||
"unit/test_blocked_order.js",
|
||||
"unit/test_clear.js",
|
||||
"unit/test_complex_keyPaths.js",
|
||||
"unit/test_constraint_error_messages.js",
|
||||
"unit/test_count.js",
|
||||
"unit/test_create_index.js",
|
||||
"unit/test_create_index_with_integer_keys.js",
|
||||
"unit/test_create_locale_aware_index.js",
|
||||
"unit/test_create_objectStore.js",
|
||||
"unit/test_cursor_mutation.js",
|
||||
"unit/test_cursor_update_updates_indexes.js",
|
||||
"unit/test_cursors.js",
|
||||
"unit/test_database_onclose.js",
|
||||
"unit/test_deleteDatabase.js",
|
||||
"unit/test_deleteDatabase_interactions.js",
|
||||
"unit/test_deleteDatabase_onblocked.js",
|
||||
"unit/test_deleteDatabase_onblocked_duringVersionChange.js",
|
||||
"unit/test_event_source.js",
|
||||
"unit/test_getAll.js",
|
||||
"unit/test_globalObjects_ipc.js",
|
||||
"unit/test_globalObjects_other.js",
|
||||
"unit/test_globalObjects_xpc.js",
|
||||
"unit/test_global_data.js",
|
||||
"unit/test_index_empty_keyPath.js",
|
||||
"unit/test_index_getAll.js",
|
||||
"unit/test_index_getAllObjects.js",
|
||||
"unit/test_index_object_cursors.js",
|
||||
"unit/test_index_update_delete.js",
|
||||
"unit/test_indexes.js",
|
||||
"unit/test_indexes_bad_values.js",
|
||||
"unit/test_indexes_funny_things.js",
|
||||
"unit/test_invalid_cursor.js",
|
||||
"unit/test_invalid_version.js",
|
||||
"unit/test_invalidate.js",
|
||||
"unit/test_key_requirements.js",
|
||||
"unit/test_keys.js",
|
||||
"unit/test_locale_aware_indexes.js",
|
||||
"unit/test_locale_aware_index_getAll.js",
|
||||
"unit/test_locale_aware_index_getAllObjects.js",
|
||||
"unit/test_maximal_serialized_object_size.js",
|
||||
"unit/test_multientry.js",
|
||||
"unit/test_names_sorted.js",
|
||||
"unit/test_objectCursors.js",
|
||||
"unit/test_objectStore_getAllKeys.js",
|
||||
"unit/test_objectStore_inline_autoincrement_key_added_on_put.js",
|
||||
"unit/test_objectStore_openKeyCursor.js",
|
||||
"unit/test_objectStore_remove_values.js",
|
||||
"unit/test_object_identity.js",
|
||||
"unit/test_odd_result_order.js",
|
||||
"unit/test_open_empty_db.js",
|
||||
"unit/test_open_for_principal.js",
|
||||
"unit/test_open_objectStore.js",
|
||||
"unit/test_optionalArguments.js",
|
||||
"unit/test_overlapping_transactions.js",
|
||||
"unit/test_put_get_values.js",
|
||||
"unit/test_put_get_values_autoIncrement.js",
|
||||
"unit/test_readonly_transactions.js",
|
||||
"unit/test_readwriteflush_disabled.js",
|
||||
"unit/test_remove_index.js",
|
||||
"unit/test_remove_objectStore.js",
|
||||
"unit/test_rename_index.js",
|
||||
"unit/test_rename_index_errors.js",
|
||||
"unit/test_rename_objectStore.js",
|
||||
"unit/test_rename_objectStore_errors.js",
|
||||
"unit/test_request_readyState.js",
|
||||
"unit/test_setVersion.js",
|
||||
"unit/test_setVersion_abort.js",
|
||||
"unit/test_setVersion_events.js",
|
||||
"unit/test_setVersion_exclusion.js",
|
||||
"unit/test_setVersion_throw.js",
|
||||
"unit/test_storage_manager_estimate.js",
|
||||
"unit/test_success_events_after_abort.js",
|
||||
"unit/test_table_locks.js",
|
||||
"unit/test_table_rollback.js",
|
||||
"unit/test_temporary_storage.js",
|
||||
"unit/test_traffic_jam.js",
|
||||
"unit/test_transaction_abort.js",
|
||||
"unit/test_transaction_abort_hang.js",
|
||||
"unit/test_transaction_duplicate_store_names.js",
|
||||
"unit/test_transaction_error.js",
|
||||
"unit/test_transaction_lifetimes.js",
|
||||
"unit/test_transaction_lifetimes_nested.js",
|
||||
"unit/test_transaction_ordering.js",
|
||||
"unit/test_upgrade_add_index.js",
|
||||
"unit/test_unique_index_update.js",
|
||||
"unit/test_view_put_get_values.js",
|
||||
"unit/test_wasm_put_get_values.js",
|
||||
"unit/test_writer_starvation.js",
|
||||
]
|
||||
|
||||
["test_abort_deleted_index.html"]
|
||||
|
||||
["test_abort_deleted_objectStore.html"]
|
||||
|
||||
["test_abort_on_reload.html"]
|
||||
support-files = [
|
||||
"abort_on_reload.html",
|
||||
]
|
||||
skip-if = [
|
||||
"http3",
|
||||
"http2",
|
||||
]
|
||||
|
||||
["test_add_put.html"]
|
||||
|
||||
["test_add_twice_failure.html"]
|
||||
|
||||
["test_advance.html"]
|
||||
|
||||
["test_autoIncrement.html"]
|
||||
|
||||
["test_autoIncrement_indexes.html"]
|
||||
|
||||
["test_bfcache.html"]
|
||||
skip-if = [
|
||||
"http3",
|
||||
"http2",
|
||||
]
|
||||
|
||||
["test_blob_file_backed.html"]
|
||||
|
||||
["test_blob_simple.html"]
|
||||
|
||||
["test_blob_worker_crash.html"]
|
||||
|
||||
["test_blob_worker_xhr_post.html"]
|
||||
skip-if = [
|
||||
"os == 'win' && verify",
|
||||
"http3",
|
||||
"http2",
|
||||
"socketprocess_networking", # Bug 1827221: test is toggled off here rather than in private.ini
|
||||
]
|
||||
|
||||
["test_blob_worker_xhr_post_multifile.html"]
|
||||
skip-if = [
|
||||
"http3",
|
||||
"http2",
|
||||
"socketprocess_networking", # Bug 1827221: test is toggled off here rather than in private.ini
|
||||
]
|
||||
|
||||
["test_blob_worker_xhr_read.html"]
|
||||
|
||||
["test_blob_worker_xhr_read_slice.html"]
|
||||
|
||||
["test_blocked_order.html"]
|
||||
|
||||
["test_bug937006.html"]
|
||||
|
||||
["test_clear.html"]
|
||||
|
||||
["test_complex_keyPaths.html"]
|
||||
|
||||
["test_constraint_error_messages.html"]
|
||||
|
||||
["test_count.html"]
|
||||
|
||||
["test_create_index.html"]
|
||||
|
||||
["test_create_index_with_integer_keys.html"]
|
||||
|
||||
["test_create_objectStore.html"]
|
||||
|
||||
["test_cursor_mutation.html"]
|
||||
|
||||
["test_cursor_update_updates_indexes.html"]
|
||||
|
||||
["test_cursors.html"]
|
||||
|
||||
["test_database_onclose.html"]
|
||||
|
||||
["test_deleteDatabase.html"]
|
||||
|
||||
["test_deleteDatabase_interactions.html"]
|
||||
|
||||
["test_deleteDatabase_onblocked.html"]
|
||||
|
||||
["test_deleteDatabase_onblocked_duringVersionChange.html"]
|
||||
|
||||
["test_error_events_abort_transactions.html"]
|
||||
skip-if = ["verify"]
|
||||
|
||||
["test_event_listener_leaks.html"]
|
||||
|
||||
["test_event_propagation.html"]
|
||||
skip-if = ["verify"]
|
||||
|
||||
["test_event_source.html"]
|
||||
|
||||
["test_exceptions_in_events.html"]
|
||||
|
||||
["test_file_array.html"]
|
||||
|
||||
["test_file_cross_database_copying.html"]
|
||||
|
||||
["test_file_delete.html"]
|
||||
|
||||
["test_file_put_get_object.html"]
|
||||
|
||||
["test_file_put_get_values.html"]
|
||||
|
||||
["test_file_replace.html"]
|
||||
|
||||
["test_file_resurrection_delete.html"]
|
||||
skip-if = ["os == 'android'"]
|
||||
|
||||
["test_file_resurrection_transaction_abort.html"]
|
||||
skip-if = ["os == 'android'"]
|
||||
|
||||
["test_file_sharing.html"]
|
||||
|
||||
["test_file_transaction_abort.html"]
|
||||
|
||||
["test_getAll.html"]
|
||||
|
||||
["test_getFileId.html"]
|
||||
|
||||
["test_globalObjects_content.html"]
|
||||
|
||||
["test_global_data.html"]
|
||||
|
||||
["test_index_empty_keyPath.html"]
|
||||
|
||||
["test_index_getAll.html"]
|
||||
|
||||
["test_index_getAllObjects.html"]
|
||||
|
||||
["test_index_object_cursors.html"]
|
||||
|
||||
["test_index_update_delete.html"]
|
||||
|
||||
["test_indexes.html"]
|
||||
|
||||
["test_indexes_bad_values.html"]
|
||||
|
||||
["test_indexes_funny_things.html"]
|
||||
|
||||
["test_invalid_cursor.html"]
|
||||
|
||||
["test_invalid_version.html"]
|
||||
|
||||
["test_invalidate.html"]
|
||||
skip-if = ["true"] # disabled for the moment
|
||||
|
||||
["test_key_requirements.html"]
|
||||
|
||||
["test_keys.html"]
|
||||
|
||||
["test_leaving_page.html"]
|
||||
|
||||
["test_maximal_serialized_object_size.html"]
|
||||
|
||||
["test_message_manager_ipc.html"]
|
||||
|
||||
["test_multientry.html"]
|
||||
|
||||
["test_names_sorted.html"]
|
||||
skip-if = [
|
||||
"xorigin && !debug", # Hangs
|
||||
"os == 'linux' && bits == 64 && !debug", # Bug 1602927
|
||||
]
|
||||
|
||||
["test_objectCursors.html"]
|
||||
|
||||
["test_objectStore_getAllKeys.html"]
|
||||
|
||||
["test_objectStore_inline_autoincrement_key_added_on_put.html"]
|
||||
|
||||
["test_objectStore_openKeyCursor.html"]
|
||||
|
||||
["test_objectStore_remove_values.html"]
|
||||
|
||||
["test_object_identity.html"]
|
||||
|
||||
["test_odd_result_order.html"]
|
||||
|
||||
["test_open_empty_db.html"]
|
||||
|
||||
["test_open_for_principal.html"]
|
||||
|
||||
["test_open_objectStore.html"]
|
||||
|
||||
["test_optionalArguments.html"]
|
||||
|
||||
["test_overlapping_transactions.html"]
|
||||
|
||||
["test_put_get_values.html"]
|
||||
|
||||
["test_put_get_values_autoIncrement.html"]
|
||||
|
||||
["test_readonly_transactions.html"]
|
||||
|
||||
["test_readwriteflush_disabled.html"]
|
||||
|
||||
["test_remove_index.html"]
|
||||
|
||||
["test_remove_objectStore.html"]
|
||||
|
||||
["test_rename_index.html"]
|
||||
skip-if = ["os == 'linux' && os_version == '18.04'"] #Bug 1601601
|
||||
|
||||
["test_rename_index_errors.html"]
|
||||
|
||||
["test_rename_objectStore.html"]
|
||||
|
||||
["test_rename_objectStore_errors.html"]
|
||||
|
||||
["test_request_readyState.html"]
|
||||
|
||||
["test_sandbox.html"]
|
||||
skip-if = ["verify"]
|
||||
|
||||
["test_setVersion.html"]
|
||||
|
||||
["test_setVersion_abort.html"]
|
||||
|
||||
["test_setVersion_events.html"]
|
||||
|
||||
["test_setVersion_exclusion.html"]
|
||||
|
||||
["test_setVersion_throw.html"]
|
||||
|
||||
["test_success_events_after_abort.html"]
|
||||
|
||||
["test_table_locks.html"]
|
||||
|
||||
["test_table_rollback.html"]
|
||||
|
||||
["test_third_party.html"]
|
||||
support-files = [
|
||||
"third_party_window.html",
|
||||
"third_party_iframe1.html",
|
||||
"third_party_iframe2.html",
|
||||
]
|
||||
skip-if = [
|
||||
"http3",
|
||||
"http2",
|
||||
]
|
||||
|
||||
["test_traffic_jam.html"]
|
||||
|
||||
["test_transaction_abort.html"]
|
||||
|
||||
["test_transaction_abort_hang.html"]
|
||||
|
||||
["test_transaction_duplicate_store_names.html"]
|
||||
|
||||
["test_transaction_error.html"]
|
||||
|
||||
["test_transaction_lifetimes.html"]
|
||||
|
||||
["test_transaction_lifetimes_nested.html"]
|
||||
|
||||
["test_transaction_ordering.html"]
|
||||
|
||||
["test_unique_index_update.html"]
|
||||
|
||||
["test_upgrade_add_index.html"]
|
||||
skip-if = [
|
||||
"!debug && bits == 64 && (os == 'linux' || os == 'mac')",
|
||||
"os == 'win'", #Bug 1637715
|
||||
]
|
||||
scheme = "https"
|
||||
|
||||
["test_view_put_get_values.html"]
|
||||
|
||||
["test_wasm_put_get_values.html"]
|
||||
|
||||
["test_writer_starvation.html"]
|
||||
skip-if = ["true"] #Bug 595368
|
|
@ -1,10 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
[DEFAULT]
|
||||
|
||||
[test_create_locale_aware_index.html]
|
||||
[test_locale_aware_indexes.html]
|
||||
[test_locale_aware_index_getAll.html]
|
||||
[test_locale_aware_index_getAllObjects.html]
|
|
@ -0,0 +1,9 @@
|
|||
[DEFAULT]
|
||||
|
||||
["test_create_locale_aware_index.html"]
|
||||
|
||||
["test_locale_aware_index_getAll.html"]
|
||||
|
||||
["test_locale_aware_index_getAllObjects.html"]
|
||||
|
||||
["test_locale_aware_indexes.html"]
|
|
@ -1,21 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
[DEFAULT]
|
||||
dupe-manifest =
|
||||
prefs =
|
||||
browser.privatebrowsing.autostart=true
|
||||
dom.indexedDB.privateBrowsing.enabled=true
|
||||
extensions.blocklist.enabled=false
|
||||
tags = indexedDB indexedDB-private
|
||||
|
||||
[include:mochitest-common.ini]
|
||||
|
||||
[test_file_os_delete.html]
|
||||
skip-if = true # Bug 1819284: Run test_file_os_delete only for regular manifest.
|
||||
[test_file_put_deleted.html]
|
||||
skip-if = verify # Bug 1829690: Investigate failing test_file_put_delete.html in verify mode for PBM.
|
||||
[test_storage_manager_estimate.html]
|
||||
scheme = https
|
||||
skip-if = xorigin
|
|
@ -0,0 +1,20 @@
|
|||
[DEFAULT]
|
||||
dupe-manifest = true
|
||||
prefs = [
|
||||
"browser.privatebrowsing.autostart=true",
|
||||
"dom.indexedDB.privateBrowsing.enabled=true",
|
||||
"extensions.blocklist.enabled=false",
|
||||
]
|
||||
tags = "indexedDB indexedDB-private"
|
||||
|
||||
["include:mochitest-common.toml"]
|
||||
|
||||
["test_file_os_delete.html"]
|
||||
skip-if = ["true"] # Bug 1819284: Run test_file_os_delete only for regular manifest.
|
||||
|
||||
["test_file_put_deleted.html"]
|
||||
skip-if = ["verify"] # Bug 1829690: Investigate failing test_file_put_delete.html in verify mode for PBM.
|
||||
|
||||
["test_storage_manager_estimate.html"]
|
||||
scheme = "https"
|
||||
skip-if = ["xorigin"]
|
|
@ -1,17 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
[DEFAULT]
|
||||
dupe-manifest =
|
||||
prefs =
|
||||
extensions.blocklist.enabled=false
|
||||
tags = indexedDB indexedDB-regular
|
||||
|
||||
[include:mochitest-common.ini]
|
||||
|
||||
[test_file_os_delete.html] # Bug 1819284: Run test_file_os_delete only for regular manifest.
|
||||
skip-if = xorigin # Bug 1827617: Investigate test_file_os_delete.html failure in xorigin.
|
||||
[test_file_put_deleted.html] # Bug 1829690: Investigate failing test_file_put_delete.html in verify mode for PBM.
|
||||
[test_storage_manager_estimate.html]
|
||||
scheme = https
|
|
@ -0,0 +1,14 @@
|
|||
[DEFAULT]
|
||||
dupe-manifest = true
|
||||
prefs = ["extensions.blocklist.enabled=false"]
|
||||
tags = "indexedDB indexedDB-regular"
|
||||
|
||||
["include:mochitest-common.toml"]
|
||||
|
||||
["test_file_os_delete.html"] # Bug 1819284: Run test_file_os_delete only for regular manifest.
|
||||
skip-if = ["xorigin"] # Bug 1827617: Investigate test_file_os_delete.html failure in xorigin.
|
||||
|
||||
["test_file_put_deleted.html"] # Bug 1829690: Investigate failing test_file_put_delete.html in verify mode for PBM.
|
||||
|
||||
["test_storage_manager_estimate.html"]
|
||||
scheme = "https"
|
|
@ -281,6 +281,11 @@ mozilla::ipc::IPCResult FilePickerParent::RecvOpen(
|
|||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult FilePickerParent::RecvClose() {
|
||||
mFilePicker->Close();
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
void FilePickerParent::ActorDestroy(ActorDestroyReason aWhy) {
|
||||
if (mCallback) {
|
||||
mCallback->Destroy();
|
||||
|
|
|
@ -48,6 +48,8 @@ class FilePickerParent : public PFilePickerParent {
|
|||
const nsString& aDisplaySpecialDirectory, const nsString& aOkButtonLabel,
|
||||
const nsIFilePicker::CaptureTarget& aCapture);
|
||||
|
||||
mozilla::ipc::IPCResult RecvClose();
|
||||
|
||||
virtual void ActorDestroy(ActorDestroyReason aWhy) override;
|
||||
|
||||
class FilePickerShownCallback : public nsIFilePickerShownCallback {
|
||||
|
|
|
@ -38,6 +38,8 @@ parent:
|
|||
nsString displaySpecialDirectory, nsString okButtonLabel,
|
||||
CaptureTarget capture);
|
||||
|
||||
async Close();
|
||||
|
||||
child:
|
||||
async __delete__(MaybeInputData data, ResultCode result);
|
||||
};
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include "nsQueryObject.h"
|
||||
#include "nsSerializationHelper.h"
|
||||
#include "nsFrameLoader.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
|
||||
#include "mozilla/dom/JSWindowActorBinding.h"
|
||||
#include "mozilla/dom/JSWindowActorChild.h"
|
||||
|
@ -585,6 +586,34 @@ void WindowGlobalChild::SetDocumentURI(nsIURI* aDocumentURI) {
|
|||
BrowsingContext()->BrowserId(), InnerWindowId(),
|
||||
nsContentUtils::TruncatedURLForDisplay(aDocumentURI, 1024),
|
||||
embedderInnerWindowID, BrowsingContext()->UsePrivateBrowsing());
|
||||
|
||||
if (StaticPrefs::dom_security_setdocumenturi()) {
|
||||
auto isLoadableViaInternet = [](nsIURI* uri) {
|
||||
return (uri && (net::SchemeIsHTTP(uri) || net::SchemeIsHTTPS(uri)));
|
||||
};
|
||||
if (isLoadableViaInternet(aDocumentURI)) {
|
||||
nsCOMPtr<nsIURI> principalURI = mDocumentPrincipal->GetURI();
|
||||
if (mDocumentPrincipal->GetIsNullPrincipal()) {
|
||||
nsCOMPtr<nsIPrincipal> precursor =
|
||||
mDocumentPrincipal->GetPrecursorPrincipal();
|
||||
if (precursor) {
|
||||
principalURI = precursor->GetURI();
|
||||
}
|
||||
}
|
||||
|
||||
if (isLoadableViaInternet(principalURI)) {
|
||||
nsIScriptSecurityManager* ssm = nsContentUtils::GetSecurityManager();
|
||||
|
||||
if (!NS_SUCCEEDED(ssm->CheckSameOriginURI(principalURI, aDocumentURI,
|
||||
false, false))) {
|
||||
MOZ_DIAGNOSTIC_ASSERT(false,
|
||||
"Setting DocumentURI with a different origin "
|
||||
"than principal URI");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mDocumentURI = aDocumentURI;
|
||||
SendUpdateDocumentURI(aDocumentURI);
|
||||
}
|
||||
|
|
|
@ -384,40 +384,42 @@ mozilla::ipc::IPCResult WindowGlobalParent::RecvInternalLoad(
|
|||
IPCResult WindowGlobalParent::RecvUpdateDocumentURI(nsIURI* aURI) {
|
||||
// XXX(nika): Assert that the URI change was one which makes sense (either
|
||||
// about:blank -> a real URI, or a legal push/popstate URI change):
|
||||
nsAutoCString scheme;
|
||||
if (NS_FAILED(aURI->GetScheme(scheme))) {
|
||||
return IPC_FAIL(this, "Setting DocumentURI without scheme.");
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIIOService> ios = do_GetIOService();
|
||||
if (!ios) {
|
||||
return IPC_FAIL(this, "Cannot get IOService");
|
||||
}
|
||||
nsCOMPtr<nsIProtocolHandler> handler;
|
||||
ios->GetProtocolHandler(scheme.get(), getter_AddRefs(handler));
|
||||
if (!handler) {
|
||||
return IPC_FAIL(this, "Setting DocumentURI with unknown protocol.");
|
||||
}
|
||||
|
||||
auto isLoadableViaInternet = [](nsIURI* uri) {
|
||||
return (uri && (net::SchemeIsHTTP(uri) || net::SchemeIsHTTPS(uri)));
|
||||
};
|
||||
|
||||
if (isLoadableViaInternet(aURI)) {
|
||||
nsCOMPtr<nsIURI> principalURI = mDocumentPrincipal->GetURI();
|
||||
if (mDocumentPrincipal->GetIsNullPrincipal()) {
|
||||
nsCOMPtr<nsIPrincipal> precursor =
|
||||
mDocumentPrincipal->GetPrecursorPrincipal();
|
||||
if (precursor) {
|
||||
principalURI = precursor->GetURI();
|
||||
}
|
||||
if (StaticPrefs::dom_security_setdocumenturi()) {
|
||||
nsAutoCString scheme;
|
||||
if (NS_FAILED(aURI->GetScheme(scheme))) {
|
||||
return IPC_FAIL(this, "Setting DocumentURI without scheme.");
|
||||
}
|
||||
|
||||
if (isLoadableViaInternet(principalURI) &&
|
||||
!nsScriptSecurityManager::SecurityCompareURIs(principalURI, aURI)) {
|
||||
return IPC_FAIL(this,
|
||||
"Setting DocumentURI with a different Origin than "
|
||||
"principal URI");
|
||||
nsCOMPtr<nsIIOService> ios = do_GetIOService();
|
||||
if (!ios) {
|
||||
return IPC_FAIL(this, "Cannot get IOService");
|
||||
}
|
||||
nsCOMPtr<nsIProtocolHandler> handler;
|
||||
ios->GetProtocolHandler(scheme.get(), getter_AddRefs(handler));
|
||||
if (!handler) {
|
||||
return IPC_FAIL(this, "Setting DocumentURI with unknown protocol.");
|
||||
}
|
||||
|
||||
auto isLoadableViaInternet = [](nsIURI* uri) {
|
||||
return (uri && (net::SchemeIsHTTP(uri) || net::SchemeIsHTTPS(uri)));
|
||||
};
|
||||
|
||||
if (isLoadableViaInternet(aURI)) {
|
||||
nsCOMPtr<nsIURI> principalURI = mDocumentPrincipal->GetURI();
|
||||
if (mDocumentPrincipal->GetIsNullPrincipal()) {
|
||||
nsCOMPtr<nsIPrincipal> precursor =
|
||||
mDocumentPrincipal->GetPrecursorPrincipal();
|
||||
if (precursor) {
|
||||
principalURI = precursor->GetURI();
|
||||
}
|
||||
}
|
||||
|
||||
if (isLoadableViaInternet(principalURI) &&
|
||||
!nsScriptSecurityManager::SecurityCompareURIs(principalURI, aURI)) {
|
||||
return IPC_FAIL(this,
|
||||
"Setting DocumentURI with a different Origin than "
|
||||
"principal URI");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
#include "mozilla/dom/ScriptSettings.h"
|
||||
#include "mozilla/dom/PopupBlocker.h"
|
||||
#include "nsContentSecurityManager.h"
|
||||
#include "DefaultURI.h"
|
||||
|
||||
#include "mozilla/LoadInfo.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
|
@ -1186,6 +1187,20 @@ nsJSProtocolHandler::GetScheme(nsACString& result) {
|
|||
return rv;
|
||||
}
|
||||
|
||||
// use DefaultURI to check for validity when we have possible hostnames
|
||||
// since nsSimpleURI doesn't know about hostnames
|
||||
auto pos = aSpec.Find("javascript:");
|
||||
if (pos != kNotFound) {
|
||||
nsDependentCSubstring rest(aSpec, pos + sizeof("javascript:") - 1, -1);
|
||||
if (StringBeginsWith(rest, "//"_ns)) {
|
||||
nsCOMPtr<nsIURI> uriWithHost;
|
||||
rv = NS_MutateURI(new mozilla::net::DefaultURI::Mutator())
|
||||
.SetSpec(aSpec)
|
||||
.Finalize(uriWithHost);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
}
|
||||
|
||||
url.forget(result);
|
||||
return rv;
|
||||
}
|
||||
|
|
|
@ -58,14 +58,14 @@ NS_IMPL_ISUPPORTS(ChannelMediaResource::Listener, nsIRequestObserver,
|
|||
nsIThreadRetargetableStreamListener)
|
||||
|
||||
nsresult ChannelMediaResource::Listener::OnStartRequest(nsIRequest* aRequest) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
mMutex.AssertOnWritingThread(); // Writing thread is MainThread
|
||||
if (!mResource) return NS_OK;
|
||||
return mResource->OnStartRequest(aRequest, mOffset);
|
||||
}
|
||||
|
||||
nsresult ChannelMediaResource::Listener::OnStopRequest(nsIRequest* aRequest,
|
||||
nsresult aStatus) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
mMutex.AssertOnWritingThread();
|
||||
if (!mResource) return NS_OK;
|
||||
return mResource->OnStopRequest(aRequest, aStatus);
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ nsresult ChannelMediaResource::Listener::OnDataAvailable(
|
|||
// This might happen off the main thread.
|
||||
RefPtr<ChannelMediaResource> res;
|
||||
{
|
||||
MutexAutoLock lock(mMutex);
|
||||
MutexSingleWriterAutoLock lock(mMutex);
|
||||
res = mResource;
|
||||
}
|
||||
// Note Rekove() might happen at the same time to reset mResource. We check
|
||||
|
@ -87,7 +87,7 @@ nsresult ChannelMediaResource::Listener::OnDataAvailable(
|
|||
nsresult ChannelMediaResource::Listener::AsyncOnChannelRedirect(
|
||||
nsIChannel* aOld, nsIChannel* aNew, uint32_t aFlags,
|
||||
nsIAsyncVerifyRedirectCallback* cb) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
mMutex.AssertOnWritingThread();
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
if (mResource) {
|
||||
|
@ -114,7 +114,7 @@ nsresult ChannelMediaResource::Listener::GetInterface(const nsIID& aIID,
|
|||
|
||||
void ChannelMediaResource::Listener::Revoke() {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MutexAutoLock lock(mMutex);
|
||||
MutexSingleWriterAutoLock lock(mMutex);
|
||||
mResource = nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -168,12 +168,13 @@ class ChannelMediaResource
|
|||
|
||||
class Listener final : public nsIInterfaceRequestor,
|
||||
public nsIChannelEventSink,
|
||||
public nsIThreadRetargetableStreamListener {
|
||||
public nsIThreadRetargetableStreamListener,
|
||||
public SingleWriterLockOwner {
|
||||
~Listener() = default;
|
||||
|
||||
public:
|
||||
Listener(ChannelMediaResource* aResource, int64_t aOffset, uint32_t aLoadID)
|
||||
: mMutex("Listener.mMutex"),
|
||||
: mMutex("Listener.mMutex", this),
|
||||
mResource(aResource),
|
||||
mOffset(aOffset),
|
||||
mLoadID(aLoadID) {}
|
||||
|
@ -187,12 +188,14 @@ class ChannelMediaResource
|
|||
|
||||
void Revoke();
|
||||
|
||||
bool OnWritingThread() const override { return NS_IsMainThread(); }
|
||||
|
||||
private:
|
||||
Mutex mMutex MOZ_UNANNOTATED;
|
||||
MutexSingleWriter mMutex;
|
||||
// mResource should only be modified on the main thread with the lock.
|
||||
// So it can be read without lock on the main thread or on other threads
|
||||
// with the lock.
|
||||
RefPtr<ChannelMediaResource> mResource;
|
||||
RefPtr<ChannelMediaResource> mResource MOZ_GUARDED_BY(mMutex);
|
||||
|
||||
const int64_t mOffset;
|
||||
const uint32_t mLoadID;
|
||||
|
|
|
@ -735,7 +735,7 @@ class IntervalSet {
|
|||
}
|
||||
|
||||
bool LessThan(const ElemType& aT1, const ElemType& aT2) const {
|
||||
return aT1.mStart - aT1.mFuzz < aT2.mStart + aT2.mFuzz;
|
||||
return aT1.mStart < aT2.mStart;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
|
@ -94,6 +94,18 @@ bool ScriptBytecodeCompress(Vector<uint8_t>& aBytecodeBuf,
|
|||
uncompressedLength = uncompressedLayout.bytecodeLength();
|
||||
z_stream zstream{.next_in = uncompressedLayout.bytecode(),
|
||||
.avail_in = uncompressedLength};
|
||||
|
||||
// Note: deflateInit needs to be called before deflateBound.
|
||||
const uint32_t compressionLevel =
|
||||
StaticPrefs::browser_cache_jsbc_compression_level();
|
||||
if (deflateInit(&zstream, compressionLevel) != Z_OK) {
|
||||
LOG(
|
||||
("ScriptLoadRequest: Unable to initialize bytecode cache "
|
||||
"compression."));
|
||||
return false;
|
||||
}
|
||||
auto autoDestroy = MakeScopeExit([&]() { deflateEnd(&zstream); });
|
||||
|
||||
auto compressedLength = deflateBound(&zstream, uncompressedLength);
|
||||
if (!aCompressedBytecodeBufOut.resizeUninitialized(
|
||||
compressedLength + compressedLayout.preludeLength() +
|
||||
|
@ -107,16 +119,6 @@ bool ScriptBytecodeCompress(Vector<uint8_t>& aBytecodeBuf,
|
|||
zstream.next_out = compressedLayout.bytecode();
|
||||
zstream.avail_out = compressedLength;
|
||||
|
||||
const uint32_t compressionLevel =
|
||||
StaticPrefs::browser_cache_jsbc_compression_level();
|
||||
if (deflateInit(&zstream, compressionLevel) != Z_OK) {
|
||||
LOG(
|
||||
("ScriptLoadRequest: Unable to initialize bytecode cache "
|
||||
"compression."));
|
||||
return false;
|
||||
}
|
||||
auto autoDestroy = MakeScopeExit([&]() { deflateEnd(&zstream); });
|
||||
|
||||
int ret = deflate(&zstream, Z_FINISH);
|
||||
if (ret == Z_MEM_ERROR) {
|
||||
return false;
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Bug 1764343 - CSP inheritance for same-origin iframes</title>
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'none'; script-src 'nonce-a' 'nonce-b'; img-src 'none'">
|
||||
</head>
|
||||
<body>
|
||||
initial content
|
||||
</body>
|
||||
</html>
|
|
@ -398,6 +398,11 @@ support-files = [
|
|||
"file_bug1738418_child.html",
|
||||
]
|
||||
|
||||
["test_bug1764343.html"]
|
||||
support-files = [
|
||||
"file_bug1764343.html",
|
||||
]
|
||||
|
||||
["test_bug1777572.html"]
|
||||
support-files = ["file_bug1777572.html"]
|
||||
skip-if = ["os == 'android'"] # This unusual window.close/open test times out on Android.
|
||||
|
|
|
@ -0,0 +1,116 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Bug 1764343 - CSP inheritance for same-origin iframes</title>
|
||||
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
|
||||
<meta http-equiv="Content-Security-Policy" content="style-src 'unsafe-inline'; script-src 'nonce-parent' 'nonce-a' 'nonce-b' 'nonce-c'; img-src 'self' data:">
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="sameOriginMetaFrame"></iframe>
|
||||
<iframe id="aboutBlankMetaFrame"></iframe>
|
||||
<script nonce='parent'>
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
const NEW_HTML =`
|
||||
<head>
|
||||
<meta http-equiv="Content-Security-Policy" content="script-src 'nonce-a' 'nonce-c' 'nonce-d';">
|
||||
</head>
|
||||
<body>
|
||||
<style>
|
||||
body { background-color: rgb(255, 0, 0); }
|
||||
</style>
|
||||
<script nonce="a">
|
||||
document.a = true;
|
||||
<\/script>
|
||||
<script nonce="b">
|
||||
document.b = true;
|
||||
<\/script>
|
||||
<script nonce="c">
|
||||
document.c = true;
|
||||
<\/script>
|
||||
<script nonce="d">
|
||||
document.d = true;
|
||||
<\/script>
|
||||
<img id="testInlineImage"></img>
|
||||
</body>
|
||||
`;
|
||||
|
||||
// test file's CSP meta tags shouldn't overwrite same-origin iframe's CSP meta tags
|
||||
async function testBlocked() {
|
||||
info("testBlocked");
|
||||
|
||||
let sameOriginMetaFrame = document.getElementById("sameOriginMetaFrame");
|
||||
let onFrameLoad = new Promise(resolve => {
|
||||
sameOriginMetaFrame.addEventListener('load', resolve, {once: true});
|
||||
});
|
||||
sameOriginMetaFrame.src = 'file_bug1764343.html';
|
||||
await onFrameLoad;
|
||||
|
||||
let doc = sameOriginMetaFrame.contentDocument;
|
||||
doc.open();
|
||||
doc.write(NEW_HTML);
|
||||
|
||||
let bgcolor = window.getComputedStyle(doc.body).getPropertyValue("background-color");
|
||||
is(bgcolor, "rgba(0, 0, 0, 0)", "inital background value in FF should be 'transparent'");
|
||||
|
||||
let img = doc.getElementById("testInlineImage");
|
||||
let onImgError = new Promise(resolve => {
|
||||
img.addEventListener('error', resolve, {once: true});
|
||||
});
|
||||
img.src = "//mochi.test:8888/tests/image/test/mochitest/blue.png";
|
||||
await onImgError;
|
||||
is(img.complete, false, "image should not be loaded");
|
||||
|
||||
// Make sure that CSP policy can further restrict (no 'nonce-b'), but not weak (adding 'nonce-c' or 'nonce-d')
|
||||
is(doc.a, true, "doc.a should be true (script 'nonce-a' allowed)");
|
||||
is(doc.b, undefined, "doc.b should be undefined (script 'nonce-b' blocked)");
|
||||
is(doc.c, undefined, "doc.c should be undefined (script 'nonce-c' blocked)");
|
||||
is(doc.d, undefined, "doc.d should be undefined (script 'nonce-d' blocked)");
|
||||
}
|
||||
|
||||
// test file's CSP meta tags should apply to about blank iframe's CSP meta tags
|
||||
async function testNotBlocked() {
|
||||
info("testNotBlocked");
|
||||
|
||||
let aboutBlankMetaFrame = document.getElementById("aboutBlankMetaFrame");
|
||||
let onFrameLoad = new Promise(resolve => {
|
||||
aboutBlankMetaFrame.addEventListener('load', resolve, {once: true});
|
||||
});
|
||||
aboutBlankMetaFrame.src = 'about:blank';
|
||||
await onFrameLoad;
|
||||
|
||||
let doc = aboutBlankMetaFrame.contentDocument;
|
||||
doc.open();
|
||||
doc.write(NEW_HTML);
|
||||
|
||||
let bgcolor = window.getComputedStyle(doc.body).getPropertyValue("background-color");
|
||||
is(bgcolor, "rgb(255, 0, 0)", "background value should be updated to red");
|
||||
|
||||
let img = doc.getElementById("testInlineImage");
|
||||
let onImgLoad = new Promise(resolve => {
|
||||
img.addEventListener('load', resolve, {once: true});
|
||||
});
|
||||
img.src = "//mochi.test:8888/tests/image/test/mochitest/blue.png";
|
||||
await onImgLoad;
|
||||
is(img.complete, true, "image should be loaded");
|
||||
|
||||
// New HTML contains 'nonce-a/c/d' and no CSP in about:blank.
|
||||
// (Can not weaken parent with 'nonce-d')
|
||||
is(doc.a, true, "doc.a should be true (script 'nonce-a' allowed)");
|
||||
is(doc.b, undefined, "doc.b should be undefined (script 'nonce-b' blocked)");
|
||||
is(doc.c, true, "doc.c should be true (script 'nonce-c' allowed)");
|
||||
is(doc.d, undefined, "doc.d should be true (script 'nonce-d' blocked)");
|
||||
}
|
||||
|
||||
(async function () {
|
||||
await testBlocked();
|
||||
await testNotBlocked();
|
||||
SimpleTest.finish();
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -42,9 +42,6 @@ support-files = [
|
|||
support-files = ["file_navigation.html"]
|
||||
|
||||
["browser_schemeless.js"]
|
||||
skip-if = [
|
||||
"os == 'linux'", # Bug 1863797
|
||||
]
|
||||
|
||||
["browser_slow_download.js"]
|
||||
support-files = [
|
||||
|
|
|
@ -29,7 +29,6 @@ async function runMainTest(aInput, aDesc, aExpectedScheme) {
|
|||
window,
|
||||
value: aInput,
|
||||
});
|
||||
await TestUtils.waitForTick();
|
||||
EventUtils.synthesizeKey("KEY_Enter");
|
||||
await loaded;
|
||||
|
||||
|
@ -48,7 +47,6 @@ async function runCanonizedTest(aInput, aDesc, aExpectedScheme) {
|
|||
window,
|
||||
value: aInput,
|
||||
});
|
||||
await TestUtils.waitForTick();
|
||||
EventUtils.synthesizeKey("KEY_Enter", { ctrlKey: true });
|
||||
await loaded;
|
||||
|
||||
|
@ -73,7 +71,6 @@ async function runNewTabTest(aInput, aDesc, aExpectedScheme) {
|
|||
window,
|
||||
value: aInput,
|
||||
});
|
||||
await TestUtils.waitForTick();
|
||||
EventUtils.synthesizeKey("KEY_Enter", { altKey: true });
|
||||
const newTab = await newTabPromise;
|
||||
|
||||
|
@ -101,7 +98,6 @@ async function runNewWindowTest(aInput, aDesc, aExpectedScheme) {
|
|||
window,
|
||||
value: aInput,
|
||||
});
|
||||
await TestUtils.waitForTick();
|
||||
EventUtils.synthesizeKey("KEY_Enter", { shiftKey: true });
|
||||
const newWindow = await newWindowPromise;
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "mozilla/dom/PRemoteWorkerControllerChild.h"
|
||||
#include "mozilla/dom/ServiceWorkerRegistrationInfo.h"
|
||||
#include "mozilla/net/NeckoChannelParams.h"
|
||||
#include "mozilla/dom/RemoteWorkerControllerChild.h"
|
||||
|
||||
namespace mozilla::dom {
|
||||
|
||||
|
@ -308,6 +309,14 @@ mozilla::ipc::IPCResult FetchEventOpChild::RecvRespondWith(
|
|||
ParentToParentFetchEventRespondWithResult&& aResult) {
|
||||
AssertIsOnMainThread();
|
||||
|
||||
RefPtr<RemoteWorkerControllerChild> mgr =
|
||||
static_cast<RemoteWorkerControllerChild*>(Manager());
|
||||
|
||||
mInterceptedChannel->SetRemoteWorkerLaunchStart(
|
||||
mgr->GetRemoteWorkerLaunchStart());
|
||||
mInterceptedChannel->SetRemoteWorkerLaunchEnd(
|
||||
mgr->GetRemoteWorkerLaunchEnd());
|
||||
|
||||
switch (aResult.type()) {
|
||||
case ParentToParentFetchEventRespondWithResult::
|
||||
TParentToParentSynthesizeResponseArgs:
|
||||
|
|
|
@ -112,7 +112,7 @@ include("/ipc/chromium/chromium-config.mozbuild")
|
|||
FINAL_LIBRARY = "xul"
|
||||
|
||||
MOCHITEST_MANIFESTS += [
|
||||
"test/mochitest-dFPI.ini",
|
||||
"test/mochitest-dFPI.toml",
|
||||
"test/mochitest.toml",
|
||||
"test/performance/perftest.toml",
|
||||
]
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
prefs = ["network.cookie.cookieBehavior=5"]
|
||||
dupe-manifest = true
|
||||
|
||||
["include:browser-common.ini"]
|
||||
["include:browser-common.toml"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[DEFAULT]
|
||||
dupe-manifest = true
|
||||
|
||||
["include:browser-common.ini"]
|
||||
["include:browser-common.toml"]
|
||||
|
|
|
@ -1,390 +0,0 @@
|
|||
[DEFAULT]
|
||||
tags = condprof
|
||||
support-files =
|
||||
abrupt_completion_worker.js
|
||||
worker.js
|
||||
worker2.js
|
||||
worker3.js
|
||||
fetch_event_worker.js
|
||||
parse_error_worker.js
|
||||
activate_event_error_worker.js
|
||||
install_event_worker.js
|
||||
install_event_error_worker.js
|
||||
simpleregister/index.html
|
||||
simpleregister/ready.html
|
||||
controller/index.html
|
||||
unregister/index.html
|
||||
unregister/unregister.html
|
||||
workerUpdate/update.html
|
||||
sw_clients/simple.html
|
||||
sw_clients/service_worker_controlled.html
|
||||
match_all_worker.js
|
||||
match_all_advanced_worker.js
|
||||
worker_unregister.js
|
||||
worker_update.js
|
||||
message_posting_worker.js
|
||||
fetch/index.html
|
||||
fetch/fetch_worker_script.js
|
||||
fetch/fetch_tests.js
|
||||
fetch/deliver-gzip.sjs
|
||||
fetch/redirect.sjs
|
||||
fetch/real-file.txt
|
||||
fetch/cookie/cookie_test.js
|
||||
fetch/cookie/register.html
|
||||
fetch/cookie/unregister.html
|
||||
fetch/hsts/hsts_test.js
|
||||
fetch/hsts/embedder.html
|
||||
fetch/hsts/image.html
|
||||
fetch/hsts/image-20px.png
|
||||
fetch/hsts/image-40px.png
|
||||
fetch/hsts/realindex.html
|
||||
fetch/hsts/register.html
|
||||
fetch/hsts/register.html^headers^
|
||||
fetch/hsts/unregister.html
|
||||
fetch/https/index.html
|
||||
fetch/https/register.html
|
||||
fetch/https/unregister.html
|
||||
fetch/https/https_test.js
|
||||
fetch/https/clonedresponse/index.html
|
||||
fetch/https/clonedresponse/register.html
|
||||
fetch/https/clonedresponse/unregister.html
|
||||
fetch/https/clonedresponse/https_test.js
|
||||
fetch/imagecache/image-20px.png
|
||||
fetch/imagecache/image-40px.png
|
||||
fetch/imagecache/imagecache_test.js
|
||||
fetch/imagecache/index.html
|
||||
fetch/imagecache/postmortem.html
|
||||
fetch/imagecache/register.html
|
||||
fetch/imagecache/unregister.html
|
||||
fetch/imagecache-maxage/index.html
|
||||
fetch/imagecache-maxage/image-20px.png
|
||||
fetch/imagecache-maxage/image-40px.png
|
||||
fetch/imagecache-maxage/maxage_test.js
|
||||
fetch/imagecache-maxage/register.html
|
||||
fetch/imagecache-maxage/unregister.html
|
||||
fetch/importscript-mixedcontent/register.html
|
||||
fetch/importscript-mixedcontent/unregister.html
|
||||
fetch/importscript-mixedcontent/https_test.js
|
||||
fetch/interrupt.sjs
|
||||
fetch/origin/index.sjs
|
||||
fetch/origin/index-to-https.sjs
|
||||
fetch/origin/realindex.html
|
||||
fetch/origin/realindex.html^headers^
|
||||
fetch/origin/register.html
|
||||
fetch/origin/unregister.html
|
||||
fetch/origin/origin_test.js
|
||||
fetch/origin/https/index-https.sjs
|
||||
fetch/origin/https/realindex.html
|
||||
fetch/origin/https/realindex.html^headers^
|
||||
fetch/origin/https/register.html
|
||||
fetch/origin/https/unregister.html
|
||||
fetch/origin/https/origin_test.js
|
||||
fetch/requesturl/index.html
|
||||
fetch/requesturl/redirect.sjs
|
||||
fetch/requesturl/redirector.html
|
||||
fetch/requesturl/register.html
|
||||
fetch/requesturl/requesturl_test.js
|
||||
fetch/requesturl/secret.html
|
||||
fetch/requesturl/unregister.html
|
||||
fetch/sandbox/index.html
|
||||
fetch/sandbox/intercepted_index.html
|
||||
fetch/sandbox/register.html
|
||||
fetch/sandbox/unregister.html
|
||||
fetch/sandbox/sandbox_test.js
|
||||
fetch/upgrade-insecure/upgrade-insecure_test.js
|
||||
fetch/upgrade-insecure/embedder.html
|
||||
fetch/upgrade-insecure/embedder.html^headers^
|
||||
fetch/upgrade-insecure/image.html
|
||||
fetch/upgrade-insecure/image-20px.png
|
||||
fetch/upgrade-insecure/image-40px.png
|
||||
fetch/upgrade-insecure/realindex.html
|
||||
fetch/upgrade-insecure/register.html
|
||||
fetch/upgrade-insecure/unregister.html
|
||||
match_all_properties_worker.js
|
||||
match_all_clients/match_all_controlled.html
|
||||
test_serviceworker_interfaces.js
|
||||
serviceworker_wrapper.js
|
||||
message_receiver.html
|
||||
serviceworker_not_sharedworker.js
|
||||
match_all_client/match_all_client_id.html
|
||||
match_all_client_id_worker.js
|
||||
source_message_posting_worker.js
|
||||
scope/scope_worker.js
|
||||
redirect_serviceworker.sjs
|
||||
importscript.sjs
|
||||
importscript_worker.js
|
||||
bug1151916_worker.js
|
||||
bug1151916_driver.html
|
||||
bug1240436_worker.js
|
||||
notificationclick.html
|
||||
notificationclick-otherwindow.html
|
||||
notificationclick.js
|
||||
notificationclick_focus.html
|
||||
notificationclick_focus.js
|
||||
notificationclose.html
|
||||
notificationclose.js
|
||||
worker_updatefoundevent.js
|
||||
worker_updatefoundevent2.js
|
||||
updatefoundevent.html
|
||||
empty.html
|
||||
empty.js
|
||||
notification_constructor_error.js
|
||||
notification_get_sw.js
|
||||
notification/register.html
|
||||
sanitize/frame.html
|
||||
sanitize/register.html
|
||||
sanitize/example_check_and_unregister.html
|
||||
sanitize_worker.js
|
||||
streamfilter_server.sjs
|
||||
streamfilter_worker.js
|
||||
swa/worker_scope_different.js
|
||||
swa/worker_scope_different.js^headers^
|
||||
swa/worker_scope_different2.js
|
||||
swa/worker_scope_different2.js^headers^
|
||||
swa/worker_scope_precise.js
|
||||
swa/worker_scope_precise.js^headers^
|
||||
swa/worker_scope_too_deep.js
|
||||
swa/worker_scope_too_deep.js^headers^
|
||||
swa/worker_scope_too_narrow.js
|
||||
swa/worker_scope_too_narrow.js^headers^
|
||||
claim_oninstall_worker.js
|
||||
claim_worker_1.js
|
||||
claim_worker_2.js
|
||||
claim_clients/client.html
|
||||
force_refresh_worker.js
|
||||
sw_clients/refresher.html
|
||||
sw_clients/refresher_compressed.html
|
||||
sw_clients/refresher_compressed.html^headers^
|
||||
sw_clients/refresher_cached.html
|
||||
sw_clients/refresher_cached_compressed.html
|
||||
sw_clients/refresher_cached_compressed.html^headers^
|
||||
strict_mode_warning.js
|
||||
skip_waiting_installed_worker.js
|
||||
skip_waiting_scope/index.html
|
||||
thirdparty/iframe1.html
|
||||
thirdparty/iframe2.html
|
||||
thirdparty/register.html
|
||||
thirdparty/unregister.html
|
||||
thirdparty/sw.js
|
||||
thirdparty/worker.js
|
||||
register_https.html
|
||||
gzip_redirect_worker.js
|
||||
sw_clients/navigator.html
|
||||
eval_worker.js
|
||||
test_eval_allowed.html^headers^
|
||||
opaque_intercept_worker.js
|
||||
notify_loaded.js
|
||||
fetch/plugin/worker.js
|
||||
fetch/plugin/plugins.html
|
||||
eventsource/*
|
||||
sw_clients/file_blob_upload_frame.html
|
||||
redirect_post.sjs
|
||||
xslt_worker.js
|
||||
xslt/*
|
||||
unresolved_fetch_worker.js
|
||||
header_checker.sjs
|
||||
openWindow_worker.js
|
||||
redirect.sjs
|
||||
open_window/client.sjs
|
||||
lorem_script.js
|
||||
file_blob_response_worker.js
|
||||
file_js_cache_cleanup.js
|
||||
file_js_cache.html
|
||||
file_js_cache_with_sri.html
|
||||
file_js_cache.js
|
||||
file_js_cache_save_after_load.html
|
||||
file_js_cache_save_after_load.js
|
||||
file_js_cache_syntax_error.html
|
||||
file_js_cache_syntax_error.js
|
||||
!/dom/security/test/cors/file_CrossSiteXHR_server.sjs
|
||||
!/dom/notification/test/mochitest/MockServices.js
|
||||
!/dom/notification/test/mochitest/NotificationTest.js
|
||||
blocking_install_event_worker.js
|
||||
sw_bad_mime_type.js
|
||||
sw_bad_mime_type.js^headers^
|
||||
error_reporting_helpers.js
|
||||
fetch.js
|
||||
hello.html
|
||||
create_another_sharedWorker.html
|
||||
sharedWorker_fetch.js
|
||||
async_waituntil_worker.js
|
||||
lazy_worker.js
|
||||
nofetch_handler_worker.js
|
||||
service_worker.js
|
||||
service_worker_client.html
|
||||
utils.js
|
||||
sw_storage_not_allow.js
|
||||
update_worker.sjs
|
||||
self_update_worker.sjs
|
||||
!/dom/events/test/event_leak_utils.js
|
||||
onmessageerror_worker.js
|
||||
pref/fetch_nonexistent_file.html
|
||||
pref/intercept_nonexistent_file_sw.js
|
||||
|
||||
[test_abrupt_completion.html]
|
||||
skip-if =
|
||||
os == 'linux' #Bug 1615164
|
||||
win10_2004 # Bug 1615164
|
||||
[test_async_waituntil.html]
|
||||
[test_bad_script_cache.html]
|
||||
[test_bug1151916.html]
|
||||
[test_bug1240436.html]
|
||||
[test_bug1408734.html]
|
||||
[test_claim.html]
|
||||
[test_claim_oninstall.html]
|
||||
[test_controller.html]
|
||||
[test_cross_origin_url_after_redirect.html]
|
||||
skip-if =
|
||||
http3
|
||||
http2
|
||||
[test_devtools_bypass_serviceworker.html]
|
||||
[test_empty_serviceworker.html]
|
||||
[test_enabled_pref.html]
|
||||
[test_error_reporting.html]
|
||||
skip-if = serviceworker_e10s
|
||||
[test_escapedSlashes.html]
|
||||
skip-if =
|
||||
http3
|
||||
http2
|
||||
[test_eval_allowed.html]
|
||||
[test_event_listener_leaks.html]
|
||||
skip-if = (os == "win" && processor == "aarch64") #bug 1535784
|
||||
[test_fetch_event.html]
|
||||
skip-if = debug # Bug 1262224
|
||||
[test_fetch_event_with_thirdpartypref.html]
|
||||
skip-if = debug # Bug 1262224
|
||||
[test_fetch_integrity.html]
|
||||
skip-if = serviceworker_e10s
|
||||
support-files = console_monitor.js
|
||||
[test_file_blob_response.html]
|
||||
[test_file_blob_upload.html]
|
||||
[test_file_upload.html]
|
||||
skip-if = toolkit == 'android' #Bug 1430182
|
||||
support-files = script_file_upload.js sw_file_upload.js server_file_upload.sjs
|
||||
[test_force_refresh.html]
|
||||
[test_gzip_redirect.html]
|
||||
[test_hsts_upgrade_intercept.html]
|
||||
skip-if =
|
||||
win10_2004 && !debug # Bug 1717091
|
||||
win11_2009 && !debug # Bug 1797751
|
||||
os == "linux" && bits == 64 && debug # Bug 1749068
|
||||
apple_catalina && !debug # Bug 1717091
|
||||
scheme = https
|
||||
[test_imagecache.html]
|
||||
skip-if =
|
||||
http3
|
||||
http2
|
||||
[test_imagecache_max_age.html]
|
||||
skip-if =
|
||||
os == 'linux' && bits == 64 && !debug && asan && os_version == '18.04' # Bug 1585668
|
||||
display == 'wayland' && os_version == '22.04' && debug # Bug 1856980
|
||||
http3
|
||||
http2
|
||||
[test_importscript.html]
|
||||
[test_install_event.html]
|
||||
[test_install_event_gc.html]
|
||||
skip-if = xorigin # JavaScript error: http://mochi.xorigin-test:8888/tests/SimpleTest/TestRunner.js, line 157: SecurityError: Permission denied to access property "wrappedJSObject" on cross-origin object
|
||||
[test_installation_simple.html]
|
||||
[test_match_all.html]
|
||||
[test_match_all_advanced.html]
|
||||
[test_match_all_client_id.html]
|
||||
skip-if =
|
||||
toolkit == 'android'
|
||||
http3
|
||||
http2
|
||||
[test_match_all_client_properties.html]
|
||||
skip-if = toolkit == 'android'
|
||||
[test_navigationPreload_disable_crash.html]
|
||||
scheme = https
|
||||
skip-if =
|
||||
os == "linux" && bits == 64 && debug # Bug 1749068
|
||||
[test_navigator.html]
|
||||
[test_nofetch_handler.html]
|
||||
[test_not_intercept_plugin.html]
|
||||
skip-if = serviceworker_e10s # leaks InterceptedHttpChannel and others things
|
||||
[test_notification_constructor_error.html]
|
||||
[test_notification_get.html]
|
||||
skip-if = xorigin # Bug 1792790
|
||||
[test_notification_openWindow.html]
|
||||
skip-if =
|
||||
toolkit == 'android' # Bug 1620052
|
||||
xorigin # JavaScript error: http://mochi.xorigin-test:8888/tests/SimpleTest/TestRunner.js, line 157: SecurityError: Permission denied to access property "wrappedJSObject" on cross-origin object
|
||||
http3
|
||||
http2
|
||||
support-files = notification_openWindow_worker.js file_notification_openWindow.html
|
||||
tags = openwindow
|
||||
[test_notificationclick-otherwindow.html]
|
||||
skip-if = xorigin # Bug 1792790
|
||||
[test_notificationclick.html]
|
||||
skip-if = xorigin # Bug 1792790
|
||||
[test_notificationclick_focus.html]
|
||||
skip-if = xorigin # Bug 1792790
|
||||
[test_notificationclose.html]
|
||||
skip-if = xorigin # Bug 1792790
|
||||
[test_onmessageerror.html]
|
||||
skip-if = xorigin # Hangs with no error log
|
||||
[test_opaque_intercept.html]
|
||||
skip-if =
|
||||
http3
|
||||
http2
|
||||
[test_origin_after_redirect.html]
|
||||
skip-if =
|
||||
http3
|
||||
http2
|
||||
[test_origin_after_redirect_cached.html]
|
||||
skip-if =
|
||||
http3
|
||||
http2
|
||||
[test_origin_after_redirect_to_https.html]
|
||||
[test_origin_after_redirect_to_https_cached.html]
|
||||
[test_post_message.html]
|
||||
[test_post_message_advanced.html]
|
||||
[test_post_message_source.html]
|
||||
[test_register_base.html]
|
||||
skip-if =
|
||||
http3
|
||||
http2
|
||||
[test_register_https_in_http.html]
|
||||
skip-if =
|
||||
http3
|
||||
http2
|
||||
[test_sandbox_intercept.html]
|
||||
skip-if =
|
||||
http3
|
||||
http2
|
||||
[test_sanitize.html]
|
||||
[test_scopes.html]
|
||||
[test_script_loader_intercepted_js_cache.html]
|
||||
skip-if = serviceworker_e10s
|
||||
[test_self_update_worker.html]
|
||||
skip-if = serviceworker_e10s
|
||||
toolkit == 'android'
|
||||
[test_service_worker_allowed.html]
|
||||
[test_serviceworker.html]
|
||||
[test_serviceworker_header.html]
|
||||
skip-if =
|
||||
http3
|
||||
http2
|
||||
[test_serviceworker_interfaces.html]
|
||||
[test_serviceworker_not_sharedworker.html]
|
||||
skip-if =
|
||||
http3
|
||||
http2
|
||||
[test_skip_waiting.html]
|
||||
[test_streamfilter.html]
|
||||
[test_strict_mode_warning.html]
|
||||
[test_third_party_iframes.html]
|
||||
support-files =
|
||||
window_party_iframes.html
|
||||
[test_unregister.html]
|
||||
[test_unresolved_fetch_interception.html]
|
||||
skip-if = verify
|
||||
serviceworker_e10s
|
||||
[test_workerUnregister.html]
|
||||
[test_workerUpdate.html]
|
||||
[test_worker_reference_gc_timeout.html]
|
||||
[test_workerupdatefoundevent.html]
|
||||
[test_xslt.html]
|
||||
skip-if =
|
||||
http3
|
||||
http2
|
|
@ -0,0 +1,494 @@
|
|||
[DEFAULT]
|
||||
tags = "condprof"
|
||||
support-files = [
|
||||
"abrupt_completion_worker.js",
|
||||
"worker.js",
|
||||
"worker2.js",
|
||||
"worker3.js",
|
||||
"fetch_event_worker.js",
|
||||
"parse_error_worker.js",
|
||||
"activate_event_error_worker.js",
|
||||
"install_event_worker.js",
|
||||
"install_event_error_worker.js",
|
||||
"simpleregister/index.html",
|
||||
"simpleregister/ready.html",
|
||||
"controller/index.html",
|
||||
"unregister/index.html",
|
||||
"unregister/unregister.html",
|
||||
"workerUpdate/update.html",
|
||||
"sw_clients/simple.html",
|
||||
"sw_clients/service_worker_controlled.html",
|
||||
"match_all_worker.js",
|
||||
"match_all_advanced_worker.js",
|
||||
"worker_unregister.js",
|
||||
"worker_update.js",
|
||||
"message_posting_worker.js",
|
||||
"fetch/index.html",
|
||||
"fetch/fetch_worker_script.js",
|
||||
"fetch/fetch_tests.js",
|
||||
"fetch/deliver-gzip.sjs",
|
||||
"fetch/redirect.sjs",
|
||||
"fetch/real-file.txt",
|
||||
"fetch/cookie/cookie_test.js",
|
||||
"fetch/cookie/register.html",
|
||||
"fetch/cookie/unregister.html",
|
||||
"fetch/hsts/hsts_test.js",
|
||||
"fetch/hsts/embedder.html",
|
||||
"fetch/hsts/image.html",
|
||||
"fetch/hsts/image-20px.png",
|
||||
"fetch/hsts/image-40px.png",
|
||||
"fetch/hsts/realindex.html",
|
||||
"fetch/hsts/register.html",
|
||||
"fetch/hsts/register.html^headers^",
|
||||
"fetch/hsts/unregister.html",
|
||||
"fetch/https/index.html",
|
||||
"fetch/https/register.html",
|
||||
"fetch/https/unregister.html",
|
||||
"fetch/https/https_test.js",
|
||||
"fetch/https/clonedresponse/index.html",
|
||||
"fetch/https/clonedresponse/register.html",
|
||||
"fetch/https/clonedresponse/unregister.html",
|
||||
"fetch/https/clonedresponse/https_test.js",
|
||||
"fetch/imagecache/image-20px.png",
|
||||
"fetch/imagecache/image-40px.png",
|
||||
"fetch/imagecache/imagecache_test.js",
|
||||
"fetch/imagecache/index.html",
|
||||
"fetch/imagecache/postmortem.html",
|
||||
"fetch/imagecache/register.html",
|
||||
"fetch/imagecache/unregister.html",
|
||||
"fetch/imagecache-maxage/index.html",
|
||||
"fetch/imagecache-maxage/image-20px.png",
|
||||
"fetch/imagecache-maxage/image-40px.png",
|
||||
"fetch/imagecache-maxage/maxage_test.js",
|
||||
"fetch/imagecache-maxage/register.html",
|
||||
"fetch/imagecache-maxage/unregister.html",
|
||||
"fetch/importscript-mixedcontent/register.html",
|
||||
"fetch/importscript-mixedcontent/unregister.html",
|
||||
"fetch/importscript-mixedcontent/https_test.js",
|
||||
"fetch/interrupt.sjs",
|
||||
"fetch/origin/index.sjs",
|
||||
"fetch/origin/index-to-https.sjs",
|
||||
"fetch/origin/realindex.html",
|
||||
"fetch/origin/realindex.html^headers^",
|
||||
"fetch/origin/register.html",
|
||||
"fetch/origin/unregister.html",
|
||||
"fetch/origin/origin_test.js",
|
||||
"fetch/origin/https/index-https.sjs",
|
||||
"fetch/origin/https/realindex.html",
|
||||
"fetch/origin/https/realindex.html^headers^",
|
||||
"fetch/origin/https/register.html",
|
||||
"fetch/origin/https/unregister.html",
|
||||
"fetch/origin/https/origin_test.js",
|
||||
"fetch/requesturl/index.html",
|
||||
"fetch/requesturl/redirect.sjs",
|
||||
"fetch/requesturl/redirector.html",
|
||||
"fetch/requesturl/register.html",
|
||||
"fetch/requesturl/requesturl_test.js",
|
||||
"fetch/requesturl/secret.html",
|
||||
"fetch/requesturl/unregister.html",
|
||||
"fetch/sandbox/index.html",
|
||||
"fetch/sandbox/intercepted_index.html",
|
||||
"fetch/sandbox/register.html",
|
||||
"fetch/sandbox/unregister.html",
|
||||
"fetch/sandbox/sandbox_test.js",
|
||||
"fetch/upgrade-insecure/upgrade-insecure_test.js",
|
||||
"fetch/upgrade-insecure/embedder.html",
|
||||
"fetch/upgrade-insecure/embedder.html^headers^",
|
||||
"fetch/upgrade-insecure/image.html",
|
||||
"fetch/upgrade-insecure/image-20px.png",
|
||||
"fetch/upgrade-insecure/image-40px.png",
|
||||
"fetch/upgrade-insecure/realindex.html",
|
||||
"fetch/upgrade-insecure/register.html",
|
||||
"fetch/upgrade-insecure/unregister.html",
|
||||
"match_all_properties_worker.js",
|
||||
"match_all_clients/match_all_controlled.html",
|
||||
"test_serviceworker_interfaces.js",
|
||||
"serviceworker_wrapper.js",
|
||||
"message_receiver.html",
|
||||
"serviceworker_not_sharedworker.js",
|
||||
"match_all_client/match_all_client_id.html",
|
||||
"match_all_client_id_worker.js",
|
||||
"source_message_posting_worker.js",
|
||||
"scope/scope_worker.js",
|
||||
"redirect_serviceworker.sjs",
|
||||
"importscript.sjs",
|
||||
"importscript_worker.js",
|
||||
"bug1151916_worker.js",
|
||||
"bug1151916_driver.html",
|
||||
"bug1240436_worker.js",
|
||||
"notificationclick.html",
|
||||
"notificationclick-otherwindow.html",
|
||||
"notificationclick.js",
|
||||
"notificationclick_focus.html",
|
||||
"notificationclick_focus.js",
|
||||
"notificationclose.html",
|
||||
"notificationclose.js",
|
||||
"worker_updatefoundevent.js",
|
||||
"worker_updatefoundevent2.js",
|
||||
"updatefoundevent.html",
|
||||
"empty.html",
|
||||
"empty.js",
|
||||
"notification_constructor_error.js",
|
||||
"notification_get_sw.js",
|
||||
"notification/register.html",
|
||||
"sanitize/frame.html",
|
||||
"sanitize/register.html",
|
||||
"sanitize/example_check_and_unregister.html",
|
||||
"sanitize_worker.js",
|
||||
"streamfilter_server.sjs",
|
||||
"streamfilter_worker.js",
|
||||
"swa/worker_scope_different.js",
|
||||
"swa/worker_scope_different.js^headers^",
|
||||
"swa/worker_scope_different2.js",
|
||||
"swa/worker_scope_different2.js^headers^",
|
||||
"swa/worker_scope_precise.js",
|
||||
"swa/worker_scope_precise.js^headers^",
|
||||
"swa/worker_scope_too_deep.js",
|
||||
"swa/worker_scope_too_deep.js^headers^",
|
||||
"swa/worker_scope_too_narrow.js",
|
||||
"swa/worker_scope_too_narrow.js^headers^",
|
||||
"claim_oninstall_worker.js",
|
||||
"claim_worker_1.js",
|
||||
"claim_worker_2.js",
|
||||
"claim_clients/client.html",
|
||||
"force_refresh_worker.js",
|
||||
"sw_clients/refresher.html",
|
||||
"sw_clients/refresher_compressed.html",
|
||||
"sw_clients/refresher_compressed.html^headers^",
|
||||
"sw_clients/refresher_cached.html",
|
||||
"sw_clients/refresher_cached_compressed.html",
|
||||
"sw_clients/refresher_cached_compressed.html^headers^",
|
||||
"strict_mode_warning.js",
|
||||
"skip_waiting_installed_worker.js",
|
||||
"skip_waiting_scope/index.html",
|
||||
"thirdparty/iframe1.html",
|
||||
"thirdparty/iframe2.html",
|
||||
"thirdparty/register.html",
|
||||
"thirdparty/unregister.html",
|
||||
"thirdparty/sw.js",
|
||||
"thirdparty/worker.js",
|
||||
"register_https.html",
|
||||
"gzip_redirect_worker.js",
|
||||
"sw_clients/navigator.html",
|
||||
"eval_worker.js",
|
||||
"test_eval_allowed.html^headers^",
|
||||
"opaque_intercept_worker.js",
|
||||
"notify_loaded.js",
|
||||
"fetch/plugin/worker.js",
|
||||
"fetch/plugin/plugins.html",
|
||||
"eventsource/*",
|
||||
"sw_clients/file_blob_upload_frame.html",
|
||||
"redirect_post.sjs",
|
||||
"xslt_worker.js",
|
||||
"xslt/*",
|
||||
"unresolved_fetch_worker.js",
|
||||
"header_checker.sjs",
|
||||
"openWindow_worker.js",
|
||||
"redirect.sjs",
|
||||
"open_window/client.sjs",
|
||||
"lorem_script.js",
|
||||
"file_blob_response_worker.js",
|
||||
"file_js_cache_cleanup.js",
|
||||
"file_js_cache.html",
|
||||
"file_js_cache_with_sri.html",
|
||||
"file_js_cache.js",
|
||||
"file_js_cache_save_after_load.html",
|
||||
"file_js_cache_save_after_load.js",
|
||||
"file_js_cache_syntax_error.html",
|
||||
"file_js_cache_syntax_error.js",
|
||||
"!/dom/security/test/cors/file_CrossSiteXHR_server.sjs",
|
||||
"!/dom/notification/test/mochitest/MockServices.js",
|
||||
"!/dom/notification/test/mochitest/NotificationTest.js",
|
||||
"blocking_install_event_worker.js",
|
||||
"sw_bad_mime_type.js",
|
||||
"sw_bad_mime_type.js^headers^",
|
||||
"error_reporting_helpers.js",
|
||||
"fetch.js",
|
||||
"hello.html",
|
||||
"create_another_sharedWorker.html",
|
||||
"sharedWorker_fetch.js",
|
||||
"async_waituntil_worker.js",
|
||||
"lazy_worker.js",
|
||||
"nofetch_handler_worker.js",
|
||||
"service_worker.js",
|
||||
"service_worker_client.html",
|
||||
"utils.js",
|
||||
"sw_storage_not_allow.js",
|
||||
"update_worker.sjs",
|
||||
"self_update_worker.sjs",
|
||||
"!/dom/events/test/event_leak_utils.js",
|
||||
"onmessageerror_worker.js",
|
||||
"pref/fetch_nonexistent_file.html",
|
||||
"pref/intercept_nonexistent_file_sw.js",
|
||||
]
|
||||
|
||||
["test_abrupt_completion.html"]
|
||||
skip-if = ["os == 'linux'"] # Bug 1615164
|
||||
|
||||
["test_async_waituntil.html"]
|
||||
|
||||
["test_bad_script_cache.html"]
|
||||
|
||||
["test_bug1151916.html"]
|
||||
|
||||
["test_bug1240436.html"]
|
||||
|
||||
["test_bug1408734.html"]
|
||||
|
||||
["test_claim.html"]
|
||||
|
||||
["test_claim_oninstall.html"]
|
||||
|
||||
["test_controller.html"]
|
||||
|
||||
["test_cross_origin_url_after_redirect.html"]
|
||||
skip-if = [
|
||||
"http3",
|
||||
"http2",
|
||||
]
|
||||
|
||||
["test_devtools_bypass_serviceworker.html"]
|
||||
|
||||
["test_empty_serviceworker.html"]
|
||||
|
||||
["test_enabled_pref.html"]
|
||||
|
||||
["test_error_reporting.html"]
|
||||
skip-if = ["serviceworker_e10s"]
|
||||
|
||||
["test_escapedSlashes.html"]
|
||||
skip-if = [
|
||||
"http3",
|
||||
"http2",
|
||||
]
|
||||
|
||||
["test_eval_allowed.html"]
|
||||
|
||||
["test_event_listener_leaks.html"]
|
||||
|
||||
["test_fetch_event.html"]
|
||||
skip-if = ["debug"] # Bug 1262224
|
||||
|
||||
["test_fetch_event_with_thirdpartypref.html"]
|
||||
skip-if = ["debug"] # Bug 1262224
|
||||
|
||||
["test_fetch_integrity.html"]
|
||||
skip-if = ["serviceworker_e10s"]
|
||||
support-files = [
|
||||
"console_monitor.js",
|
||||
]
|
||||
|
||||
["test_file_blob_response.html"]
|
||||
|
||||
["test_file_blob_upload.html"]
|
||||
|
||||
["test_file_upload.html"]
|
||||
skip-if = ["os == 'android'"] #Bug 1430182
|
||||
support-files = [
|
||||
"script_file_upload.js",
|
||||
"sw_file_upload.js",
|
||||
"server_file_upload.sjs",
|
||||
]
|
||||
|
||||
["test_force_refresh.html"]
|
||||
|
||||
["test_gzip_redirect.html"]
|
||||
|
||||
["test_hsts_upgrade_intercept.html"]
|
||||
skip-if = [
|
||||
"win11_2009 && !debug", # Bug 1797751
|
||||
"os == 'linux' && bits == 64 && debug", # Bug 1749068
|
||||
"apple_catalina && !debug", # Bug 1717091
|
||||
]
|
||||
scheme = "https"
|
||||
|
||||
["test_imagecache.html"]
|
||||
skip-if = [
|
||||
"http3",
|
||||
"http2",
|
||||
]
|
||||
|
||||
["test_imagecache_max_age.html"]
|
||||
skip-if = [
|
||||
"os == 'linux' && bits == 64 && !debug && asan && os_version == '18.04'", # Bug 1585668
|
||||
"display == 'wayland' && os_version == '22.04' && debug", # Bug 1856980
|
||||
"http3",
|
||||
"http2",
|
||||
]
|
||||
|
||||
["test_importscript.html"]
|
||||
|
||||
["test_install_event.html"]
|
||||
|
||||
["test_install_event_gc.html"]
|
||||
skip-if = ["xorigin"] # JavaScript error: http://mochi.xorigin-test:8888/tests/SimpleTest/TestRunner.js, line 157: SecurityError: Permission denied to access property "wrappedJSObject" on cross-origin object
|
||||
|
||||
["test_installation_simple.html"]
|
||||
|
||||
["test_match_all.html"]
|
||||
|
||||
["test_match_all_advanced.html"]
|
||||
|
||||
["test_match_all_client_id.html"]
|
||||
skip-if = [
|
||||
"os == 'android'",
|
||||
"http3",
|
||||
"http2",
|
||||
]
|
||||
|
||||
["test_match_all_client_properties.html"]
|
||||
skip-if = ["os == 'android'"]
|
||||
|
||||
["test_navigationPreload_disable_crash.html"]
|
||||
scheme = "https"
|
||||
skip-if = ["os == 'linux' && bits == 64 && debug"] # Bug 1749068
|
||||
|
||||
["test_navigator.html"]
|
||||
|
||||
["test_nofetch_handler.html"]
|
||||
|
||||
["test_not_intercept_plugin.html"]
|
||||
skip-if = ["serviceworker_e10s"] # leaks InterceptedHttpChannel and others things
|
||||
|
||||
["test_notification_constructor_error.html"]
|
||||
|
||||
["test_notification_get.html"]
|
||||
skip-if = ["xorigin"] # Bug 1792790
|
||||
|
||||
["test_notification_openWindow.html"]
|
||||
skip-if = [
|
||||
"os == 'android'", # Bug 1620052
|
||||
"xorigin", # JavaScript error: http://mochi.xorigin-test:8888/tests/SimpleTest/TestRunner.js, line 157: SecurityError: Permission denied to access property "wrappedJSObject" on cross-origin object
|
||||
"http3",
|
||||
"http2",
|
||||
]
|
||||
support-files = [
|
||||
"notification_openWindow_worker.js",
|
||||
"file_notification_openWindow.html",
|
||||
]
|
||||
tags = "openwindow"
|
||||
|
||||
["test_notificationclick-otherwindow.html"]
|
||||
skip-if = ["xorigin"] # Bug 1792790
|
||||
|
||||
["test_notificationclick.html"]
|
||||
skip-if = ["xorigin"] # Bug 1792790
|
||||
|
||||
["test_notificationclick_focus.html"]
|
||||
skip-if = ["xorigin"] # Bug 1792790
|
||||
|
||||
["test_notificationclose.html"]
|
||||
skip-if = ["xorigin"] # Bug 1792790
|
||||
|
||||
["test_onmessageerror.html"]
|
||||
skip-if = ["xorigin"] # Bug 1792790
|
||||
|
||||
["test_opaque_intercept.html"]
|
||||
skip-if = [
|
||||
"http3",
|
||||
"http2",
|
||||
]
|
||||
|
||||
["test_origin_after_redirect.html"]
|
||||
skip-if = [
|
||||
"http3",
|
||||
"http2",
|
||||
]
|
||||
|
||||
["test_origin_after_redirect_cached.html"]
|
||||
skip-if = [
|
||||
"http3",
|
||||
"http2",
|
||||
]
|
||||
|
||||
["test_origin_after_redirect_to_https.html"]
|
||||
|
||||
["test_origin_after_redirect_to_https_cached.html"]
|
||||
|
||||
["test_post_message.html"]
|
||||
|
||||
["test_post_message_advanced.html"]
|
||||
|
||||
["test_post_message_source.html"]
|
||||
|
||||
["test_register_base.html"]
|
||||
skip-if = [
|
||||
"http3",
|
||||
"http2",
|
||||
]
|
||||
|
||||
["test_register_https_in_http.html"]
|
||||
skip-if = [
|
||||
"http3",
|
||||
"http2",
|
||||
]
|
||||
|
||||
["test_sandbox_intercept.html"]
|
||||
skip-if = [
|
||||
"http3",
|
||||
"http2",
|
||||
]
|
||||
|
||||
["test_sanitize.html"]
|
||||
|
||||
["test_scopes.html"]
|
||||
|
||||
["test_script_loader_intercepted_js_cache.html"]
|
||||
skip-if = ["serviceworker_e10s"]
|
||||
|
||||
["test_self_update_worker.html"]
|
||||
skip-if = [
|
||||
"serviceworker_e10s",
|
||||
"os == 'android'",
|
||||
]
|
||||
|
||||
["test_service_worker_allowed.html"]
|
||||
|
||||
["test_serviceworker.html"]
|
||||
|
||||
["test_serviceworker_header.html"]
|
||||
skip-if = [
|
||||
"http3",
|
||||
"http2",
|
||||
]
|
||||
|
||||
["test_serviceworker_interfaces.html"]
|
||||
|
||||
["test_serviceworker_not_sharedworker.html"]
|
||||
skip-if = [
|
||||
"http3",
|
||||
"http2",
|
||||
]
|
||||
|
||||
["test_skip_waiting.html"]
|
||||
|
||||
["test_streamfilter.html"]
|
||||
|
||||
["test_strict_mode_warning.html"]
|
||||
|
||||
["test_third_party_iframes.html"]
|
||||
support-files = [
|
||||
"window_party_iframes.html",
|
||||
]
|
||||
|
||||
["test_unregister.html"]
|
||||
|
||||
["test_unresolved_fetch_interception.html"]
|
||||
skip-if = [
|
||||
"verify",
|
||||
"serviceworker_e10s",
|
||||
]
|
||||
|
||||
["test_workerUnregister.html"]
|
||||
|
||||
["test_workerUpdate.html"]
|
||||
|
||||
["test_worker_reference_gc_timeout.html"]
|
||||
|
||||
["test_workerupdatefoundevent.html"]
|
||||
|
||||
["test_xslt.html"]
|
||||
skip-if = [
|
||||
"http3",
|
||||
"http2",
|
||||
]
|
|
@ -1,11 +1,10 @@
|
|||
[DEFAULT]
|
||||
# Enable dFPI(cookieBehavior 5) for service worker tests.
|
||||
prefs =
|
||||
network.cookie.cookieBehavior=5
|
||||
tags = serviceworker-dfpi
|
||||
prefs = ["network.cookie.cookieBehavior=5"]
|
||||
tags = "serviceworker-dfpi"
|
||||
# We disable service workers for third-party contexts when dFPI is enabled. So,
|
||||
# we disable xorigin tests for dFPI.
|
||||
skip-if = xorigin
|
||||
skip-if = ["xorigin"]
|
||||
dupe-manifest = true
|
||||
|
||||
[include:mochitest-common.ini]
|
||||
["include:mochitest-common.toml"]
|
|
@ -9,10 +9,10 @@ dupe-manifest = true
|
|||
tags = "condprof"
|
||||
|
||||
# Following tests are not working currently when dFPI is enabled. So, we put
|
||||
# these tests here instead of mochitest-common.ini so that these tests won't run
|
||||
# these tests here instead of mochitest-common.toml so that these tests won't run
|
||||
# when dFPI is enabled.
|
||||
|
||||
["include:mochitest-common.ini"]
|
||||
["include:mochitest-common.toml"]
|
||||
|
||||
["test_cookie_fetch.html"]
|
||||
|
||||
|
|
|
@ -187,18 +187,17 @@ RefPtr<Texture> CanvasContext::GetCurrentTexture(ErrorResult& aRv) {
|
|||
}
|
||||
|
||||
void CanvasContext::MaybeQueueSwapChainPresent() {
|
||||
if (mPendingSwapChainPresent || mWaitingCanvasRendererInitialized) {
|
||||
if (mPendingSwapChainPresent) {
|
||||
return;
|
||||
}
|
||||
|
||||
mPendingSwapChainPresent = true;
|
||||
|
||||
if (mCanvasElement) {
|
||||
SVGObserverUtils::InvalidateDirectRenderingObservers(mCanvasElement);
|
||||
mCanvasElement->InvalidateCanvasContent(nullptr);
|
||||
} else if (mOffscreenCanvas) {
|
||||
mOffscreenCanvas->QueueCommitToCompositor();
|
||||
if (mWaitingCanvasRendererInitialized) {
|
||||
return;
|
||||
}
|
||||
|
||||
InvalidateCanvasContent();
|
||||
}
|
||||
|
||||
void CanvasContext::SwapChainPresent() {
|
||||
|
@ -250,6 +249,9 @@ bool CanvasContext::InitializeCanvasRenderer(
|
|||
aRenderer->Initialize(data);
|
||||
aRenderer->SetDirty();
|
||||
|
||||
if (mWaitingCanvasRendererInitialized) {
|
||||
InvalidateCanvasContent();
|
||||
}
|
||||
mWaitingCanvasRendererInitialized = false;
|
||||
|
||||
return true;
|
||||
|
@ -351,4 +353,18 @@ void CanvasContext::ForceNewFrame() {
|
|||
}
|
||||
}
|
||||
|
||||
void CanvasContext::InvalidateCanvasContent() {
|
||||
if (!mCanvasElement && !mOffscreenCanvas) {
|
||||
MOZ_ASSERT_UNREACHABLE("unexpected to be called");
|
||||
return;
|
||||
}
|
||||
|
||||
if (mCanvasElement) {
|
||||
SVGObserverUtils::InvalidateDirectRenderingObservers(mCanvasElement);
|
||||
mCanvasElement->InvalidateCanvasContent(nullptr);
|
||||
} else if (mOffscreenCanvas) {
|
||||
mOffscreenCanvas->QueueCommitToCompositor();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace mozilla::webgpu
|
||||
|
|
|
@ -91,6 +91,7 @@ class CanvasContext final : public nsICanvasRenderingContextInternal,
|
|||
void MaybeQueueSwapChainPresent();
|
||||
void SwapChainPresent();
|
||||
void ForceNewFrame();
|
||||
void InvalidateCanvasContent();
|
||||
|
||||
private:
|
||||
gfx::IntSize mCanvasSize;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
[DEFAULT]
|
||||
subsuite = webgpu
|
||||
run-if = release_or_beta
|
||||
subsuite = "webgpu"
|
||||
run-if = ["release_or_beta"]
|
||||
|
||||
# Even if the pref were enabled, WebGPU is only available in secure contexts.
|
||||
#
|
||||
# See spec WebIDL, like this: https://www.w3.org/TR/webgpu/#navigatorgpu
|
||||
scheme = https
|
||||
scheme = "https"
|
||||
|
||||
[test_disabled.html]
|
||||
["test_disabled.html"]
|
|
@ -8,7 +8,7 @@ with Files("**"):
|
|||
BUG_COMPONENT = ("Core", "Graphics: WebGPU")
|
||||
|
||||
MOCHITEST_MANIFESTS += [
|
||||
"mochitest/mochitest-no-pref.ini",
|
||||
"mochitest/mochitest-no-pref.toml",
|
||||
"mochitest/mochitest.toml",
|
||||
]
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ RemoteWorkerControllerChild::RemoteWorkerControllerChild(
|
|||
RefPtr<RemoteWorkerObserver> aObserver)
|
||||
: mObserver(std::move(aObserver)) {
|
||||
AssertIsOnMainThread();
|
||||
mRemoteWorkerLaunchStart = TimeStamp::Now();
|
||||
MOZ_ASSERT(mObserver);
|
||||
}
|
||||
|
||||
|
@ -37,6 +38,16 @@ PFetchEventOpChild* RemoteWorkerControllerChild::AllocPFetchEventOpChild(
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
TimeStamp RemoteWorkerControllerChild::GetRemoteWorkerLaunchStart() {
|
||||
MOZ_ASSERT(mRemoteWorkerLaunchStart);
|
||||
return mRemoteWorkerLaunchStart;
|
||||
}
|
||||
|
||||
TimeStamp RemoteWorkerControllerChild::GetRemoteWorkerLaunchEnd() {
|
||||
MOZ_ASSERT(mRemoteWorkerLaunchEnd);
|
||||
return mRemoteWorkerLaunchEnd;
|
||||
}
|
||||
|
||||
bool RemoteWorkerControllerChild::DeallocPFetchEventOpChild(
|
||||
PFetchEventOpChild* aActor) {
|
||||
AssertIsOnMainThread();
|
||||
|
@ -68,6 +79,7 @@ IPCResult RemoteWorkerControllerChild::RecvCreationFailed() {
|
|||
|
||||
IPCResult RemoteWorkerControllerChild::RecvCreationSucceeded() {
|
||||
AssertIsOnMainThread();
|
||||
mRemoteWorkerLaunchEnd = TimeStamp::Now();
|
||||
|
||||
if (mObserver) {
|
||||
mObserver->CreationSucceeded();
|
||||
|
@ -79,6 +91,7 @@ IPCResult RemoteWorkerControllerChild::RecvCreationSucceeded() {
|
|||
IPCResult RemoteWorkerControllerChild::RecvErrorReceived(
|
||||
const ErrorValue& aError) {
|
||||
AssertIsOnMainThread();
|
||||
mRemoteWorkerLaunchEnd = TimeStamp::Now();
|
||||
|
||||
if (mObserver) {
|
||||
mObserver->ErrorReceived(aError);
|
||||
|
|
|
@ -33,6 +33,9 @@ class RemoteWorkerControllerChild final : public PRemoteWorkerControllerChild {
|
|||
|
||||
void MaybeSendDelete();
|
||||
|
||||
TimeStamp GetRemoteWorkerLaunchStart();
|
||||
TimeStamp GetRemoteWorkerLaunchEnd();
|
||||
|
||||
private:
|
||||
~RemoteWorkerControllerChild() = default;
|
||||
|
||||
|
@ -57,6 +60,9 @@ class RemoteWorkerControllerChild final : public PRemoteWorkerControllerChild {
|
|||
RefPtr<RemoteWorkerObserver> mObserver;
|
||||
|
||||
bool mIPCActive = true;
|
||||
|
||||
TimeStamp mRemoteWorkerLaunchStart;
|
||||
TimeStamp mRemoteWorkerLaunchEnd;
|
||||
};
|
||||
|
||||
} // namespace mozilla::dom
|
||||
|
|
|
@ -2287,8 +2287,13 @@ NS_IMETHODIMP EditorBase::SetSpellcheckUserOverride(bool enable) {
|
|||
}
|
||||
|
||||
NS_IMETHODIMP EditorBase::InsertNode(nsINode* aNodeToInsert,
|
||||
nsINode* aContainer, uint32_t aOffset) {
|
||||
nsCOMPtr<nsIContent> contentToInsert = do_QueryInterface(aNodeToInsert);
|
||||
nsINode* aContainer, uint32_t aOffset,
|
||||
bool aPreserveSelection,
|
||||
uint8_t aOptionalArgCount) {
|
||||
MOZ_DIAGNOSTIC_ASSERT(IsHTMLEditor());
|
||||
|
||||
nsCOMPtr<nsIContent> contentToInsert =
|
||||
nsIContent::FromNodeOrNull(aNodeToInsert);
|
||||
if (NS_WARN_IF(!contentToInsert) || NS_WARN_IF(!aContainer)) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
@ -2301,6 +2306,17 @@ NS_IMETHODIMP EditorBase::InsertNode(nsINode* aNodeToInsert,
|
|||
return EditorBase::ToGenericNSResult(rv);
|
||||
}
|
||||
|
||||
// Make dispatch `input` event after stopping preserving selection.
|
||||
AutoPlaceholderBatch treatAsOneTransaction(
|
||||
*this,
|
||||
ScrollSelectionIntoView::No, // not a user interaction
|
||||
__FUNCTION__);
|
||||
|
||||
Maybe<AutoTransactionsConserveSelection> preseveSelection;
|
||||
if (aOptionalArgCount && aPreserveSelection) {
|
||||
preseveSelection.emplace(*this);
|
||||
}
|
||||
|
||||
const uint32_t offset = std::min(aOffset, aContainer->Length());
|
||||
Result<CreateContentResult, nsresult> insertContentResult =
|
||||
InsertNodeWithTransaction(*contentToInsert,
|
||||
|
@ -2411,23 +2427,10 @@ EditorBase::InsertPaddingBRElementForEmptyLastLineWithTransaction(
|
|||
return insertBRElementResult;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP EditorBase::DeleteNode(nsINode* aNode) {
|
||||
if (NS_WARN_IF(!aNode) || NS_WARN_IF(!aNode->IsContent())) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
AutoEditActionDataSetter editActionData(*this, EditAction::eRemoveNode);
|
||||
nsresult rv = editActionData.CanHandleAndMaybeDispatchBeforeInputEvent();
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING_ASSERTION(rv == NS_ERROR_EDITOR_ACTION_CANCELED,
|
||||
"CanHandleAndMaybeDispatchBeforeInputEvent() failed");
|
||||
return EditorBase::ToGenericNSResult(rv);
|
||||
}
|
||||
|
||||
rv = DeleteNodeWithTransaction(MOZ_KnownLive(*aNode->AsContent()));
|
||||
NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
|
||||
"EditorBase::DeleteNodeWithTransaction() failed");
|
||||
return EditorBase::ToGenericNSResult(rv);
|
||||
NS_IMETHODIMP EditorBase::DeleteNode(nsINode* aNode, bool aPreserveSelection,
|
||||
uint8_t aOptionalArgCount) {
|
||||
MOZ_ASSERT_UNREACHABLE("Do not use this API with TextEditor");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
nsresult EditorBase::DeleteNodeWithTransaction(nsIContent& aContent) {
|
||||
|
|
|
@ -3960,7 +3960,8 @@ nsresult HTMLEditor::DeleteAllChildrenWithTransaction(Element& aElement) {
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP HTMLEditor::DeleteNode(nsINode* aNode) {
|
||||
NS_IMETHODIMP HTMLEditor::DeleteNode(nsINode* aNode, bool aPreserveSelection,
|
||||
uint8_t aOptionalArgCount) {
|
||||
if (NS_WARN_IF(!aNode) || NS_WARN_IF(!aNode->IsContent())) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
@ -3973,6 +3974,17 @@ NS_IMETHODIMP HTMLEditor::DeleteNode(nsINode* aNode) {
|
|||
return EditorBase::ToGenericNSResult(rv);
|
||||
}
|
||||
|
||||
// Make dispatch `input` event after stopping preserving selection.
|
||||
AutoPlaceholderBatch treatAsOneTransaction(
|
||||
*this,
|
||||
ScrollSelectionIntoView::No, // not a user interaction
|
||||
__FUNCTION__);
|
||||
|
||||
Maybe<AutoTransactionsConserveSelection> preserveSelection;
|
||||
if (aOptionalArgCount && aPreserveSelection) {
|
||||
preserveSelection.emplace(*this);
|
||||
}
|
||||
|
||||
rv = DeleteNodeWithTransaction(MOZ_KnownLive(*aNode->AsContent()));
|
||||
NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
|
||||
"EditorBase::DeleteNodeWithTransaction() failed");
|
||||
|
|
|
@ -174,7 +174,9 @@ class HTMLEditor final : public EditorBase,
|
|||
bool CanPaste(int32_t aClipboardType) const final;
|
||||
using EditorBase::CanPaste;
|
||||
|
||||
MOZ_CAN_RUN_SCRIPT NS_IMETHOD DeleteNode(nsINode* aNode) final;
|
||||
MOZ_CAN_RUN_SCRIPT NS_IMETHOD DeleteNode(nsINode* aNode,
|
||||
bool aPreseveSelection,
|
||||
uint8_t aOptionalArgCount) final;
|
||||
|
||||
MOZ_CAN_RUN_SCRIPT NS_IMETHOD InsertLineBreak() final;
|
||||
|
||||
|
|
|
@ -490,12 +490,16 @@ skip-if = ["xorigin"] # Testing internal API for comm-central
|
|||
|
||||
["test_nsIEditor_clearUndoRedo.html"]
|
||||
|
||||
["test_nsIEditor_deleteNode.html"]
|
||||
|
||||
["test_nsIEditor_documentCharacterSet.html"]
|
||||
|
||||
["test_nsIEditor_documentIsEmpty.html"]
|
||||
|
||||
["test_nsIEditor_insertLineBreak.html"]
|
||||
|
||||
["test_nsIEditor_insertNode.html"]
|
||||
|
||||
["test_nsIEditor_isSelectionEditable.html"]
|
||||
|
||||
["test_nsIEditor_outputToString.html"]
|
||||
|
|
|
@ -0,0 +1,242 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>nsIEditor.insertNode</title>
|
||||
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
function stringifyInputEvent(aEvent) {
|
||||
if (!aEvent) {
|
||||
return "null";
|
||||
}
|
||||
return `${aEvent.type}: { inputType=${aEvent.inputType} }`;
|
||||
}
|
||||
|
||||
function getRangeDescription(range) {
|
||||
function getNodeDescription(node) {
|
||||
if (!node) {
|
||||
return "null";
|
||||
}
|
||||
switch (node.nodeType) {
|
||||
case Node.TEXT_NODE:
|
||||
return `${node.nodeName} "${node.data}"`;
|
||||
case Node.ELEMENT_NODE:
|
||||
return `<${node.nodeName.toLowerCase()}>`;
|
||||
default:
|
||||
return `${node.nodeName}`;
|
||||
}
|
||||
}
|
||||
if (range === null) {
|
||||
return "null";
|
||||
}
|
||||
if (range === undefined) {
|
||||
return "undefined";
|
||||
}
|
||||
return range.startContainer == range.endContainer &&
|
||||
range.startOffset == range.endOffset
|
||||
? `(${getNodeDescription(range.startContainer)}, ${range.startOffset})`
|
||||
: `(${getNodeDescription(range.startContainer)}, ${
|
||||
range.startOffset
|
||||
}) - (${getNodeDescription(range.endContainer)}, ${range.endOffset})`;
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SimpleTest.waitForFocus(() => {
|
||||
const editingHost = document.querySelector("div[contenteditable]");
|
||||
const editor =
|
||||
SpecialPowers.wrap(window).docShell.editingSession.getEditorForWindow(window);
|
||||
|
||||
editingHost.focus();
|
||||
|
||||
let events = [];
|
||||
editingHost.addEventListener("input", event => events.push(event));
|
||||
|
||||
(function test_delete_node_before_selection() {
|
||||
editingHost.innerHTML = "<span>abc</span><span>def</span>";
|
||||
getSelection().collapse(editingHost.querySelector("span + span").firstChild, 0);
|
||||
editor.deleteNode(editingHost.querySelector("span"));
|
||||
is(
|
||||
editingHost.innerHTML,
|
||||
"<span>def</span>",
|
||||
"test_delete_node_before_selection: deleteNode() should delete the node"
|
||||
);
|
||||
is(
|
||||
events.length,
|
||||
1,
|
||||
"test_delete_node_before_selection: Only one input event should be fired when deleteNode() deletes a node"
|
||||
);
|
||||
is(
|
||||
stringifyInputEvent(events[0]),
|
||||
stringifyInputEvent({ type: "input", inputType: "" }),
|
||||
"test_delete_node_before_selection: input event should be fired when deleting a node"
|
||||
);
|
||||
is(
|
||||
getRangeDescription(getSelection().getRangeAt(0)),
|
||||
getRangeDescription({
|
||||
startContainer: editingHost.firstChild.firstChild,
|
||||
startOffset: 0,
|
||||
endContainer: editingHost.firstChild.firstChild,
|
||||
endOffset: 0,
|
||||
}),
|
||||
"test_delete_node_before_selection: selection shouldn't be updated"
|
||||
);
|
||||
})();
|
||||
|
||||
(function test_delete_node_after_selection() {
|
||||
events = [];
|
||||
editingHost.innerHTML = "<span>abc</span><span>def</span>";
|
||||
getSelection().collapse(editingHost.querySelector("span").firstChild, 0);
|
||||
editor.deleteNode(editingHost.querySelector("span + span"));
|
||||
is(
|
||||
editingHost.innerHTML,
|
||||
"<span>abc</span>",
|
||||
"test_delete_node_after_selection: deleteNode() should delete the node"
|
||||
);
|
||||
is(
|
||||
events.length,
|
||||
1,
|
||||
"test_delete_node_after_selection: Only one input event should be fired when deleteNode() deletes a node"
|
||||
);
|
||||
is(
|
||||
stringifyInputEvent(events[0]),
|
||||
stringifyInputEvent({ type: "input", inputType: "" }),
|
||||
"test_delete_node_after_selection: input event should be fired when deleting a node"
|
||||
);
|
||||
is(
|
||||
getRangeDescription(getSelection().getRangeAt(0)),
|
||||
getRangeDescription({
|
||||
startContainer: editingHost.firstChild.firstChild,
|
||||
startOffset: 0,
|
||||
endContainer: editingHost.firstChild.firstChild,
|
||||
endOffset: 0,
|
||||
}),
|
||||
"test_delete_node_after_selection: selection shouldn't be updated"
|
||||
);
|
||||
})();
|
||||
|
||||
(function test_delete_node_containing_selection() {
|
||||
events = [];
|
||||
editingHost.innerHTML = "<span>abc</span><span>def</span>";
|
||||
getSelection().collapse(editingHost.querySelector("span").firstChild, 0);
|
||||
editor.deleteNode(editingHost.querySelector("span"));
|
||||
is(
|
||||
editingHost.innerHTML,
|
||||
"<span>def</span>",
|
||||
"test_delete_node_containing_selection: deleteNode() should delete the node"
|
||||
);
|
||||
is(
|
||||
events.length,
|
||||
1,
|
||||
"test_delete_node_containing_selection: Only one input event should be fired when deleteNode() deletes a node"
|
||||
);
|
||||
is(
|
||||
stringifyInputEvent(events[0]),
|
||||
stringifyInputEvent({ type: "input", inputType: "" }),
|
||||
"test_delete_node_containing_selection: input event should be fired when deleting a node"
|
||||
);
|
||||
is(
|
||||
getRangeDescription(getSelection().getRangeAt(0)),
|
||||
getRangeDescription({
|
||||
startContainer: editingHost,
|
||||
startOffset: 0,
|
||||
endContainer: editingHost,
|
||||
endOffset: 0,
|
||||
}),
|
||||
"test_delete_node_containing_selection: selection should be updated whether node was"
|
||||
);
|
||||
})();
|
||||
|
||||
(function test_delete_node_containing_selection_with_preserving_selection() {
|
||||
events = [];
|
||||
editingHost.innerHTML = "<span>abc</span><span>def</span>";
|
||||
getSelection().collapse(editingHost.querySelector("span").firstChild, 0);
|
||||
editor.deleteNode(editingHost.querySelector("span"), true);
|
||||
is(
|
||||
editingHost.innerHTML,
|
||||
"<span>def</span>",
|
||||
"test_delete_node_containing_selection_with_preserving_selection: deleteNode() should delete the node"
|
||||
);
|
||||
is(
|
||||
events.length,
|
||||
1,
|
||||
"test_delete_node_containing_selection_with_preserving_selection: Only one input event should be fired when deleteNode() deletes a node"
|
||||
);
|
||||
is(
|
||||
stringifyInputEvent(events[0]),
|
||||
stringifyInputEvent({ type: "input", inputType: "" }),
|
||||
"test_delete_node_containing_selection_with_preserving_selection: input event should be fired when deleting a node"
|
||||
);
|
||||
is(
|
||||
getRangeDescription(getSelection().getRangeAt(0)),
|
||||
getRangeDescription({
|
||||
startContainer: editingHost,
|
||||
startOffset: 0,
|
||||
endContainer: editingHost,
|
||||
endOffset: 0,
|
||||
}),
|
||||
"test_delete_node_containing_selection_with_preserving_selection: selection should be updated whether node was"
|
||||
);
|
||||
})();
|
||||
|
||||
(function test_not_preserve_selection_nested_by_beforeinput() {
|
||||
editingHost.innerHTML = "<span>abc</span><span>ghi</span>";
|
||||
const span = document.createElement("span");
|
||||
span.textContent = "def";
|
||||
getSelection().collapse(editingHost, 0);
|
||||
editingHost.addEventListener("beforeinput", () => {
|
||||
editor.insertNode(span, editingHost, 1);
|
||||
}, {once: true});
|
||||
editor.deleteNode(editingHost.querySelector("span + span"), true);
|
||||
is(
|
||||
editingHost.innerHTML,
|
||||
"<span>abc</span><span>def</span>",
|
||||
"test_not_preserve_selection_nested_by_beforeinput: both insertNode() and deleteNode() should work"
|
||||
);
|
||||
is(
|
||||
getRangeDescription(getSelection().getRangeAt(0)),
|
||||
getRangeDescription({
|
||||
startContainer: editingHost,
|
||||
startOffset: 2,
|
||||
endContainer: editingHost,
|
||||
endOffset: 2,
|
||||
}),
|
||||
"test_not_preserve_selection_nested_by_beforeinput: only insertNode() called in beforeinput listener should update selection"
|
||||
);
|
||||
})();
|
||||
|
||||
(function test_not_preserve_selection_nested_by_input() {
|
||||
editingHost.innerHTML = "<span>abc</span><span>ghi</span>";
|
||||
const span = document.createElement("span");
|
||||
span.textContent = "def";
|
||||
getSelection().collapse(editingHost, 0);
|
||||
editingHost.addEventListener("input", () => {
|
||||
editor.insertNode(span, editingHost, 1);
|
||||
}, {once: true});
|
||||
editor.deleteNode(editingHost.querySelector("span + span"), true);
|
||||
is(
|
||||
editingHost.innerHTML,
|
||||
"<span>abc</span><span>def</span>",
|
||||
"test_not_preserve_selection_nested_by_input: both insertNode() and deleteNode() should work"
|
||||
);
|
||||
is(
|
||||
getRangeDescription(getSelection().getRangeAt(0)),
|
||||
getRangeDescription({
|
||||
startContainer: editingHost,
|
||||
startOffset: 2,
|
||||
endContainer: editingHost,
|
||||
endOffset: 2,
|
||||
}),
|
||||
"test_not_preserve_selection_nested_by_input: only insertNode() called in input listener should update selection"
|
||||
);
|
||||
})();
|
||||
|
||||
SimpleTest.finish();
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body><div contenteditable><br></div></body>
|
||||
</html>
|
|
@ -0,0 +1,214 @@
|
|||
<!doctype>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>nsIEditor.insertNode</title>
|
||||
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
function stringifyInputEvent(aEvent) {
|
||||
if (!aEvent) {
|
||||
return "null";
|
||||
}
|
||||
return `${aEvent.type}: { inputType=${aEvent.inputType} }`;
|
||||
}
|
||||
|
||||
function getRangeDescription(range) {
|
||||
function getNodeDescription(node) {
|
||||
if (!node) {
|
||||
return "null";
|
||||
}
|
||||
switch (node.nodeType) {
|
||||
case Node.TEXT_NODE:
|
||||
return `${node.nodeName} "${node.data}"`;
|
||||
case Node.ELEMENT_NODE:
|
||||
return `<${node.nodeName.toLowerCase()}>`;
|
||||
default:
|
||||
return `${node.nodeName}`;
|
||||
}
|
||||
}
|
||||
if (range === null) {
|
||||
return "null";
|
||||
}
|
||||
if (range === undefined) {
|
||||
return "undefined";
|
||||
}
|
||||
return range.startContainer == range.endContainer &&
|
||||
range.startOffset == range.endOffset
|
||||
? `(${getNodeDescription(range.startContainer)}, ${range.startOffset})`
|
||||
: `(${getNodeDescription(range.startContainer)}, ${
|
||||
range.startOffset
|
||||
}) - (${getNodeDescription(range.endContainer)}, ${range.endOffset})`;
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SimpleTest.waitForFocus(() => {
|
||||
const editingHost = document.querySelector("div[contenteditable]");
|
||||
const editor =
|
||||
SpecialPowers.wrap(window).docShell.editingSession.getEditorForWindow(window);
|
||||
|
||||
editingHost.focus();
|
||||
|
||||
let events = [];
|
||||
editingHost.addEventListener("input", event => events.push(event));
|
||||
|
||||
(function test_insert_text_to_start() {
|
||||
editor.insertNode(document.createTextNode("abc"), editingHost, 0);
|
||||
is(
|
||||
editingHost.innerHTML,
|
||||
"abc<br>",
|
||||
"test_insert_text_to_start: insertNode() should insert new text node at start of the container"
|
||||
);
|
||||
is(
|
||||
events.length,
|
||||
1,
|
||||
"test_insert_text_to_start: Only one input event should be fired when insertNode() inserts a text node"
|
||||
);
|
||||
is(
|
||||
stringifyInputEvent(events[0]),
|
||||
stringifyInputEvent({ type: "input", inputType: "" }),
|
||||
"test_insert_text_to_start: input event should be fired when inserting a node"
|
||||
);
|
||||
is(
|
||||
getRangeDescription(getSelection().getRangeAt(0)),
|
||||
getRangeDescription({
|
||||
startContainer: editingHost,
|
||||
startOffset: 1,
|
||||
endContainer: editingHost,
|
||||
endOffset: 1,
|
||||
}),
|
||||
"test_insert_text_to_start: insertNode() should collapse selection after the inserted text node"
|
||||
);
|
||||
})();
|
||||
|
||||
(function test_insert_span_to_big_index() {
|
||||
events = [];
|
||||
editingHost.innerHTML = "abc";
|
||||
const span = document.createElement("span");
|
||||
span.textContent = "def";
|
||||
editor.insertNode(span, editingHost, 1000);
|
||||
is(
|
||||
editingHost.innerHTML,
|
||||
"abc<span>def</span>",
|
||||
"test_insert_span_to_big_index: insertNode() with big index should insert new node at end of the container"
|
||||
);
|
||||
is(
|
||||
events.length,
|
||||
1,
|
||||
"test_insert_span_to_big_index: Only one input event should be fired when insertNode() inserts a node"
|
||||
);
|
||||
is(
|
||||
stringifyInputEvent(events[0]),
|
||||
stringifyInputEvent({ type: "input", inputType: "" }),
|
||||
"test_insert_span_to_big_index: input event should be fired when inserting a node"
|
||||
);
|
||||
is(
|
||||
getRangeDescription(getSelection().getRangeAt(0)),
|
||||
getRangeDescription({
|
||||
startContainer: editingHost,
|
||||
startOffset: 2,
|
||||
endContainer: editingHost,
|
||||
endOffset: 2,
|
||||
}),
|
||||
"test_insert_span_to_big_index: insertNode() should collapse selection after the inserted node"
|
||||
);
|
||||
})();
|
||||
|
||||
(function test_preserve_selection() {
|
||||
events = [];
|
||||
editingHost.innerHTML = "abc";
|
||||
const span = document.createElement("span");
|
||||
span.textContent = "def";
|
||||
getSelection().collapse(editingHost, 0);
|
||||
editor.insertNode(span, editingHost, 1, true);
|
||||
is(
|
||||
editingHost.innerHTML,
|
||||
"abc<span>def</span>",
|
||||
"test_preserve_selection: insertNode() should insert new node at end of the container"
|
||||
);
|
||||
is(
|
||||
events.length,
|
||||
1,
|
||||
"test_preserve_selection: Only one input event should be fired when insertNode() inserts a node"
|
||||
);
|
||||
is(
|
||||
stringifyInputEvent(events[0]),
|
||||
stringifyInputEvent({ type: "input", inputType: "" }),
|
||||
"test_preserve_selection: input event should be fired when inserting a node"
|
||||
);
|
||||
is(
|
||||
getRangeDescription(getSelection().getRangeAt(0)),
|
||||
getRangeDescription({
|
||||
startContainer: editingHost,
|
||||
startOffset: 0,
|
||||
endContainer: editingHost,
|
||||
endOffset: 0,
|
||||
}),
|
||||
"test_preserve_selection: insertNode() should not collapse selection after the inserted node"
|
||||
);
|
||||
})();
|
||||
|
||||
(function test_not_preserve_selection_nested_by_beforeinput() {
|
||||
editingHost.innerHTML = "abc";
|
||||
const span1 = document.createElement("span");
|
||||
span1.textContent = "def";
|
||||
const span2 = document.createElement("span");
|
||||
span2.textContent = "ghi";
|
||||
getSelection().collapse(editingHost, 0);
|
||||
editingHost.addEventListener("beforeinput", () => {
|
||||
editor.insertNode(span1, editingHost, 1);
|
||||
}, {once: true});
|
||||
editor.insertNode(span2, editingHost, 2, true);
|
||||
is(
|
||||
editingHost.innerHTML,
|
||||
"abc<span>def</span><span>ghi</span>",
|
||||
"test_not_preserve_selection_nested_by_beforeinput: both insertNode() should work"
|
||||
);
|
||||
is(
|
||||
getRangeDescription(getSelection().getRangeAt(0)),
|
||||
getRangeDescription({
|
||||
startContainer: editingHost,
|
||||
startOffset: 2,
|
||||
endContainer: editingHost,
|
||||
endOffset: 2,
|
||||
}),
|
||||
"test_not_preserve_selection_nested_by_beforeinput: only insertNode() called in beforeinput listener should update selection"
|
||||
);
|
||||
})();
|
||||
|
||||
(function test_not_preserve_selection_nested_by_input() {
|
||||
editingHost.innerHTML = "abc";
|
||||
const span1 = document.createElement("span");
|
||||
span1.textContent = "def";
|
||||
const span2 = document.createElement("span");
|
||||
span2.textContent = "ghi";
|
||||
getSelection().collapse(editingHost, 0);
|
||||
editingHost.addEventListener("input", () => {
|
||||
editor.insertNode(span2, editingHost, 2);
|
||||
}, {once: true});
|
||||
editor.insertNode(span1, editingHost, 1, true);
|
||||
is(
|
||||
editingHost.innerHTML,
|
||||
"abc<span>def</span><span>ghi</span>",
|
||||
"test_not_preserve_selection_nested_by_input: both insertNode() should work"
|
||||
);
|
||||
is(
|
||||
getRangeDescription(getSelection().getRangeAt(0)),
|
||||
getRangeDescription({
|
||||
startContainer: editingHost,
|
||||
startOffset: 3,
|
||||
endContainer: editingHost,
|
||||
endOffset: 3,
|
||||
}),
|
||||
"test_not_preserve_selection_nested_by_input: only insertNode() called in input listener should update selection"
|
||||
);
|
||||
})();
|
||||
|
||||
SimpleTest.finish();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body><div contenteditable><br></div></body>
|
||||
</html>
|
|
@ -476,27 +476,50 @@ interface nsIEditor : nsISupports
|
|||
void cloneAttributes(in Element aDestElement, in Element aSourceElement);
|
||||
|
||||
/**
|
||||
* insertNode inserts aNode into aParent at aPosition.
|
||||
* insertNode inserts aNode into aParent at aPosition and this operation is
|
||||
* undoable.
|
||||
* No checking is done to verify the legality of the insertion.
|
||||
* That is the responsibility of the caller.
|
||||
* @param aNode The DOM Node to insert.
|
||||
* @param aParent The node to insert the new object into
|
||||
* @param aPosition The place in aParent to insert the new node
|
||||
* 0=first child, 1=second child, etc.
|
||||
* any number > number of current children = last child
|
||||
* TODO: Move this method to nsIHTMLEditor, TextEditor does not allow chrome
|
||||
* script to customize its anonymous subtree.
|
||||
*
|
||||
* @param aNode The DOM Node to insert.
|
||||
* @param aParent The node to insert the new object into
|
||||
* @param aPosition The place in aParent to insert the new node
|
||||
* 0=first child, 1=second child, etc.
|
||||
* If larger than number of children of aParent,
|
||||
* this will append aNode into aParent.
|
||||
* @param aPreseveSelection The default value is false. If set to true,
|
||||
* the insert node handler does not update
|
||||
* Selection.
|
||||
* FYI: If somebody handles `beforeinput` event or
|
||||
* `input` event caused by this and it does
|
||||
* something undoable, selection may be changed by
|
||||
* that.
|
||||
*/
|
||||
[can_run_script]
|
||||
[optional_argc, can_run_script]
|
||||
void insertNode(in Node node,
|
||||
in Node parent,
|
||||
in unsigned long aPosition);
|
||||
in unsigned long aPosition,
|
||||
[optional] in boolean aPreserveSelection);
|
||||
|
||||
|
||||
/**
|
||||
* deleteNode removes aChild from aParent.
|
||||
* @param aChild The node to delete
|
||||
* deleteNode removes aChild from aParent and this operation is undobable.
|
||||
* TODO: Move this method to nsIHTMLEditor, TextEditor does not allow chrome
|
||||
* script to customize its anonymous subtree.
|
||||
*
|
||||
* @param aChild The node to delete
|
||||
* @param aPreseveSelection The default value is false. If set to true,
|
||||
* the insert node handler does not update
|
||||
* Selection.
|
||||
* FYI: If somebody handles `beforeinput` event or
|
||||
* `input` event caused by this and it does
|
||||
* something undoable, selection may be changed by
|
||||
* that.
|
||||
*/
|
||||
[can_run_script]
|
||||
void deleteNode(in Node child);
|
||||
[optional_argc, can_run_script]
|
||||
void deleteNode(in Node child, [optional] in boolean aPreserveSelection);
|
||||
|
||||
/* ------------ Output methods -------------- */
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include "base/platform_thread.h" // for PlatformThreadId
|
||||
#include "gfxEnv.h"
|
||||
#include "GLConsts.h"
|
||||
#include "GLTypes.h"
|
||||
#include "mozilla/EnumTypeTraits.h"
|
||||
#include "mozilla/gfx/Logging.h"
|
||||
|
@ -28,6 +29,7 @@
|
|||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
# include "mozilla/ProfilerLabels.h"
|
||||
# include "AndroidBuild.h"
|
||||
#endif
|
||||
|
||||
#if defined(MOZ_X11)
|
||||
|
@ -690,6 +692,21 @@ class GLLibraryEGL final {
|
|||
} mSymbols = {};
|
||||
};
|
||||
|
||||
static bool ShouldLeakEglDisplay() {
|
||||
// We are seeing crashes in eglTerminate on the Samsung S22 family of devices
|
||||
// running Android 14, so we leak the EGLDisplay rather than call
|
||||
// eglTerminate.
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
if (jni::GetAPIVersion() >= 34) {
|
||||
const auto board = java::sdk::Build::BOARD()->ToString();
|
||||
if (board.EqualsASCII("s5e9925")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
class EglDisplay final {
|
||||
public:
|
||||
const RefPtr<GLLibraryEGL> mLib;
|
||||
|
@ -739,7 +756,13 @@ class EglDisplay final {
|
|||
|
||||
// -
|
||||
|
||||
EGLBoolean fTerminate() { return mLib->fTerminate(mDisplay); }
|
||||
EGLBoolean fTerminate() {
|
||||
static const bool shouldLeak = ShouldLeakEglDisplay();
|
||||
if (shouldLeak) {
|
||||
return LOCAL_EGL_TRUE;
|
||||
}
|
||||
return mLib->fTerminate(mDisplay);
|
||||
}
|
||||
|
||||
EGLBoolean fMakeCurrent(EGLSurface draw, EGLSurface read,
|
||||
EGLContext ctx) const {
|
||||
|
|
|
@ -228,6 +228,16 @@ bool GPUProcessManager::LaunchGPUProcess() {
|
|||
mProcessAttemptLastTime = newTime;
|
||||
mProcessStable = false;
|
||||
|
||||
// If the process is launched whilst we're in the background it may never get
|
||||
// a chance to be declared stable before it is killed again. We don't want
|
||||
// this happening repeatedly to result in the GPU process being disabled, so
|
||||
// we assume that processes launched whilst in the background are stable.
|
||||
if (!mAppInForeground) {
|
||||
gfxCriticalNote
|
||||
<< "GPU process is being launched whilst app is in background";
|
||||
mProcessStable = true;
|
||||
}
|
||||
|
||||
std::vector<std::string> extraArgs;
|
||||
ipc::ProcessChild::AddPlatformBuildID(extraArgs);
|
||||
|
||||
|
@ -1346,7 +1356,9 @@ void GPUProcessManager::MapLayerTreeId(LayersId aLayersId,
|
|||
|
||||
void GPUProcessManager::UnmapLayerTreeId(LayersId aLayersId,
|
||||
base::ProcessId aOwningId) {
|
||||
nsresult rv = EnsureGPUReady();
|
||||
// Only call EnsureGPUReady() if we have already launched the process, to
|
||||
// avoid launching a new process unnecesarily. (eg if we are backgrounded)
|
||||
nsresult rv = mProcess ? EnsureGPUReady() : NS_ERROR_NOT_AVAILABLE;
|
||||
if (NS_WARN_IF(rv == NS_ERROR_ILLEGAL_DURING_SHUTDOWN)) {
|
||||
return;
|
||||
}
|
||||
|
@ -1354,7 +1366,7 @@ void GPUProcessManager::UnmapLayerTreeId(LayersId aLayersId,
|
|||
if (NS_SUCCEEDED(rv)) {
|
||||
mGPUChild->SendRemoveLayerTreeIdMapping(
|
||||
LayerTreeIdMapping(aLayersId, aOwningId));
|
||||
} else {
|
||||
} else if (!mProcess) {
|
||||
CompositorBridgeParent::DeallocateLayerTreeId(aLayersId);
|
||||
}
|
||||
|
||||
|
|
|
@ -194,6 +194,11 @@ ipc::IPCResult CanvasTranslator::RecvAddBuffer(
|
|||
void CanvasTranslator::AddBuffer(ipc::SharedMemoryBasic::Handle&& aBufferHandle,
|
||||
size_t aBufferSize) {
|
||||
MOZ_ASSERT(IsInTaskQueue());
|
||||
if (mHeader->readerState == State::Failed) {
|
||||
// We failed before we got to the pause event.
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_RELEASE_ASSERT(mHeader->readerState == State::Paused);
|
||||
MOZ_ASSERT(mDefaultBufferSize != 0);
|
||||
|
||||
|
@ -233,6 +238,11 @@ ipc::IPCResult CanvasTranslator::RecvSetDataSurfaceBuffer(
|
|||
void CanvasTranslator::SetDataSurfaceBuffer(
|
||||
ipc::SharedMemoryBasic::Handle&& aBufferHandle, size_t aBufferSize) {
|
||||
MOZ_ASSERT(IsInTaskQueue());
|
||||
if (mHeader->readerState == State::Failed) {
|
||||
// We failed before we got to the pause event.
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_RELEASE_ASSERT(mHeader->readerState == State::Paused);
|
||||
|
||||
if (!CreateAndMapShmem(mDataSurfaceShmem, std::move(aBufferHandle),
|
||||
|
@ -448,6 +458,7 @@ void CanvasTranslator::TranslateRecording() {
|
|||
gfxCriticalNote << "Failed to read event type: "
|
||||
<< recordedEvent->GetType();
|
||||
}
|
||||
mHeader->readerState = State::Failed;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -467,6 +478,7 @@ void CanvasTranslator::TranslateRecording() {
|
|||
} else {
|
||||
gfxCriticalNote << "Failed to play canvas event type: " << eventType;
|
||||
}
|
||||
mHeader->readerState = State::Failed;
|
||||
}
|
||||
|
||||
mHeader->processedCount++;
|
||||
|
|
|
@ -1281,6 +1281,7 @@ void RenderThread::NotifyWebRenderError(WebRenderError aError) {
|
|||
}
|
||||
|
||||
void RenderThread::HandleWebRenderError(WebRenderError aError) {
|
||||
MOZ_ASSERT(IsInRenderThread());
|
||||
if (mHandlingWebRenderError) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -459,26 +459,30 @@ class RenderThread final {
|
|||
}
|
||||
};
|
||||
|
||||
Mutex mRenderTextureMapLock MOZ_UNANNOTATED;
|
||||
Mutex mRenderTextureMapLock;
|
||||
std::unordered_map<wr::ExternalImageId, RefPtr<RenderTextureHost>,
|
||||
ExternalImageIdHashFn>
|
||||
mRenderTextures;
|
||||
mRenderTextures MOZ_GUARDED_BY(mRenderTextureMapLock);
|
||||
std::unordered_map<wr::ExternalImageId, RefPtr<RenderTextureHost>,
|
||||
ExternalImageIdHashFn>
|
||||
mSyncObjectNeededRenderTextures;
|
||||
mSyncObjectNeededRenderTextures MOZ_GUARDED_BY(mRenderTextureMapLock);
|
||||
std::list<std::pair<RenderTextureOp, RefPtr<RenderTextureHost>>>
|
||||
mRenderTextureOps;
|
||||
mRenderTextureOps MOZ_GUARDED_BY(mRenderTextureMapLock);
|
||||
|
||||
// Used to remove all RenderTextureHost that are going to be removed by
|
||||
// a deferred callback and remove them right away without waiting for the
|
||||
// callback. On device reset we have to remove all GL related resources right
|
||||
// away.
|
||||
std::list<RefPtr<RenderTextureHost>> mRenderTexturesDeferred;
|
||||
std::list<RefPtr<RenderTextureHost>> mRenderTexturesDeferred
|
||||
MOZ_GUARDED_BY(mRenderTextureMapLock);
|
||||
|
||||
RefPtr<nsIRunnable> mRenderTextureOpsRunnable;
|
||||
RefPtr<nsIRunnable> mRenderTextureOpsRunnable
|
||||
MOZ_GUARDED_BY(mRenderTextureMapLock);
|
||||
|
||||
// Set from MainThread, read from either MainThread or RenderThread
|
||||
bool mHasShutdown;
|
||||
|
||||
// Only accessed from the RenderThread
|
||||
bool mHandlingDeviceReset;
|
||||
bool mHandlingWebRenderError;
|
||||
};
|
||||
|
|
|
@ -17,7 +17,7 @@ default = []
|
|||
[dependencies.wgc]
|
||||
package = "wgpu-core"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
|
||||
rev = "6dc9ccab8592645fda3204be1cfb5929fd7f924d"
|
||||
#Note: "replay" shouldn't ideally be needed,
|
||||
# but it allows us to serialize everything across IPC.
|
||||
features = ["replay", "trace", "serial-pass", "strict_asserts", "wgsl", "api_log_info"]
|
||||
|
@ -27,36 +27,36 @@ features = ["replay", "trace", "serial-pass", "strict_asserts", "wgsl", "api_log
|
|||
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.wgc]
|
||||
package = "wgpu-core"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
|
||||
rev = "6dc9ccab8592645fda3204be1cfb5929fd7f924d"
|
||||
features = ["metal"]
|
||||
|
||||
# We want the wgpu-core Direct3D backends on Windows.
|
||||
[target.'cfg(windows)'.dependencies.wgc]
|
||||
package = "wgpu-core"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
|
||||
rev = "6dc9ccab8592645fda3204be1cfb5929fd7f924d"
|
||||
features = ["dx12"]
|
||||
|
||||
# We want the wgpu-core Vulkan backend on Linux and Windows.
|
||||
[target.'cfg(any(windows, all(unix, not(any(target_os = "macos", target_os = "ios")))))'.dependencies.wgc]
|
||||
package = "wgpu-core"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
|
||||
rev = "6dc9ccab8592645fda3204be1cfb5929fd7f924d"
|
||||
features = ["vulkan"]
|
||||
|
||||
[dependencies.wgt]
|
||||
package = "wgpu-types"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
|
||||
rev = "6dc9ccab8592645fda3204be1cfb5929fd7f924d"
|
||||
|
||||
[dependencies.wgh]
|
||||
package = "wgpu-hal"
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
|
||||
rev = "6dc9ccab8592645fda3204be1cfb5929fd7f924d"
|
||||
|
||||
[target.'cfg(windows)'.dependencies.d3d12]
|
||||
git = "https://github.com/gfx-rs/wgpu"
|
||||
rev = "ff7b2c399301cca9bcbc5b19a869feb3c29ef785"
|
||||
rev = "6dc9ccab8592645fda3204be1cfb5929fd7f924d"
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
winapi = "0.3"
|
||||
|
|
|
@ -20,11 +20,11 @@ origin:
|
|||
|
||||
# Human-readable identifier for this version/release
|
||||
# Generally "version NNN", "tag SSS", "bookmark SSS"
|
||||
release: commit ff7b2c399301cca9bcbc5b19a869feb3c29ef785
|
||||
release: commit 6dc9ccab8592645fda3204be1cfb5929fd7f924d
|
||||
|
||||
# Revision to pull in
|
||||
# Must be a long or short commit SHA (long preferred)
|
||||
revision: ff7b2c399301cca9bcbc5b19a869feb3c29ef785
|
||||
revision: 6dc9ccab8592645fda3204be1cfb5929fd7f924d
|
||||
|
||||
license: ['MIT', 'Apache-2.0']
|
||||
|
||||
|
|
|
@ -580,7 +580,6 @@ pub extern "C" fn wgpu_client_create_texture_view(
|
|||
base_array_layer: desc.base_array_layer,
|
||||
array_layer_count: desc.array_layer_count.map(|ptr| *ptr),
|
||||
},
|
||||
plane: None,
|
||||
};
|
||||
|
||||
let action = TextureAction::CreateView(id, wgpu_desc);
|
||||
|
|
|
@ -394,7 +394,7 @@ class WeakCache<
|
|||
|
||||
bool empty() override { return map.empty(); }
|
||||
|
||||
size_t traceWeak(JSTracer* trc, js::gc::StoreBuffer* sbToLock) override {
|
||||
size_t traceWeak(JSTracer* trc, NeedsLock needsLock) override {
|
||||
size_t steps = map.count();
|
||||
|
||||
// Create an Enum and sweep the table entries.
|
||||
|
@ -405,8 +405,8 @@ class WeakCache<
|
|||
// Potentially take a lock while the Enum's destructor is called as this can
|
||||
// rehash/resize the table and access the store buffer.
|
||||
mozilla::Maybe<js::gc::AutoLockStoreBuffer> lock;
|
||||
if (sbToLock) {
|
||||
lock.emplace(sbToLock);
|
||||
if (needsLock) {
|
||||
lock.emplace(trc->runtime());
|
||||
}
|
||||
e.reset();
|
||||
|
||||
|
@ -594,7 +594,7 @@ class WeakCache<GCHashSet<T, HashPolicy, AllocPolicy>> final
|
|||
explicit WeakCache(JSRuntime* rt, Args&&... args)
|
||||
: WeakCacheBase(rt), set(std::forward<Args>(args)...) {}
|
||||
|
||||
size_t traceWeak(JSTracer* trc, js::gc::StoreBuffer* sbToLock) override {
|
||||
size_t traceWeak(JSTracer* trc, NeedsLock needsLock) override {
|
||||
size_t steps = set.count();
|
||||
|
||||
// Create an Enum and sweep the table entries. It's not necessary to take
|
||||
|
@ -607,8 +607,8 @@ class WeakCache<GCHashSet<T, HashPolicy, AllocPolicy>> final
|
|||
// can access the store buffer, we need to take a lock for this if we're
|
||||
// called off main thread.
|
||||
mozilla::Maybe<js::gc::AutoLockStoreBuffer> lock;
|
||||
if (sbToLock) {
|
||||
lock.emplace(sbToLock);
|
||||
if (needsLock) {
|
||||
lock.emplace(trc->runtime());
|
||||
}
|
||||
e.reset();
|
||||
|
||||
|
|
|
@ -514,13 +514,18 @@ namespace detail {
|
|||
|
||||
static MOZ_ALWAYS_INLINE ChunkBase* GetCellChunkBase(const Cell* cell) {
|
||||
MOZ_ASSERT(cell);
|
||||
return reinterpret_cast<ChunkBase*>(uintptr_t(cell) & ~ChunkMask);
|
||||
auto* chunk = reinterpret_cast<ChunkBase*>(uintptr_t(cell) & ~ChunkMask);
|
||||
MOZ_ASSERT(chunk->runtime);
|
||||
return chunk;
|
||||
}
|
||||
|
||||
static MOZ_ALWAYS_INLINE TenuredChunkBase* GetCellChunkBase(
|
||||
const TenuredCell* cell) {
|
||||
MOZ_ASSERT(cell);
|
||||
return reinterpret_cast<TenuredChunkBase*>(uintptr_t(cell) & ~ChunkMask);
|
||||
auto* chunk =
|
||||
reinterpret_cast<TenuredChunkBase*>(uintptr_t(cell) & ~ChunkMask);
|
||||
MOZ_ASSERT(chunk->runtime);
|
||||
return chunk;
|
||||
}
|
||||
|
||||
static MOZ_ALWAYS_INLINE JS::Zone* GetTenuredGCThingZone(const uintptr_t addr) {
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче