Bug 1857834 - auto-formatting with Prettier v3 r=linter-reviewers,webdriver-reviewers,perftest-reviewers,search-reviewers,devtools-reviewers,sync-reviewers,reusable-components-reviewers,profiler-reviewers,dom-storage-reviewers,android-reviewers,firefox-ai-ml-reviewers,hjones,mcheang,mstange,sparky,janv,nchevobbe,tarek,Standard8,markh
# ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D230598
This commit is contained in:
@@ -252,9 +252,8 @@ addAccessibleTask(
|
|||||||
info("mutate: Adding new table");
|
info("mutate: Adding new table");
|
||||||
let shown = waitForEvent(EVENT_SHOW, "newTable");
|
let shown = waitForEvent(EVENT_SHOW, "newTable");
|
||||||
await invokeContentTask(browser, [], () => {
|
await invokeContentTask(browser, [], () => {
|
||||||
content.document.getElementById(
|
content.document.getElementById("newTableContainer").innerHTML =
|
||||||
"newTableContainer"
|
`<table id="newTable"><tr><th>a</th></tr></table>`;
|
||||||
).innerHTML = `<table id="newTable"><tr><th>a</th></tr></table>`;
|
|
||||||
});
|
});
|
||||||
let newTable = (await shown).accessible;
|
let newTable = (await shown).accessible;
|
||||||
testAbsentAttrs(newTable, { "layout-guess": "true" });
|
testAbsentAttrs(newTable, { "layout-guess": "true" });
|
||||||
|
|||||||
@@ -142,8 +142,8 @@ function testTableStruct(
|
|||||||
aTableType == kMathTable
|
aTableType == kMathTable
|
||||||
? ROLE_MATHML_CELL
|
? ROLE_MATHML_CELL
|
||||||
: isGrid
|
: isGrid
|
||||||
? ROLE_GRID_CELL
|
? ROLE_GRID_CELL
|
||||||
: ROLE_CELL;
|
: ROLE_CELL;
|
||||||
break;
|
break;
|
||||||
case kRowHeaderCell:
|
case kRowHeaderCell:
|
||||||
role = ROLE_ROWHEADER;
|
role = ROLE_ROWHEADER;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
|
|
||||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
<!-- 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
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
|
|
||||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
<!-- 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
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
|
|
||||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
<!-- 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
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
|||||||
@@ -207,10 +207,14 @@ async function waitForBookmarksToolbarVisibility({
|
|||||||
visible,
|
visible,
|
||||||
message,
|
message,
|
||||||
}) {
|
}) {
|
||||||
let result = await TestUtils.waitForCondition(() => {
|
let result = await TestUtils.waitForCondition(
|
||||||
let toolbar = win.document.getElementById("PersonalToolbar");
|
() => {
|
||||||
return toolbar && (visible ? !toolbar.collapsed : toolbar.collapsed);
|
let toolbar = win.document.getElementById("PersonalToolbar");
|
||||||
}, message || "waiting for toolbar to become " + (visible ? "visible" : "hidden"));
|
return toolbar && (visible ? !toolbar.collapsed : toolbar.collapsed);
|
||||||
|
},
|
||||||
|
message ||
|
||||||
|
"waiting for toolbar to become " + (visible ? "visible" : "hidden")
|
||||||
|
);
|
||||||
ok(result, message);
|
ok(result, message);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,9 +142,8 @@ async function openInNewTabAndReturnContent(selector) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
add_task(async function test_rightclick_open_bloburl_in_new_tab() {
|
add_task(async function test_rightclick_open_bloburl_in_new_tab() {
|
||||||
let blobDataFromLoadedPage = await rightClickOpenInNewTabAndReturnContent(
|
let blobDataFromLoadedPage =
|
||||||
"blob-url-link"
|
await rightClickOpenInNewTabAndReturnContent("blob-url-link");
|
||||||
);
|
|
||||||
is(
|
is(
|
||||||
blobDataFromLoadedPage,
|
blobDataFromLoadedPage,
|
||||||
blobDataAsString,
|
blobDataAsString,
|
||||||
@@ -164,9 +163,8 @@ add_task(async function test_rightclick_open_bloburl_referrer_in_new_tab() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
add_task(async function test_open_bloburl_in_new_tab() {
|
add_task(async function test_open_bloburl_in_new_tab() {
|
||||||
let blobDataFromLoadedPage = await openInNewTabAndReturnContent(
|
let blobDataFromLoadedPage =
|
||||||
"blob-url-link"
|
await openInNewTabAndReturnContent("blob-url-link");
|
||||||
);
|
|
||||||
is(
|
is(
|
||||||
blobDataFromLoadedPage,
|
blobDataFromLoadedPage,
|
||||||
blobDataAsString,
|
blobDataAsString,
|
||||||
|
|||||||
@@ -102,9 +102,12 @@ function getBackgroundColor(browser, expectedActive) {
|
|||||||
await ContentTaskUtils.waitForCondition(() => {
|
await ContentTaskUtils.waitForCondition(() => {
|
||||||
return area;
|
return area;
|
||||||
}, "Page has loaded");
|
}, "Page has loaded");
|
||||||
await ContentTaskUtils.waitForCondition(() => {
|
await ContentTaskUtils.waitForCondition(
|
||||||
return area.matches(":-moz-window-inactive") == hasPseudoClass;
|
() => {
|
||||||
}, `Window is considered ${hasPseudoClass ? "inactive" : "active"}`);
|
return area.matches(":-moz-window-inactive") == hasPseudoClass;
|
||||||
|
},
|
||||||
|
`Window is considered ${hasPseudoClass ? "inactive" : "active"}`
|
||||||
|
);
|
||||||
|
|
||||||
return content.getComputedStyle(area).backgroundColor;
|
return content.getComputedStyle(area).backgroundColor;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -136,9 +136,12 @@ let detectedStateFlags = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
async function waitForClass(item, className, shouldBePresent = true) {
|
async function waitForClass(item, className, shouldBePresent = true) {
|
||||||
await TestUtils.waitForCondition(() => {
|
await TestUtils.waitForCondition(
|
||||||
return item.classList.contains(className) == shouldBePresent;
|
() => {
|
||||||
}, `Target class ${className} should be ${shouldBePresent ? "present" : "not present"} on item ${item.id}`);
|
return item.classList.contains(className) == shouldBePresent;
|
||||||
|
},
|
||||||
|
`Target class ${className} should be ${shouldBePresent ? "present" : "not present"} on item ${item.id}`
|
||||||
|
);
|
||||||
|
|
||||||
Assert.equal(
|
Assert.equal(
|
||||||
item.classList.contains(className),
|
item.classList.contains(className),
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ function handleRequest(request, response) {
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<a id='testlink' href='${linkUrl}' ${referrerPolicy} ${
|
<a id='testlink' href='${linkUrl}' ${referrerPolicy} ${
|
||||||
rel ? ` rel='${rel}'` : ""
|
rel ? ` rel='${rel}'` : ""
|
||||||
}>
|
}>
|
||||||
referrer test link</a>
|
referrer test link</a>
|
||||||
</body>
|
</body>
|
||||||
</html>`;
|
</html>`;
|
||||||
|
|||||||
@@ -330,9 +330,8 @@ function openBrowserWindow(
|
|||||||
win.document.documentElement.removeAttribute("windowtype");
|
win.document.documentElement.removeAttribute("windowtype");
|
||||||
|
|
||||||
if (forcePrivate) {
|
if (forcePrivate) {
|
||||||
win.docShell.QueryInterface(
|
win.docShell.QueryInterface(Ci.nsILoadContext).usePrivateBrowsing =
|
||||||
Ci.nsILoadContext
|
true;
|
||||||
).usePrivateBrowsing = true;
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
AppConstants.platform == "win" &&
|
AppConstants.platform == "win" &&
|
||||||
@@ -654,9 +653,8 @@ nsBrowserContentHandler.prototype = {
|
|||||||
if (cmdLine.state == Ci.nsICommandLine.STATE_INITIAL_LAUNCH) {
|
if (cmdLine.state == Ci.nsICommandLine.STATE_INITIAL_LAUNCH) {
|
||||||
let win = Services.wm.getMostRecentWindow("navigator:blank");
|
let win = Services.wm.getMostRecentWindow("navigator:blank");
|
||||||
if (win) {
|
if (win) {
|
||||||
win.docShell.QueryInterface(
|
win.docShell.QueryInterface(Ci.nsILoadContext).usePrivateBrowsing =
|
||||||
Ci.nsILoadContext
|
true;
|
||||||
).usePrivateBrowsing = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5338,14 +5338,12 @@ var ContentBlockingCategoriesPrefs = {
|
|||||||
for (let item of rulesArray) {
|
for (let item of rulesArray) {
|
||||||
switch (item) {
|
switch (item) {
|
||||||
case "tp":
|
case "tp":
|
||||||
this.CATEGORY_PREFS[type][
|
this.CATEGORY_PREFS[type]["privacy.trackingprotection.enabled"] =
|
||||||
"privacy.trackingprotection.enabled"
|
true;
|
||||||
] = true;
|
|
||||||
break;
|
break;
|
||||||
case "-tp":
|
case "-tp":
|
||||||
this.CATEGORY_PREFS[type][
|
this.CATEGORY_PREFS[type]["privacy.trackingprotection.enabled"] =
|
||||||
"privacy.trackingprotection.enabled"
|
false;
|
||||||
] = false;
|
|
||||||
break;
|
break;
|
||||||
case "tpPrivate":
|
case "tpPrivate":
|
||||||
this.CATEGORY_PREFS[type][
|
this.CATEGORY_PREFS[type][
|
||||||
@@ -5454,14 +5452,12 @@ var ContentBlockingCategoriesPrefs = {
|
|||||||
this.CATEGORY_PREFS[type]["privacy.query_stripping.enabled"] = false;
|
this.CATEGORY_PREFS[type]["privacy.query_stripping.enabled"] = false;
|
||||||
break;
|
break;
|
||||||
case "qpsPBM":
|
case "qpsPBM":
|
||||||
this.CATEGORY_PREFS[type][
|
this.CATEGORY_PREFS[type]["privacy.query_stripping.enabled.pbmode"] =
|
||||||
"privacy.query_stripping.enabled.pbmode"
|
true;
|
||||||
] = true;
|
|
||||||
break;
|
break;
|
||||||
case "-qpsPBM":
|
case "-qpsPBM":
|
||||||
this.CATEGORY_PREFS[type][
|
this.CATEGORY_PREFS[type]["privacy.query_stripping.enabled.pbmode"] =
|
||||||
"privacy.query_stripping.enabled.pbmode"
|
false;
|
||||||
] = false;
|
|
||||||
break;
|
break;
|
||||||
case "fpp":
|
case "fpp":
|
||||||
this.CATEGORY_PREFS[type]["privacy.fingerprintingProtection"] = true;
|
this.CATEGORY_PREFS[type]["privacy.fingerprintingProtection"] = true;
|
||||||
@@ -5470,14 +5466,12 @@ var ContentBlockingCategoriesPrefs = {
|
|||||||
this.CATEGORY_PREFS[type]["privacy.fingerprintingProtection"] = false;
|
this.CATEGORY_PREFS[type]["privacy.fingerprintingProtection"] = false;
|
||||||
break;
|
break;
|
||||||
case "fppPrivate":
|
case "fppPrivate":
|
||||||
this.CATEGORY_PREFS[type][
|
this.CATEGORY_PREFS[type]["privacy.fingerprintingProtection.pbmode"] =
|
||||||
"privacy.fingerprintingProtection.pbmode"
|
true;
|
||||||
] = true;
|
|
||||||
break;
|
break;
|
||||||
case "-fppPrivate":
|
case "-fppPrivate":
|
||||||
this.CATEGORY_PREFS[type][
|
this.CATEGORY_PREFS[type]["privacy.fingerprintingProtection.pbmode"] =
|
||||||
"privacy.fingerprintingProtection.pbmode"
|
false;
|
||||||
] = false;
|
|
||||||
break;
|
break;
|
||||||
case "cookieBehavior0":
|
case "cookieBehavior0":
|
||||||
this.CATEGORY_PREFS[type]["network.cookie.cookieBehavior"] =
|
this.CATEGORY_PREFS[type]["network.cookie.cookieBehavior"] =
|
||||||
|
|||||||
@@ -824,9 +824,8 @@ class AboutLoginsInternal {
|
|||||||
// by other more Sync-specific pages.
|
// by other more Sync-specific pages.
|
||||||
const loggedIn = state.status != lazy.UIState.STATUS_NOT_CONFIGURED;
|
const loggedIn = state.status != lazy.UIState.STATUS_NOT_CONFIGURED;
|
||||||
const passwordSyncEnabled = state.syncEnabled && lazy.PASSWORD_SYNC_ENABLED;
|
const passwordSyncEnabled = state.syncEnabled && lazy.PASSWORD_SYNC_ENABLED;
|
||||||
const accountURL = await lazy.FxAccounts.config.promiseManageURI(
|
const accountURL =
|
||||||
"password-manager"
|
await lazy.FxAccounts.config.promiseManageURI("password-manager");
|
||||||
);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
loggedIn,
|
loggedIn,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- 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/. -->
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
|||||||
@@ -4,14 +4,13 @@
|
|||||||
|
|
||||||
import { html, ifDefined } from "chrome://global/content/vendor/lit.all.mjs";
|
import { html, ifDefined } from "chrome://global/content/vendor/lit.all.mjs";
|
||||||
|
|
||||||
export const stylesTemplate = () =>
|
export const stylesTemplate = () => html`
|
||||||
html`
|
<link rel="stylesheet" href="chrome://global/skin/in-content/common.css" />
|
||||||
<link rel="stylesheet" href="chrome://global/skin/in-content/common.css" />
|
<link
|
||||||
<link
|
rel="stylesheet"
|
||||||
rel="stylesheet"
|
href="chrome://browser/content/aboutlogins/components/input-field/input-field.css"
|
||||||
href="chrome://browser/content/aboutlogins/components/input-field/input-field.css"
|
/>
|
||||||
/>
|
`;
|
||||||
`;
|
|
||||||
|
|
||||||
export const editableFieldTemplate = ({
|
export const editableFieldTemplate = ({
|
||||||
type,
|
type,
|
||||||
@@ -22,30 +21,29 @@ export const editableFieldTemplate = ({
|
|||||||
onBlur,
|
onBlur,
|
||||||
labelL10nId,
|
labelL10nId,
|
||||||
noteL10nId,
|
noteL10nId,
|
||||||
}) =>
|
}) => html`
|
||||||
html`
|
<label
|
||||||
<label
|
for="input"
|
||||||
for="input"
|
class="field-label"
|
||||||
class="field-label"
|
data-l10n-id=${labelL10nId}
|
||||||
data-l10n-id=${labelL10nId}
|
tabindex="-1"
|
||||||
tabindex="-1"
|
>
|
||||||
>
|
</label>
|
||||||
</label>
|
<input
|
||||||
<input
|
id="input"
|
||||||
id="input"
|
class="input-field"
|
||||||
class="input-field"
|
type=${type}
|
||||||
type=${type}
|
value=${value}
|
||||||
value=${value}
|
aria-describedby="explainer"
|
||||||
aria-describedby="explainer"
|
?disabled=${disabled}
|
||||||
?disabled=${disabled}
|
?required=${required}
|
||||||
?required=${required}
|
@focus=${onFocus}
|
||||||
@focus=${onFocus}
|
@blur=${onBlur}
|
||||||
@blur=${onBlur}
|
/>
|
||||||
/>
|
<span
|
||||||
<span
|
id="explainer"
|
||||||
id="explainer"
|
role="note"
|
||||||
role="note"
|
class="explainer text-deemphasized"
|
||||||
class="explainer text-deemphasized"
|
data-l10n-id=${ifDefined(noteL10nId)}
|
||||||
data-l10n-id=${ifDefined(noteL10nId)}
|
></span>
|
||||||
></span>
|
`;
|
||||||
`;
|
|
||||||
|
|||||||
@@ -47,24 +47,19 @@ BasicLoginAlert.argTypes = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const VulnerablePasswordAlert = ({ hostname }) =>
|
export const VulnerablePasswordAlert = ({ hostname }) => html`
|
||||||
html`
|
<login-vulnerable-password-alert
|
||||||
<login-vulnerable-password-alert
|
.hostname=${hostname}
|
||||||
.hostname=${hostname}
|
></login-vulnerable-password-alert>
|
||||||
></login-vulnerable-password-alert>
|
`;
|
||||||
`;
|
|
||||||
|
|
||||||
VulnerablePasswordAlert.args = {
|
VulnerablePasswordAlert.args = {
|
||||||
hostname: "https://www.example.com",
|
hostname: "https://www.example.com",
|
||||||
};
|
};
|
||||||
|
|
||||||
export const LoginBreachAlert = ({ date, hostname }) =>
|
export const LoginBreachAlert = ({ date, hostname }) => html`
|
||||||
html`
|
<login-breach-alert .date=${date} .hostname=${hostname}></login-breach-alert>
|
||||||
<login-breach-alert
|
`;
|
||||||
.date=${date}
|
|
||||||
.hostname=${hostname}
|
|
||||||
></login-breach-alert>
|
|
||||||
`;
|
|
||||||
|
|
||||||
LoginBreachAlert.argTypes = {
|
LoginBreachAlert.argTypes = {
|
||||||
date: {
|
date: {
|
||||||
|
|||||||
@@ -15,14 +15,15 @@ import {
|
|||||||
} from "chrome://global/content/vendor/lit.all.mjs";
|
} from "chrome://global/content/vendor/lit.all.mjs";
|
||||||
import { MozLitElement } from "chrome://global/content/lit-utils.mjs";
|
import { MozLitElement } from "chrome://global/content/lit-utils.mjs";
|
||||||
|
|
||||||
export const stylesTemplate = () => html`<link
|
export const stylesTemplate = () =>
|
||||||
rel="stylesheet"
|
html`<link
|
||||||
href="chrome://global/skin/in-content/common.css"
|
rel="stylesheet"
|
||||||
/>
|
href="chrome://global/skin/in-content/common.css"
|
||||||
<link
|
/>
|
||||||
rel="stylesheet"
|
<link
|
||||||
href="chrome://browser/content/aboutlogins/components/login-command-button.css"
|
rel="stylesheet"
|
||||||
/>`;
|
href="chrome://browser/content/aboutlogins/components/login-command-button.css"
|
||||||
|
/>`;
|
||||||
|
|
||||||
export const LoginCommandButton = ({
|
export const LoginCommandButton = ({
|
||||||
onClick,
|
onClick,
|
||||||
@@ -31,16 +32,17 @@ export const LoginCommandButton = ({
|
|||||||
variant,
|
variant,
|
||||||
disabled,
|
disabled,
|
||||||
buttonText,
|
buttonText,
|
||||||
}) => html`<button
|
}) =>
|
||||||
class=${variant}
|
html`<button
|
||||||
data-l10n-id=${ifDefined(l10nId)}
|
class=${variant}
|
||||||
?disabled=${disabled}
|
data-l10n-id=${ifDefined(l10nId)}
|
||||||
@click=${ifDefined(onClick)}
|
?disabled=${disabled}
|
||||||
>
|
@click=${ifDefined(onClick)}
|
||||||
<img src=${ifDefined(icon)} role="presentation" />
|
>
|
||||||
|
<img src=${ifDefined(icon)} role="presentation" />
|
||||||
|
|
||||||
<span data-l10n-id=${ifDefined(buttonText)}></span>
|
<span data-l10n-id=${ifDefined(buttonText)}></span>
|
||||||
</button>`;
|
</button>`;
|
||||||
|
|
||||||
export class CreateLoginButton extends MozLitElement {
|
export class CreateLoginButton extends MozLitElement {
|
||||||
static get properties() {
|
static get properties() {
|
||||||
|
|||||||
@@ -121,14 +121,16 @@ export class LoginListItem extends MozLitElement {
|
|||||||
<span class="title" dir="auto">${this.title}</span>
|
<span class="title" dir="auto">${this.title}</span>
|
||||||
${when(
|
${when(
|
||||||
this.username,
|
this.username,
|
||||||
() => html` <span class="subtitle" dir="auto">
|
() =>
|
||||||
${this.username}
|
html` <span class="subtitle" dir="auto">
|
||||||
</span>`,
|
${this.username}
|
||||||
() => html`<span
|
</span>`,
|
||||||
class="subtitle"
|
() =>
|
||||||
dir="auto"
|
html`<span
|
||||||
data-l10n-id="login-list-item-subtitle-missing-username"
|
class="subtitle"
|
||||||
></span>`
|
dir="auto"
|
||||||
|
data-l10n-id="login-list-item-subtitle-missing-username"
|
||||||
|
></span>`
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div slot="notificationIcon">
|
<div slot="notificationIcon">
|
||||||
|
|||||||
@@ -5,10 +5,11 @@
|
|||||||
import { html, ifDefined } from "chrome://global/content/vendor/lit.all.mjs";
|
import { html, ifDefined } from "chrome://global/content/vendor/lit.all.mjs";
|
||||||
import { MozLitElement } from "chrome://global/content/lit-utils.mjs";
|
import { MozLitElement } from "chrome://global/content/lit-utils.mjs";
|
||||||
|
|
||||||
const stylesTemplate = () => html` <link
|
const stylesTemplate = () =>
|
||||||
rel="stylesheet"
|
html` <link
|
||||||
href="chrome://browser/content/aboutlogins/components/login-message-popup.css"
|
rel="stylesheet"
|
||||||
/>`;
|
href="chrome://browser/content/aboutlogins/components/login-message-popup.css"
|
||||||
|
/>`;
|
||||||
|
|
||||||
export const MessagePopup = ({ l10nid, message, webTitle = "" }) => {
|
export const MessagePopup = ({ l10nid, message, webTitle = "" }) => {
|
||||||
return html` <div class="tooltip-container">
|
return html` <div class="tooltip-container">
|
||||||
|
|||||||
@@ -264,9 +264,8 @@ add_task(async function test_open_import_one_item_from_csv() {
|
|||||||
]);
|
]);
|
||||||
await CsvImportHelper.waitForImportToComplete();
|
await CsvImportHelper.waitForImportToComplete();
|
||||||
|
|
||||||
let summary = await CsvImportHelper.getCsvImportSuccessDialogData(
|
let summary =
|
||||||
browser
|
await CsvImportHelper.getCsvImportSuccessDialogData(browser);
|
||||||
);
|
|
||||||
Assert.equal(summary.added, "1", "It should have one item as added");
|
Assert.equal(summary.added, "1", "It should have one item as added");
|
||||||
Assert.equal(
|
Assert.equal(
|
||||||
summary.l10nFocused,
|
summary.l10nFocused,
|
||||||
@@ -304,9 +303,8 @@ add_task(async function test_open_import_all_four_categories() {
|
|||||||
await CsvImportHelper.clickImportFromCsvMenu(browser, updatedCsvData);
|
await CsvImportHelper.clickImportFromCsvMenu(browser, updatedCsvData);
|
||||||
await CsvImportHelper.waitForImportToComplete();
|
await CsvImportHelper.waitForImportToComplete();
|
||||||
|
|
||||||
let summary = await CsvImportHelper.getCsvImportSuccessDialogData(
|
let summary =
|
||||||
browser
|
await CsvImportHelper.getCsvImportSuccessDialogData(browser);
|
||||||
);
|
|
||||||
Assert.equal(summary.added, "1", "It should have one item as added");
|
Assert.equal(summary.added, "1", "It should have one item as added");
|
||||||
Assert.equal(
|
Assert.equal(
|
||||||
summary.modified,
|
summary.modified,
|
||||||
@@ -380,9 +378,8 @@ add_task(async function test_open_import_from_csv_with_invalid_file() {
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
info("Waiting for the import error dialog");
|
info("Waiting for the import error dialog");
|
||||||
const errorDialog = await CsvImportHelper.getCsvImportErrorDialogData(
|
const errorDialog =
|
||||||
browser
|
await CsvImportHelper.getCsvImportErrorDialogData(browser);
|
||||||
);
|
|
||||||
Assert.equal(errorDialog.hidden, false, "Dialog should not be hidden");
|
Assert.equal(errorDialog.hidden, false, "Dialog should not be hidden");
|
||||||
Assert.equal(
|
Assert.equal(
|
||||||
errorDialog.l10nTitle,
|
errorDialog.l10nTitle,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
- 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/. -->
|
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
|||||||
@@ -43,9 +43,8 @@ describe("AWScreenUtils", () => {
|
|||||||
result: false,
|
result: false,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const result = await AWScreenUtils.evaluateScreenTargeting(
|
const result =
|
||||||
"test expression"
|
await AWScreenUtils.evaluateScreenTargeting("test expression");
|
||||||
);
|
|
||||||
assert.calledOnce(evalStub);
|
assert.calledOnce(evalStub);
|
||||||
assert.equal(result, false);
|
assert.equal(result, false);
|
||||||
});
|
});
|
||||||
@@ -56,9 +55,8 @@ describe("AWScreenUtils", () => {
|
|||||||
result: false,
|
result: false,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const result = await AWScreenUtils.evaluateScreenTargeting(
|
const result =
|
||||||
"test expression"
|
await AWScreenUtils.evaluateScreenTargeting("test expression");
|
||||||
);
|
|
||||||
assert.calledOnce(evalStub);
|
assert.calledOnce(evalStub);
|
||||||
assert.equal(result, true);
|
assert.equal(result, true);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -570,9 +570,8 @@ describe("MultiStageAboutWelcomeProton module", () => {
|
|||||||
};
|
};
|
||||||
it("should not set url for default qrcode svg", async () => {
|
it("should not set url for default qrcode svg", async () => {
|
||||||
sandbox.stub(global.AppConstants, "isChinaRepack").returns(false);
|
sandbox.stub(global.AppConstants, "isChinaRepack").returns(false);
|
||||||
const data = await AboutWelcomeDefaults.prepareContentForReact(
|
const data =
|
||||||
TEST_CONTENT
|
await AboutWelcomeDefaults.prepareContentForReact(TEST_CONTENT);
|
||||||
);
|
|
||||||
assert.propertyVal(
|
assert.propertyVal(
|
||||||
data.screens[0].content.hero_image,
|
data.screens[0].content.hero_image,
|
||||||
"url",
|
"url",
|
||||||
@@ -581,9 +580,8 @@ describe("MultiStageAboutWelcomeProton module", () => {
|
|||||||
});
|
});
|
||||||
it("should set url for cn qrcode svg", async () => {
|
it("should set url for cn qrcode svg", async () => {
|
||||||
sandbox.stub(global.AppConstants, "isChinaRepack").returns(true);
|
sandbox.stub(global.AppConstants, "isChinaRepack").returns(true);
|
||||||
const data = await AboutWelcomeDefaults.prepareContentForReact(
|
const data =
|
||||||
TEST_CONTENT
|
await AboutWelcomeDefaults.prepareContentForReact(TEST_CONTENT);
|
||||||
);
|
|
||||||
assert.propertyVal(
|
assert.propertyVal(
|
||||||
data.screens[0].content.hero_image,
|
data.screens[0].content.hero_image,
|
||||||
"url",
|
"url",
|
||||||
@@ -617,9 +615,8 @@ describe("MultiStageAboutWelcomeProton module", () => {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
const data = await AboutWelcomeDefaults.prepareContentForReact(
|
const data =
|
||||||
TEST_CONTENT
|
await AboutWelcomeDefaults.prepareContentForReact(TEST_CONTENT);
|
||||||
);
|
|
||||||
assert.propertyVal(data, "ua", "test");
|
assert.propertyVal(data, "ua", "test");
|
||||||
assert.propertyVal(
|
assert.propertyVal(
|
||||||
data.screens[0].content.primary_button.action.data,
|
data.screens[0].content.primary_button.action.data,
|
||||||
@@ -644,9 +641,8 @@ describe("MultiStageAboutWelcomeProton module", () => {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
const data = await AboutWelcomeDefaults.prepareContentForReact(
|
const data =
|
||||||
TEST_CONTENT
|
await AboutWelcomeDefaults.prepareContentForReact(TEST_CONTENT);
|
||||||
);
|
|
||||||
assert.propertyVal(data, "ua", "test");
|
assert.propertyVal(data, "ua", "test");
|
||||||
assert.notPropertyVal(
|
assert.notPropertyVal(
|
||||||
data.screens[0].content.primary_button.action.data,
|
data.screens[0].content.primary_button.action.data,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
- 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/. -->
|
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
|||||||
@@ -142,8 +142,8 @@ const CFR_MESSAGES = [
|
|||||||
(${JSON.stringify(
|
(${JSON.stringify(
|
||||||
FACEBOOK_CONTAINER_PARAMS.open_urls
|
FACEBOOK_CONTAINER_PARAMS.open_urls
|
||||||
)} intersect topFrecentSites[.frecency >= ${
|
)} intersect topFrecentSites[.frecency >= ${
|
||||||
FACEBOOK_CONTAINER_PARAMS.min_frecency
|
FACEBOOK_CONTAINER_PARAMS.min_frecency
|
||||||
}]|mapToProperty('host'))|length > 0`,
|
}]|mapToProperty('host'))|length > 0`,
|
||||||
trigger: { id: "openURL", params: FACEBOOK_CONTAINER_PARAMS.open_urls },
|
trigger: { id: "openURL", params: FACEBOOK_CONTAINER_PARAMS.open_urls },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -213,8 +213,8 @@ const CFR_MESSAGES = [
|
|||||||
(${JSON.stringify(
|
(${JSON.stringify(
|
||||||
GOOGLE_TRANSLATE_PARAMS.open_urls
|
GOOGLE_TRANSLATE_PARAMS.open_urls
|
||||||
)} intersect topFrecentSites[.frecency >= ${
|
)} intersect topFrecentSites[.frecency >= ${
|
||||||
GOOGLE_TRANSLATE_PARAMS.min_frecency
|
GOOGLE_TRANSLATE_PARAMS.min_frecency
|
||||||
}]|mapToProperty('host'))|length > 0`,
|
}]|mapToProperty('host'))|length > 0`,
|
||||||
trigger: { id: "openURL", params: GOOGLE_TRANSLATE_PARAMS.open_urls },
|
trigger: { id: "openURL", params: GOOGLE_TRANSLATE_PARAMS.open_urls },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -284,8 +284,8 @@ const CFR_MESSAGES = [
|
|||||||
(${JSON.stringify(
|
(${JSON.stringify(
|
||||||
YOUTUBE_ENHANCE_PARAMS.open_urls
|
YOUTUBE_ENHANCE_PARAMS.open_urls
|
||||||
)} intersect topFrecentSites[.frecency >= ${
|
)} intersect topFrecentSites[.frecency >= ${
|
||||||
YOUTUBE_ENHANCE_PARAMS.min_frecency
|
YOUTUBE_ENHANCE_PARAMS.min_frecency
|
||||||
}]|mapToProperty('host'))|length > 0`,
|
}]|mapToProperty('host'))|length > 0`,
|
||||||
trigger: { id: "openURL", params: YOUTUBE_ENHANCE_PARAMS.open_urls },
|
trigger: { id: "openURL", params: YOUTUBE_ENHANCE_PARAMS.open_urls },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -356,8 +356,8 @@ const CFR_MESSAGES = [
|
|||||||
(${JSON.stringify(
|
(${JSON.stringify(
|
||||||
WIKIPEDIA_CONTEXT_MENU_SEARCH_PARAMS.open_urls
|
WIKIPEDIA_CONTEXT_MENU_SEARCH_PARAMS.open_urls
|
||||||
)} intersect topFrecentSites[.frecency >= ${
|
)} intersect topFrecentSites[.frecency >= ${
|
||||||
WIKIPEDIA_CONTEXT_MENU_SEARCH_PARAMS.min_frecency
|
WIKIPEDIA_CONTEXT_MENU_SEARCH_PARAMS.min_frecency
|
||||||
}]|mapToProperty('host'))|length > 0`,
|
}]|mapToProperty('host'))|length > 0`,
|
||||||
trigger: {
|
trigger: {
|
||||||
id: "openURL",
|
id: "openURL",
|
||||||
params: WIKIPEDIA_CONTEXT_MENU_SEARCH_PARAMS.open_urls,
|
params: WIKIPEDIA_CONTEXT_MENU_SEARCH_PARAMS.open_urls,
|
||||||
@@ -431,8 +431,8 @@ const CFR_MESSAGES = [
|
|||||||
(${JSON.stringify(
|
(${JSON.stringify(
|
||||||
REDDIT_ENHANCEMENT_PARAMS.open_urls
|
REDDIT_ENHANCEMENT_PARAMS.open_urls
|
||||||
)} intersect topFrecentSites[.frecency >= ${
|
)} intersect topFrecentSites[.frecency >= ${
|
||||||
REDDIT_ENHANCEMENT_PARAMS.min_frecency
|
REDDIT_ENHANCEMENT_PARAMS.min_frecency
|
||||||
}]|mapToProperty('host'))|length > 0`,
|
}]|mapToProperty('host'))|length > 0`,
|
||||||
trigger: { id: "openURL", params: REDDIT_ENHANCEMENT_PARAMS.open_urls },
|
trigger: { id: "openURL", params: REDDIT_ENHANCEMENT_PARAMS.open_urls },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -263,9 +263,8 @@ export class FeatureCallout {
|
|||||||
this._removePanelConflictListeners();
|
this._removePanelConflictListeners();
|
||||||
this.doc.querySelector(`[src="${BUNDLE_SRC}"]`)?.remove();
|
this.doc.querySelector(`[src="${BUNDLE_SRC}"]`)?.remove();
|
||||||
if (nextMessage) {
|
if (nextMessage) {
|
||||||
const isMessageUnblocked = await lazy.ASRouter.isUnblockedMessage(
|
const isMessageUnblocked =
|
||||||
nextMessage
|
await lazy.ASRouter.isUnblockedMessage(nextMessage);
|
||||||
);
|
|
||||||
if (!isMessageUnblocked) {
|
if (!isMessageUnblocked) {
|
||||||
this.endTour();
|
this.endTour();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -535,8 +535,8 @@ add_task(async function checkAddonsInfo() {
|
|||||||
"service",
|
"service",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const { addons: asRouterAddons, isFullData } = await ASRouterTargeting
|
const { addons: asRouterAddons, isFullData } =
|
||||||
.Environment.addonsInfo;
|
await ASRouterTargeting.Environment.addonsInfo;
|
||||||
|
|
||||||
ok(
|
ok(
|
||||||
addons.every(({ id }) => asRouterAddons[id]),
|
addons.every(({ id }) => asRouterAddons[id]),
|
||||||
|
|||||||
@@ -1277,18 +1277,16 @@ export class BackupService extends EventTarget {
|
|||||||
await IOUtils.writeJSON(manifestPath, manifest);
|
await IOUtils.writeJSON(manifestPath, manifest);
|
||||||
|
|
||||||
currentStep = STEPS.CREATE_BACKUP_FINALIZE_STAGING;
|
currentStep = STEPS.CREATE_BACKUP_FINALIZE_STAGING;
|
||||||
let renamedStagingPath = await this.#finalizeStagingFolder(
|
let renamedStagingPath =
|
||||||
stagingPath
|
await this.#finalizeStagingFolder(stagingPath);
|
||||||
);
|
|
||||||
lazy.logConsole.log(
|
lazy.logConsole.log(
|
||||||
"Wrote backup to staging directory at ",
|
"Wrote backup to staging directory at ",
|
||||||
renamedStagingPath
|
renamedStagingPath
|
||||||
);
|
);
|
||||||
|
|
||||||
// Record the total size of the backup staging directory
|
// Record the total size of the backup staging directory
|
||||||
let totalSizeKilobytes = await BackupResource.getDirectorySize(
|
let totalSizeKilobytes =
|
||||||
renamedStagingPath
|
await BackupResource.getDirectorySize(renamedStagingPath);
|
||||||
);
|
|
||||||
let totalSizeBytesNearestMebibyte = MeasurementUtils.fuzzByteSize(
|
let totalSizeBytesNearestMebibyte = MeasurementUtils.fuzzByteSize(
|
||||||
totalSizeKilobytes * BYTES_IN_KILOBYTE,
|
totalSizeKilobytes * BYTES_IN_KILOBYTE,
|
||||||
1 * BYTES_IN_MEBIBYTE
|
1 * BYTES_IN_MEBIBYTE
|
||||||
@@ -1330,9 +1328,8 @@ export class BackupService extends EventTarget {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Record the size of the complete single-file archive
|
// Record the size of the complete single-file archive
|
||||||
let archiveSizeKilobytes = await BackupResource.getFileSize(
|
let archiveSizeKilobytes =
|
||||||
archiveTmpPath
|
await BackupResource.getFileSize(archiveTmpPath);
|
||||||
);
|
|
||||||
let archiveSizeBytesNearestMebibyte = MeasurementUtils.fuzzByteSize(
|
let archiveSizeBytesNearestMebibyte = MeasurementUtils.fuzzByteSize(
|
||||||
archiveSizeKilobytes * BYTES_IN_KILOBYTE,
|
archiveSizeKilobytes * BYTES_IN_KILOBYTE,
|
||||||
1 * BYTES_IN_MEBIBYTE
|
1 * BYTES_IN_MEBIBYTE
|
||||||
@@ -2466,9 +2463,8 @@ export class BackupService extends EventTarget {
|
|||||||
// that the backup was encrypted, and the recovery code was the correct
|
// that the backup was encrypted, and the recovery code was the correct
|
||||||
// one to decrypt it. We now generate a new ArchiveEncryptionState with
|
// one to decrypt it. We now generate a new ArchiveEncryptionState with
|
||||||
// that recovery code to write into the recovered profile.
|
// that recovery code to write into the recovered profile.
|
||||||
({ instance: encState } = await lazy.ArchiveEncryptionState.initialize(
|
({ instance: encState } =
|
||||||
recoveryCode
|
await lazy.ArchiveEncryptionState.initialize(recoveryCode));
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const RECOVERY_FOLDER_DEST_PATH = PathUtils.join(
|
const RECOVERY_FOLDER_DEST_PATH = PathUtils.join(
|
||||||
@@ -3058,9 +3054,8 @@ export class BackupService extends EventTarget {
|
|||||||
|
|
||||||
// TODO: Enforce other password rules here, such as ensuring that the
|
// TODO: Enforce other password rules here, such as ensuring that the
|
||||||
// password is not considered common.
|
// password is not considered common.
|
||||||
({ instance: encState } = await lazy.ArchiveEncryptionState.initialize(
|
({ instance: encState } =
|
||||||
password
|
await lazy.ArchiveEncryptionState.initialize(password));
|
||||||
));
|
|
||||||
if (!encState) {
|
if (!encState) {
|
||||||
throw new BackupError(
|
throw new BackupError(
|
||||||
"Failed to construct ArchiveEncryptionState",
|
"Failed to construct ArchiveEncryptionState",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
<!-- 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
|
- 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/. -->
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
|
|||||||
@@ -143,9 +143,8 @@ export class BackupResource {
|
|||||||
|
|
||||||
let size = 0;
|
let size = 0;
|
||||||
for (const childFilePath of children) {
|
for (const childFilePath of children) {
|
||||||
let { size: childSize, type: childType } = await IOUtils.stat(
|
let { size: childSize, type: childType } =
|
||||||
childFilePath
|
await IOUtils.stat(childFilePath);
|
||||||
);
|
|
||||||
|
|
||||||
if (shouldExclude(childFilePath, childType, directoryPath)) {
|
if (shouldExclude(childFilePath, childType, directoryPath)) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -176,9 +176,8 @@ export class PreferencesBackupResource extends BackupResource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const chromeDirectoryPath = PathUtils.join(profilePath, "chrome");
|
const chromeDirectoryPath = PathUtils.join(profilePath, "chrome");
|
||||||
let chromeDirectorySize = await BackupResource.getDirectorySize(
|
let chromeDirectorySize =
|
||||||
chromeDirectoryPath
|
await BackupResource.getDirectorySize(chromeDirectoryPath);
|
||||||
);
|
|
||||||
if (Number.isInteger(chromeDirectorySize)) {
|
if (Number.isInteger(chromeDirectorySize)) {
|
||||||
fullSize += chromeDirectorySize;
|
fullSize += chromeDirectorySize;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,9 +35,8 @@ add_setup(async () => {
|
|||||||
* of an ArchiveEncryptionState.
|
* of an ArchiveEncryptionState.
|
||||||
*/
|
*/
|
||||||
add_task(async function test_ArchiveEncryptor_initializer() {
|
add_task(async function test_ArchiveEncryptor_initializer() {
|
||||||
let { instance: encState } = await ArchiveEncryptionState.initialize(
|
let { instance: encState } =
|
||||||
TEST_RECOVERY_CODE
|
await ArchiveEncryptionState.initialize(TEST_RECOVERY_CODE);
|
||||||
);
|
|
||||||
let encryptor = await ArchiveEncryptor.initialize(
|
let encryptor = await ArchiveEncryptor.initialize(
|
||||||
encState.publicKey,
|
encState.publicKey,
|
||||||
encState.backupAuthKey
|
encState.backupAuthKey
|
||||||
@@ -49,9 +48,8 @@ add_task(async function test_ArchiveEncryptor_initializer() {
|
|||||||
* Tests that we can encrypt a single chunk of bytes.
|
* Tests that we can encrypt a single chunk of bytes.
|
||||||
*/
|
*/
|
||||||
add_task(async function test_ArchiveEncryption_single_chunk() {
|
add_task(async function test_ArchiveEncryption_single_chunk() {
|
||||||
let { instance: encState } = await ArchiveEncryptionState.initialize(
|
let { instance: encState } =
|
||||||
TEST_RECOVERY_CODE
|
await ArchiveEncryptionState.initialize(TEST_RECOVERY_CODE);
|
||||||
);
|
|
||||||
let encryptor = await ArchiveEncryptor.initialize(
|
let encryptor = await ArchiveEncryptor.initialize(
|
||||||
encState.publicKey,
|
encState.publicKey,
|
||||||
encState.backupAuthKey
|
encState.backupAuthKey
|
||||||
@@ -111,9 +109,8 @@ add_task(async function test_ArchiveEncryption_single_chunk() {
|
|||||||
* Tests that we can encrypt an unevenly sized set of chunks.
|
* Tests that we can encrypt an unevenly sized set of chunks.
|
||||||
*/
|
*/
|
||||||
add_task(async function test_ArchiveEncryption_uneven_chunks() {
|
add_task(async function test_ArchiveEncryption_uneven_chunks() {
|
||||||
let { instance: encState } = await ArchiveEncryptionState.initialize(
|
let { instance: encState } =
|
||||||
TEST_RECOVERY_CODE
|
await ArchiveEncryptionState.initialize(TEST_RECOVERY_CODE);
|
||||||
);
|
|
||||||
let encryptor = await ArchiveEncryptor.initialize(
|
let encryptor = await ArchiveEncryptor.initialize(
|
||||||
encState.publicKey,
|
encState.publicKey,
|
||||||
encState.backupAuthKey
|
encState.backupAuthKey
|
||||||
@@ -209,9 +206,8 @@ add_task(async function test_ArchiveEncryption_uneven_chunks() {
|
|||||||
* Tests that we can encrypt an even sized set of chunks.
|
* Tests that we can encrypt an even sized set of chunks.
|
||||||
*/
|
*/
|
||||||
add_task(async function test_ArchiveEncryption_even_chunks() {
|
add_task(async function test_ArchiveEncryption_even_chunks() {
|
||||||
let { instance: encState } = await ArchiveEncryptionState.initialize(
|
let { instance: encState } =
|
||||||
TEST_RECOVERY_CODE
|
await ArchiveEncryptionState.initialize(TEST_RECOVERY_CODE);
|
||||||
);
|
|
||||||
let encryptor = await ArchiveEncryptor.initialize(
|
let encryptor = await ArchiveEncryptor.initialize(
|
||||||
encState.publicKey,
|
encState.publicKey,
|
||||||
encState.backupAuthKey
|
encState.backupAuthKey
|
||||||
@@ -300,9 +296,8 @@ add_task(async function test_ArchiveEncryption_even_chunks() {
|
|||||||
* Tests that we cannot decrypt with the wrong recovery code.
|
* Tests that we cannot decrypt with the wrong recovery code.
|
||||||
*/
|
*/
|
||||||
add_task(async function test_ArchiveEncryption_wrong_recoveryCode() {
|
add_task(async function test_ArchiveEncryption_wrong_recoveryCode() {
|
||||||
let { instance: encState } = await ArchiveEncryptionState.initialize(
|
let { instance: encState } =
|
||||||
TEST_RECOVERY_CODE
|
await ArchiveEncryptionState.initialize(TEST_RECOVERY_CODE);
|
||||||
);
|
|
||||||
let encryptor = await ArchiveEncryptor.initialize(
|
let encryptor = await ArchiveEncryptor.initialize(
|
||||||
encState.publicKey,
|
encState.publicKey,
|
||||||
encState.backupAuthKey
|
encState.backupAuthKey
|
||||||
|
|||||||
@@ -31,9 +31,8 @@ add_task(async function test_ArchiveEncryptionState_enable() {
|
|||||||
*/
|
*/
|
||||||
add_task(
|
add_task(
|
||||||
async function test_ArchiveEncryptionState_serialization_deserialization() {
|
async function test_ArchiveEncryptionState_serialization_deserialization() {
|
||||||
let { instance: encState } = await ArchiveEncryptionState.initialize(
|
let { instance: encState } =
|
||||||
TEST_RECOVERY_CODE
|
await ArchiveEncryptionState.initialize(TEST_RECOVERY_CODE);
|
||||||
);
|
|
||||||
let serialization = await encState.serialize();
|
let serialization = await encState.serialize();
|
||||||
|
|
||||||
// We'll pretend to write this serialization to disk by stringifying it,
|
// We'll pretend to write this serialization to disk by stringifying it,
|
||||||
@@ -46,9 +45,8 @@ add_task(
|
|||||||
"The ArchiveEncryptionState version was included in the serialization."
|
"The ArchiveEncryptionState version was included in the serialization."
|
||||||
);
|
);
|
||||||
|
|
||||||
let { instance: recoveredState } = await ArchiveEncryptionState.initialize(
|
let { instance: recoveredState } =
|
||||||
serialization
|
await ArchiveEncryptionState.initialize(serialization);
|
||||||
);
|
|
||||||
|
|
||||||
Assert.deepEqual(
|
Assert.deepEqual(
|
||||||
encState.publicKey,
|
encState.publicKey,
|
||||||
@@ -75,9 +73,8 @@ add_task(
|
|||||||
* a serialized state from a newer version of ArchiveEncryptionState.
|
* a serialized state from a newer version of ArchiveEncryptionState.
|
||||||
*/
|
*/
|
||||||
add_task(async function test_ArchiveEncryptionState_deserialize_newer() {
|
add_task(async function test_ArchiveEncryptionState_deserialize_newer() {
|
||||||
let { instance: encState } = await ArchiveEncryptionState.initialize(
|
let { instance: encState } =
|
||||||
TEST_RECOVERY_CODE
|
await ArchiveEncryptionState.initialize(TEST_RECOVERY_CODE);
|
||||||
);
|
|
||||||
let serialization = await encState.serialize();
|
let serialization = await encState.serialize();
|
||||||
|
|
||||||
// We'll pretend to write this serialization to disk by stringifying it,
|
// We'll pretend to write this serialization to disk by stringifying it,
|
||||||
|
|||||||
@@ -127,9 +127,8 @@ add_task(async function test_createArchive_encrypted() {
|
|||||||
const TEST_RECOVERY_CODE = "This is some recovery code.";
|
const TEST_RECOVERY_CODE = "This is some recovery code.";
|
||||||
|
|
||||||
let bs = new BackupService();
|
let bs = new BackupService();
|
||||||
let { instance: encState } = await ArchiveEncryptionState.initialize(
|
let { instance: encState } =
|
||||||
TEST_RECOVERY_CODE
|
await ArchiveEncryptionState.initialize(TEST_RECOVERY_CODE);
|
||||||
);
|
|
||||||
|
|
||||||
const FAKE_ARCHIVE_PATH = PathUtils.join(
|
const FAKE_ARCHIVE_PATH = PathUtils.join(
|
||||||
testProfilePath,
|
testProfilePath,
|
||||||
@@ -245,9 +244,8 @@ add_task(async function test_createArchive_encrypted_truncated() {
|
|||||||
const TEST_RECOVERY_CODE = "This is some recovery code.";
|
const TEST_RECOVERY_CODE = "This is some recovery code.";
|
||||||
|
|
||||||
let bs = new BackupService();
|
let bs = new BackupService();
|
||||||
let { instance: encState } = await ArchiveEncryptionState.initialize(
|
let { instance: encState } =
|
||||||
TEST_RECOVERY_CODE
|
await ArchiveEncryptionState.initialize(TEST_RECOVERY_CODE);
|
||||||
);
|
|
||||||
|
|
||||||
const FAKE_ARCHIVE_PATH = PathUtils.join(
|
const FAKE_ARCHIVE_PATH = PathUtils.join(
|
||||||
testProfilePath,
|
testProfilePath,
|
||||||
@@ -327,9 +325,8 @@ add_task(async function test_createArchive_early_binary_stream_close() {
|
|||||||
const TEST_RECOVERY_CODE = "This is some recovery code.";
|
const TEST_RECOVERY_CODE = "This is some recovery code.";
|
||||||
|
|
||||||
let bs = new BackupService();
|
let bs = new BackupService();
|
||||||
let { instance: encState } = await ArchiveEncryptionState.initialize(
|
let { instance: encState } =
|
||||||
TEST_RECOVERY_CODE
|
await ArchiveEncryptionState.initialize(TEST_RECOVERY_CODE);
|
||||||
);
|
|
||||||
|
|
||||||
const FAKE_ARCHIVE_PATH = PathUtils.join(
|
const FAKE_ARCHIVE_PATH = PathUtils.join(
|
||||||
testProfilePath,
|
testProfilePath,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
# 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/.
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
-->
|
-->
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|||||||
@@ -66,9 +66,8 @@ async function test_background_update_pref(expectedEnabled, expectedLocked) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
add_task(async function test_background_app_update_policy() {
|
add_task(async function test_background_app_update_policy() {
|
||||||
const origBackgroundUpdateVal = await UpdateUtils.readUpdateConfigSetting(
|
const origBackgroundUpdateVal =
|
||||||
PREF_NAME
|
await UpdateUtils.readUpdateConfigSetting(PREF_NAME);
|
||||||
);
|
|
||||||
registerCleanupFunction(async () => {
|
registerCleanupFunction(async () => {
|
||||||
await UpdateUtils.writeUpdateConfigSetting(
|
await UpdateUtils.writeUpdateConfigSetting(
|
||||||
PREF_NAME,
|
PREF_NAME,
|
||||||
|
|||||||
@@ -49,9 +49,8 @@ async function test_cookie_settings({
|
|||||||
uri: firstPartyURI,
|
uri: firstPartyURI,
|
||||||
loadUsingSystemPrincipal: true,
|
loadUsingSystemPrincipal: true,
|
||||||
});
|
});
|
||||||
channel.QueryInterface(
|
channel.QueryInterface(Ci.nsIHttpChannelInternal).forceAllowThirdPartyCookie =
|
||||||
Ci.nsIHttpChannelInternal
|
true;
|
||||||
).forceAllowThirdPartyCookie = true;
|
|
||||||
Services.cookies.removeAll();
|
Services.cookies.removeAll();
|
||||||
Services.cookies.setCookieStringFromHttp(
|
Services.cookies.setCookieStringFromHttp(
|
||||||
firstPartyURI,
|
firstPartyURI,
|
||||||
|
|||||||
@@ -136,9 +136,8 @@ async function handleHomepageUrl(extension, homepageUrl) {
|
|||||||
// eslint-disable-next-line mozilla/balanced-listeners
|
// eslint-disable-next-line mozilla/balanced-listeners
|
||||||
extension.on("add-permissions", async (ignoreEvent, permissions) => {
|
extension.on("add-permissions", async (ignoreEvent, permissions) => {
|
||||||
if (permissions.permissions.includes("internal:privateBrowsingAllowed")) {
|
if (permissions.permissions.includes("internal:privateBrowsingAllowed")) {
|
||||||
let item = await ExtensionPreferencesManager.getSetting(
|
let item =
|
||||||
"homepage_override"
|
await ExtensionPreferencesManager.getSetting("homepage_override");
|
||||||
);
|
|
||||||
if (item && item.id == extension.id) {
|
if (item && item.id == extension.id) {
|
||||||
Services.prefs.setBoolPref(HOMEPAGE_PRIVATE_ALLOWED, true);
|
Services.prefs.setBoolPref(HOMEPAGE_PRIVATE_ALLOWED, true);
|
||||||
}
|
}
|
||||||
@@ -147,9 +146,8 @@ async function handleHomepageUrl(extension, homepageUrl) {
|
|||||||
// eslint-disable-next-line mozilla/balanced-listeners
|
// eslint-disable-next-line mozilla/balanced-listeners
|
||||||
extension.on("remove-permissions", async (ignoreEvent, permissions) => {
|
extension.on("remove-permissions", async (ignoreEvent, permissions) => {
|
||||||
if (permissions.permissions.includes("internal:privateBrowsingAllowed")) {
|
if (permissions.permissions.includes("internal:privateBrowsingAllowed")) {
|
||||||
let item = await ExtensionPreferencesManager.getSetting(
|
let item =
|
||||||
"homepage_override"
|
await ExtensionPreferencesManager.getSetting("homepage_override");
|
||||||
);
|
|
||||||
if (item && item.id == extension.id) {
|
if (item && item.id == extension.id) {
|
||||||
Services.prefs.setBoolPref(HOMEPAGE_PRIVATE_ALLOWED, false);
|
Services.prefs.setBoolPref(HOMEPAGE_PRIVATE_ALLOWED, false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,9 +29,8 @@ async function runTests(options) {
|
|||||||
"expected value from getBadge"
|
"expected value from getBadge"
|
||||||
);
|
);
|
||||||
|
|
||||||
let badgeBackgroundColor = await browser[action].getBadgeBackgroundColor(
|
let badgeBackgroundColor =
|
||||||
details
|
await browser[action].getBadgeBackgroundColor(details);
|
||||||
);
|
|
||||||
browser.test.assertEq(
|
browser.test.assertEq(
|
||||||
String(expecting.badgeBackgroundColor),
|
String(expecting.badgeBackgroundColor),
|
||||||
String(badgeBackgroundColor),
|
String(badgeBackgroundColor),
|
||||||
|
|||||||
@@ -139,9 +139,8 @@ add_task(async function test_devtools_inspectedWindow_tabId() {
|
|||||||
|
|
||||||
await extension.startup();
|
await extension.startup();
|
||||||
|
|
||||||
let backgroundPageCurrentTabId = await extension.awaitMessage(
|
let backgroundPageCurrentTabId =
|
||||||
"current-tab-id"
|
await extension.awaitMessage("current-tab-id");
|
||||||
);
|
|
||||||
|
|
||||||
await openToolboxForTab(tab);
|
await openToolboxForTab(tab);
|
||||||
|
|
||||||
|
|||||||
@@ -72,18 +72,22 @@ add_task(async function test_devtools_panels_elements_sidebar() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
async function devtools_page() {
|
async function devtools_page() {
|
||||||
const sidebar1 = await browser.devtools.panels.elements.createSidebarPane(
|
const sidebar1 =
|
||||||
"Test Sidebar 1"
|
await browser.devtools.panels.elements.createSidebarPane(
|
||||||
);
|
"Test Sidebar 1"
|
||||||
const sidebar2 = await browser.devtools.panels.elements.createSidebarPane(
|
);
|
||||||
"Test Sidebar 2"
|
const sidebar2 =
|
||||||
);
|
await browser.devtools.panels.elements.createSidebarPane(
|
||||||
const sidebar3 = await browser.devtools.panels.elements.createSidebarPane(
|
"Test Sidebar 2"
|
||||||
"Test Sidebar 3"
|
);
|
||||||
);
|
const sidebar3 =
|
||||||
const sidebar4 = await browser.devtools.panels.elements.createSidebarPane(
|
await browser.devtools.panels.elements.createSidebarPane(
|
||||||
"Test Sidebar 4"
|
"Test Sidebar 3"
|
||||||
);
|
);
|
||||||
|
const sidebar4 =
|
||||||
|
await browser.devtools.panels.elements.createSidebarPane(
|
||||||
|
"Test Sidebar 4"
|
||||||
|
);
|
||||||
|
|
||||||
const onShownListener = (event, sidebarInstance) => {
|
const onShownListener = (event, sidebarInstance) => {
|
||||||
browser.test.sendMessage(`devtools_sidebar_${event}`, sidebarInstance);
|
browser.test.sendMessage(`devtools_sidebar_${event}`, sidebarInstance);
|
||||||
|
|||||||
@@ -38,20 +38,18 @@ add_task(async function testFind() {
|
|||||||
async function background() {
|
async function background() {
|
||||||
function awaitLoad(tabId, url) {
|
function awaitLoad(tabId, url) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
browser.tabs.onUpdated.addListener(function listener(
|
browser.tabs.onUpdated.addListener(
|
||||||
tabId_,
|
function listener(tabId_, changed, tab) {
|
||||||
changed,
|
if (
|
||||||
tab
|
tabId == tabId_ &&
|
||||||
) {
|
changed.status == "complete" &&
|
||||||
if (
|
tab.url == url
|
||||||
tabId == tabId_ &&
|
) {
|
||||||
changed.status == "complete" &&
|
browser.tabs.onUpdated.removeListener(listener);
|
||||||
tab.url == url
|
resolve();
|
||||||
) {
|
}
|
||||||
browser.tabs.onUpdated.removeListener(listener);
|
|
||||||
resolve();
|
|
||||||
}
|
}
|
||||||
});
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -297,20 +295,18 @@ add_task(async function testRemoveHighlighting() {
|
|||||||
async function background() {
|
async function background() {
|
||||||
function awaitLoad(tabId, url) {
|
function awaitLoad(tabId, url) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
browser.tabs.onUpdated.addListener(function listener(
|
browser.tabs.onUpdated.addListener(
|
||||||
tabId_,
|
function listener(tabId_, changed, tab) {
|
||||||
changed,
|
if (
|
||||||
tab
|
tabId == tabId_ &&
|
||||||
) {
|
changed.status == "complete" &&
|
||||||
if (
|
tab.url == url
|
||||||
tabId == tabId_ &&
|
) {
|
||||||
changed.status == "complete" &&
|
browser.tabs.onUpdated.removeListener(listener);
|
||||||
tab.url == url
|
resolve();
|
||||||
) {
|
}
|
||||||
browser.tabs.onUpdated.removeListener(listener);
|
|
||||||
resolve();
|
|
||||||
}
|
}
|
||||||
});
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,16 +71,14 @@ add_task(async function testIncognitoPopup() {
|
|||||||
const testPrivateWindow = async () => {
|
const testPrivateWindow = async () => {
|
||||||
const URL = "https://example.com/incognito";
|
const URL = "https://example.com/incognito";
|
||||||
const windowReady = new Promise(resolve => {
|
const windowReady = new Promise(resolve => {
|
||||||
browser.tabs.onUpdated.addListener(function listener(
|
browser.tabs.onUpdated.addListener(
|
||||||
tabId,
|
function listener(tabId, changed, tab) {
|
||||||
changed,
|
if (changed.status == "complete" && tab.url == URL) {
|
||||||
tab
|
browser.tabs.onUpdated.removeListener(listener);
|
||||||
) {
|
resolve();
|
||||||
if (changed.status == "complete" && tab.url == URL) {
|
}
|
||||||
browser.tabs.onUpdated.removeListener(listener);
|
|
||||||
resolve();
|
|
||||||
}
|
}
|
||||||
});
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
const window = await browser.windows.create({
|
const window = await browser.windows.create({
|
||||||
|
|||||||
@@ -101,9 +101,8 @@ add_task(async function test_tab_options_popups() {
|
|||||||
|
|
||||||
const optionsBrowser = getInlineOptionsBrowser(gBrowser.selectedBrowser);
|
const optionsBrowser = getInlineOptionsBrowser(gBrowser.selectedBrowser);
|
||||||
|
|
||||||
const contentAreaContextMenu = await openContextMenuInOptionsPage(
|
const contentAreaContextMenu =
|
||||||
optionsBrowser
|
await openContextMenuInOptionsPage(optionsBrowser);
|
||||||
);
|
|
||||||
|
|
||||||
let contextMenuItemIds = [
|
let contextMenuItemIds = [
|
||||||
"context-openlinkintab",
|
"context-openlinkintab",
|
||||||
@@ -220,9 +219,8 @@ add_task(async function overrideContext_in_options_page() {
|
|||||||
await extension.awaitMessage("options-page:loaded");
|
await extension.awaitMessage("options-page:loaded");
|
||||||
|
|
||||||
const optionsBrowser = getInlineOptionsBrowser(gBrowser.selectedBrowser);
|
const optionsBrowser = getInlineOptionsBrowser(gBrowser.selectedBrowser);
|
||||||
const contentAreaContextMenu = await openContextMenuInOptionsPage(
|
const contentAreaContextMenu =
|
||||||
optionsBrowser
|
await openContextMenuInOptionsPage(optionsBrowser);
|
||||||
);
|
|
||||||
|
|
||||||
await extension.awaitMessage("contextmenu-overridden");
|
await extension.awaitMessage("contextmenu-overridden");
|
||||||
|
|
||||||
|
|||||||
@@ -168,9 +168,8 @@ add_task(async function test_search_default_engine() {
|
|||||||
let tabId = await extensionWithObserver.awaitMessage("ready");
|
let tabId = await extensionWithObserver.awaitMessage("ready");
|
||||||
|
|
||||||
extension.sendMessage("search", tabId);
|
extension.sendMessage("search", tabId);
|
||||||
let requestDetails = await extensionWithObserver.awaitMessage(
|
let requestDetails =
|
||||||
"detectedSearch"
|
await extensionWithObserver.awaitMessage("detectedSearch");
|
||||||
);
|
|
||||||
await extension.unload();
|
await extension.unload();
|
||||||
await extensionWithObserver.unload();
|
await extensionWithObserver.unload();
|
||||||
|
|
||||||
|
|||||||
@@ -51,9 +51,8 @@ add_task(async function test_sessions_get_recently_closed() {
|
|||||||
|
|
||||||
await extension.startup();
|
await extension.startup();
|
||||||
|
|
||||||
let { recentlyClosed, currentWindowId } = await extension.awaitMessage(
|
let { recentlyClosed, currentWindowId } =
|
||||||
"initialData"
|
await extension.awaitMessage("initialData");
|
||||||
);
|
|
||||||
recordInitialTimestamps(recentlyClosed.map(item => item.lastModified));
|
recordInitialTimestamps(recentlyClosed.map(item => item.lastModified));
|
||||||
|
|
||||||
await openAndCloseWindow();
|
await openAndCloseWindow();
|
||||||
|
|||||||
@@ -4,19 +4,17 @@
|
|||||||
|
|
||||||
add_task(async function test_sidebar_click_isAppTab_behavior() {
|
add_task(async function test_sidebar_click_isAppTab_behavior() {
|
||||||
function sidebarScript() {
|
function sidebarScript() {
|
||||||
browser.tabs.onUpdated.addListener(function onUpdated(
|
browser.tabs.onUpdated.addListener(
|
||||||
tabId,
|
function onUpdated(tabId, changeInfo, tab) {
|
||||||
changeInfo,
|
if (
|
||||||
tab
|
changeInfo.status == "complete" &&
|
||||||
) {
|
tab.url == "http://mochi.test:8888/"
|
||||||
if (
|
) {
|
||||||
changeInfo.status == "complete" &&
|
browser.tabs.remove(tab.id);
|
||||||
tab.url == "http://mochi.test:8888/"
|
browser.test.notifyPass("sidebar-click");
|
||||||
) {
|
}
|
||||||
browser.tabs.remove(tab.id);
|
|
||||||
browser.test.notifyPass("sidebar-click");
|
|
||||||
}
|
}
|
||||||
});
|
);
|
||||||
window.addEventListener(
|
window.addEventListener(
|
||||||
"load",
|
"load",
|
||||||
() => {
|
() => {
|
||||||
|
|||||||
@@ -97,16 +97,17 @@ add_task(async function default_url() {
|
|||||||
background() {
|
background() {
|
||||||
function promiseNonBlankTab() {
|
function promiseNonBlankTab() {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
browser.tabs.onUpdated.addListener(function listener(
|
browser.tabs.onUpdated.addListener(
|
||||||
tabId,
|
function listener(tabId, changeInfo, tab) {
|
||||||
changeInfo,
|
if (
|
||||||
tab
|
changeInfo.status === "complete" &&
|
||||||
) {
|
tab.url !== "about:blank"
|
||||||
if (changeInfo.status === "complete" && tab.url !== "about:blank") {
|
) {
|
||||||
browser.tabs.onUpdated.removeListener(listener);
|
browser.tabs.onUpdated.removeListener(listener);
|
||||||
resolve(tab);
|
resolve(tab);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,15 +27,17 @@ add_task(async function () {
|
|||||||
}
|
}
|
||||||
resetLoad();
|
resetLoad();
|
||||||
|
|
||||||
browser.tabs.onUpdated.addListener(function listener(
|
browser.tabs.onUpdated.addListener(
|
||||||
tabId_,
|
function listener(tabId_, changed, tab) {
|
||||||
changed,
|
if (
|
||||||
tab
|
tabId == tabId_ &&
|
||||||
) {
|
changed.status == "complete" &&
|
||||||
if (tabId == tabId_ && changed.status == "complete" && tab.url == URL) {
|
tab.url == URL
|
||||||
resolveLoad();
|
) {
|
||||||
|
resolveLoad();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let tab = await browser.tabs.create({ url: URL });
|
let tab = await browser.tabs.create({ url: URL });
|
||||||
|
|||||||
@@ -64,9 +64,8 @@ async function runTest(stopLoadFunc) {
|
|||||||
stopLoadFunc(slowTab);
|
stopLoadFunc(slowTab);
|
||||||
|
|
||||||
// Retrieve the requestId from onBeforeRequest
|
// Retrieve the requestId from onBeforeRequest
|
||||||
let requestIdOnBeforeRequest = await extension.awaitMessage(
|
let requestIdOnBeforeRequest =
|
||||||
"onBeforeRequest"
|
await extension.awaitMessage("onBeforeRequest");
|
||||||
);
|
|
||||||
|
|
||||||
// Now verify that we got the correct event and request id
|
// Now verify that we got the correct event and request id
|
||||||
let doneMessage = await extension.awaitMessage("done");
|
let doneMessage = await extension.awaitMessage("done");
|
||||||
|
|||||||
@@ -46,21 +46,21 @@ add_task(async function testWindowCreateFocused() {
|
|||||||
async background() {
|
async background() {
|
||||||
async function doWaitForWindow(createOpts, resolve) {
|
async function doWaitForWindow(createOpts, resolve) {
|
||||||
let created;
|
let created;
|
||||||
browser.windows.onFocusChanged.addListener(async function listener(
|
browser.windows.onFocusChanged.addListener(
|
||||||
wid
|
async function listener(wid) {
|
||||||
) {
|
if (wid == browser.windows.WINDOW_ID_NONE) {
|
||||||
if (wid == browser.windows.WINDOW_ID_NONE) {
|
return;
|
||||||
return;
|
}
|
||||||
|
let win = await created;
|
||||||
|
if (win.id !== wid) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
browser.windows.onFocusChanged.removeListener(listener);
|
||||||
|
// update the window object
|
||||||
|
let window = await browser.windows.get(wid);
|
||||||
|
resolve(window);
|
||||||
}
|
}
|
||||||
let win = await created;
|
);
|
||||||
if (win.id !== wid) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
browser.windows.onFocusChanged.removeListener(listener);
|
|
||||||
// update the window object
|
|
||||||
let window = await browser.windows.get(wid);
|
|
||||||
resolve(window);
|
|
||||||
});
|
|
||||||
created = browser.windows.create(createOpts);
|
created = browser.windows.create(createOpts);
|
||||||
}
|
}
|
||||||
async function awaitNewFocusedWindow(createOpts) {
|
async function awaitNewFocusedWindow(createOpts) {
|
||||||
|
|||||||
@@ -32,15 +32,14 @@ add_task(async function testWindowCreate() {
|
|||||||
|
|
||||||
let promiseTabUpdated = expected => {
|
let promiseTabUpdated = expected => {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
browser.tabs.onUpdated.addListener(function listener(
|
browser.tabs.onUpdated.addListener(
|
||||||
tabId,
|
function listener(tabId, changeInfo) {
|
||||||
changeInfo
|
if (changeInfo.url === expected) {
|
||||||
) {
|
browser.tabs.onUpdated.removeListener(listener);
|
||||||
if (changeInfo.url === expected) {
|
resolve();
|
||||||
browser.tabs.onUpdated.removeListener(listener);
|
}
|
||||||
resolve();
|
|
||||||
}
|
}
|
||||||
});
|
);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ add_task(async function test_window_incognito() {
|
|||||||
background() {
|
background() {
|
||||||
let lastFocusedWindowId = null;
|
let lastFocusedWindowId = null;
|
||||||
// Catch focus change events to power the test below.
|
// Catch focus change events to power the test below.
|
||||||
browser.windows.onFocusChanged.addListener(function listener(
|
browser.windows.onFocusChanged.addListener(
|
||||||
eventWindowId
|
function listener(eventWindowId) {
|
||||||
) {
|
lastFocusedWindowId = eventWindowId;
|
||||||
lastFocusedWindowId = eventWindowId;
|
browser.windows.onFocusChanged.removeListener(listener);
|
||||||
browser.windows.onFocusChanged.removeListener(listener);
|
}
|
||||||
});
|
);
|
||||||
|
|
||||||
browser.test.onMessage.addListener(async pbw => {
|
browser.test.onMessage.addListener(async pbw => {
|
||||||
browser.test.assertEq(
|
browser.test.assertEq(
|
||||||
|
|||||||
@@ -8,22 +8,22 @@ add_task(async function testWindowRemove() {
|
|||||||
async function closeWindow(id) {
|
async function closeWindow(id) {
|
||||||
let window = await browser.windows.get(id);
|
let window = await browser.windows.get(id);
|
||||||
return new Promise(function (resolve) {
|
return new Promise(function (resolve) {
|
||||||
browser.windows.onRemoved.addListener(async function listener(
|
browser.windows.onRemoved.addListener(
|
||||||
windowId
|
async function listener(windowId) {
|
||||||
) {
|
browser.windows.onRemoved.removeListener(listener);
|
||||||
browser.windows.onRemoved.removeListener(listener);
|
await browser.test.assertEq(
|
||||||
await browser.test.assertEq(
|
windowId,
|
||||||
windowId,
|
window.id,
|
||||||
window.id,
|
"The right window was closed"
|
||||||
"The right window was closed"
|
);
|
||||||
);
|
await browser.test.assertRejects(
|
||||||
await browser.test.assertRejects(
|
browser.windows.get(windowId),
|
||||||
browser.windows.get(windowId),
|
new RegExp(`Invalid window ID: ${windowId}`),
|
||||||
new RegExp(`Invalid window ID: ${windowId}`),
|
"The window was really closed."
|
||||||
"The window was really closed."
|
);
|
||||||
);
|
resolve();
|
||||||
resolve();
|
}
|
||||||
});
|
);
|
||||||
browser.windows.remove(id);
|
browser.windows.remove(id);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -201,9 +201,8 @@ add_task(async function test_delete() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
extension.sendMessage("delete-all");
|
extension.sendMessage("delete-all");
|
||||||
[historyClearedCount, removedUrls] = await extension.awaitMessage(
|
[historyClearedCount, removedUrls] =
|
||||||
"history-cleared"
|
await extension.awaitMessage("history-cleared");
|
||||||
);
|
|
||||||
equal(
|
equal(
|
||||||
historyClearedCount,
|
historyClearedCount,
|
||||||
2,
|
2,
|
||||||
|
|||||||
@@ -132,68 +132,70 @@ class CardContainer extends MozLitElement {
|
|||||||
/>
|
/>
|
||||||
${when(
|
${when(
|
||||||
this.toggleDisabled,
|
this.toggleDisabled,
|
||||||
() => html`<div
|
() =>
|
||||||
class=${classMap({
|
html`<div
|
||||||
"card-container": true,
|
class=${classMap({
|
||||||
inner: this.isInnerCard,
|
"card-container": true,
|
||||||
"empty-state": this.isEmptyState && !this.isInnerCard,
|
inner: this.isInnerCard,
|
||||||
})}
|
"empty-state": this.isEmptyState && !this.isInnerCard,
|
||||||
>
|
})}
|
||||||
<span
|
|
||||||
id="header"
|
|
||||||
class="card-container-header"
|
|
||||||
?hidden=${ifDefined(this.hideHeader)}
|
|
||||||
toggleDisabled
|
|
||||||
?withViewAll=${this.showViewAll}
|
|
||||||
>
|
|
||||||
<slot name="header"></slot>
|
|
||||||
<slot name="secondary-header"></slot>
|
|
||||||
</span>
|
|
||||||
<a
|
|
||||||
href="about:firefoxview#${this.shortPageName}"
|
|
||||||
@click=${this.viewAllClicked}
|
|
||||||
class="view-all-link"
|
|
||||||
data-l10n-id="firefoxview-view-all-link"
|
|
||||||
?hidden=${!this.showViewAll}
|
|
||||||
></a>
|
|
||||||
<slot name="main"></slot>
|
|
||||||
<slot name="footer" class="card-container-footer"></slot>
|
|
||||||
</div>`,
|
|
||||||
() => html`<details
|
|
||||||
class=${classMap({
|
|
||||||
"card-container": true,
|
|
||||||
inner: this.isInnerCard,
|
|
||||||
"empty-state": this.isEmptyState && !this.isInnerCard,
|
|
||||||
})}
|
|
||||||
?open=${this.isExpanded}
|
|
||||||
?isOpenTabsView=${this.removeBlockEndMargin}
|
|
||||||
@toggle=${this.onToggleContainer}
|
|
||||||
role=${this.isInnerCard ? "presentation" : "group"}
|
|
||||||
>
|
|
||||||
<summary
|
|
||||||
class="card-container-header"
|
|
||||||
?hidden=${ifDefined(this.hideHeader)}
|
|
||||||
?withViewAll=${this.showViewAll}
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="icon chevron-icon"
|
id="header"
|
||||||
role="presentation"
|
class="card-container-header"
|
||||||
data-l10n-id="firefoxview-collapse-button-${this.isExpanded
|
?hidden=${ifDefined(this.hideHeader)}
|
||||||
? "hide"
|
toggleDisabled
|
||||||
: "show"}"
|
?withViewAll=${this.showViewAll}
|
||||||
></span>
|
>
|
||||||
<slot name="header"></slot>
|
<slot name="header"></slot>
|
||||||
</summary>
|
<slot name="secondary-header"></slot>
|
||||||
<a
|
</span>
|
||||||
href="about:firefoxview#${this.shortPageName}"
|
<a
|
||||||
@click=${this.viewAllClicked}
|
href="about:firefoxview#${this.shortPageName}"
|
||||||
class="view-all-link"
|
@click=${this.viewAllClicked}
|
||||||
data-l10n-id="firefoxview-view-all-link"
|
class="view-all-link"
|
||||||
?hidden=${!this.showViewAll}
|
data-l10n-id="firefoxview-view-all-link"
|
||||||
></a>
|
?hidden=${!this.showViewAll}
|
||||||
<slot name="main"></slot>
|
></a>
|
||||||
<slot name="footer" class="card-container-footer"></slot>
|
<slot name="main"></slot>
|
||||||
</details>`
|
<slot name="footer" class="card-container-footer"></slot>
|
||||||
|
</div>`,
|
||||||
|
() =>
|
||||||
|
html`<details
|
||||||
|
class=${classMap({
|
||||||
|
"card-container": true,
|
||||||
|
inner: this.isInnerCard,
|
||||||
|
"empty-state": this.isEmptyState && !this.isInnerCard,
|
||||||
|
})}
|
||||||
|
?open=${this.isExpanded}
|
||||||
|
?isOpenTabsView=${this.removeBlockEndMargin}
|
||||||
|
@toggle=${this.onToggleContainer}
|
||||||
|
role=${this.isInnerCard ? "presentation" : "group"}
|
||||||
|
>
|
||||||
|
<summary
|
||||||
|
class="card-container-header"
|
||||||
|
?hidden=${ifDefined(this.hideHeader)}
|
||||||
|
?withViewAll=${this.showViewAll}
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="icon chevron-icon"
|
||||||
|
role="presentation"
|
||||||
|
data-l10n-id="firefoxview-collapse-button-${this.isExpanded
|
||||||
|
? "hide"
|
||||||
|
: "show"}"
|
||||||
|
></span>
|
||||||
|
<slot name="header"></slot>
|
||||||
|
</summary>
|
||||||
|
<a
|
||||||
|
href="about:firefoxview#${this.shortPageName}"
|
||||||
|
@click=${this.viewAllClicked}
|
||||||
|
class="view-all-link"
|
||||||
|
data-l10n-id="firefoxview-view-all-link"
|
||||||
|
?hidden=${!this.showViewAll}
|
||||||
|
></a>
|
||||||
|
<slot name="main"></slot>
|
||||||
|
<slot name="footer" class="card-container-footer"></slot>
|
||||||
|
</details>`
|
||||||
)}
|
)}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- 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/. -->
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
|||||||
@@ -113,19 +113,20 @@ class FxviewEmptyState extends MozLitElement {
|
|||||||
${repeat(
|
${repeat(
|
||||||
this.descriptionLabels,
|
this.descriptionLabels,
|
||||||
descLabel => descLabel,
|
descLabel => descLabel,
|
||||||
(descLabel, index) => html`<p
|
(descLabel, index) =>
|
||||||
class=${classMap({
|
html`<p
|
||||||
description: true,
|
class=${classMap({
|
||||||
secondary: index !== 0,
|
description: true,
|
||||||
})}
|
secondary: index !== 0,
|
||||||
data-l10n-id="${descLabel}"
|
})}
|
||||||
@click=${this.openLinkInParentWindow &&
|
data-l10n-id="${descLabel}"
|
||||||
this.linkActionHandler}
|
@click=${this.openLinkInParentWindow &&
|
||||||
@keydown=${this.openLinkInParentWindow &&
|
this.linkActionHandler}
|
||||||
this.linkActionHandler}
|
@keydown=${this.openLinkInParentWindow &&
|
||||||
>
|
this.linkActionHandler}
|
||||||
${this.linkTemplate(this.descriptionLink)}
|
>
|
||||||
</p>`
|
${this.linkTemplate(this.descriptionLink)}
|
||||||
|
</p>`
|
||||||
)}
|
)}
|
||||||
</span>
|
</span>
|
||||||
<slot name="primary-action"></slot>
|
<slot name="primary-action"></slot>
|
||||||
|
|||||||
@@ -697,44 +697,46 @@ export class FxviewTabRowBase extends MozLitElement {
|
|||||||
secondaryButtonTemplate() {
|
secondaryButtonTemplate() {
|
||||||
return html`${when(
|
return html`${when(
|
||||||
this.secondaryL10nId && this.secondaryActionHandler,
|
this.secondaryL10nId && this.secondaryActionHandler,
|
||||||
() => html`<moz-button
|
() =>
|
||||||
type="icon ghost"
|
html`<moz-button
|
||||||
class=${classMap({
|
type="icon ghost"
|
||||||
"fxview-tab-row-button": true,
|
class=${classMap({
|
||||||
[this.secondaryActionClass]: this.secondaryActionClass,
|
"fxview-tab-row-button": true,
|
||||||
})}
|
[this.secondaryActionClass]: this.secondaryActionClass,
|
||||||
id="fxview-tab-row-secondary-button"
|
})}
|
||||||
data-l10n-id=${this.secondaryL10nId}
|
id="fxview-tab-row-secondary-button"
|
||||||
data-l10n-args=${ifDefined(this.secondaryL10nArgs)}
|
data-l10n-id=${this.secondaryL10nId}
|
||||||
aria-haspopup=${ifDefined(this.hasPopup)}
|
data-l10n-args=${ifDefined(this.secondaryL10nArgs)}
|
||||||
@click=${this.secondaryActionHandler}
|
aria-haspopup=${ifDefined(this.hasPopup)}
|
||||||
tabindex="${this.active &&
|
@click=${this.secondaryActionHandler}
|
||||||
this.currentActiveElementId === "fxview-tab-row-secondary-button"
|
tabindex="${this.active &&
|
||||||
? "0"
|
this.currentActiveElementId === "fxview-tab-row-secondary-button"
|
||||||
: "-1"}"
|
? "0"
|
||||||
></moz-button>`
|
: "-1"}"
|
||||||
|
></moz-button>`
|
||||||
)}`;
|
)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
tertiaryButtonTemplate() {
|
tertiaryButtonTemplate() {
|
||||||
return html`${when(
|
return html`${when(
|
||||||
this.tertiaryL10nId && this.tertiaryActionHandler,
|
this.tertiaryL10nId && this.tertiaryActionHandler,
|
||||||
() => html`<moz-button
|
() =>
|
||||||
type="icon ghost"
|
html`<moz-button
|
||||||
class=${classMap({
|
type="icon ghost"
|
||||||
"fxview-tab-row-button": true,
|
class=${classMap({
|
||||||
[this.tertiaryActionClass]: this.tertiaryActionClass,
|
"fxview-tab-row-button": true,
|
||||||
})}
|
[this.tertiaryActionClass]: this.tertiaryActionClass,
|
||||||
id="fxview-tab-row-tertiary-button"
|
})}
|
||||||
data-l10n-id=${this.tertiaryL10nId}
|
id="fxview-tab-row-tertiary-button"
|
||||||
data-l10n-args=${ifDefined(this.tertiaryL10nArgs)}
|
data-l10n-id=${this.tertiaryL10nId}
|
||||||
aria-haspopup=${ifDefined(this.hasPopup)}
|
data-l10n-args=${ifDefined(this.tertiaryL10nArgs)}
|
||||||
@click=${this.tertiaryActionHandler}
|
aria-haspopup=${ifDefined(this.hasPopup)}
|
||||||
tabindex="${this.active &&
|
@click=${this.tertiaryActionHandler}
|
||||||
this.currentActiveElementId === "fxview-tab-row-tertiary-button"
|
tabindex="${this.active &&
|
||||||
? "0"
|
this.currentActiveElementId === "fxview-tab-row-tertiary-button"
|
||||||
: "-1"}"
|
? "0"
|
||||||
></moz-button>`
|
: "-1"}"
|
||||||
|
></moz-button>`
|
||||||
)}`;
|
)}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -760,8 +762,9 @@ export class FxviewTabRow extends FxviewTabRowBase {
|
|||||||
${this.faviconTemplate()} ${this.titleTemplate()}
|
${this.faviconTemplate()} ${this.titleTemplate()}
|
||||||
${when(
|
${when(
|
||||||
!this.compact,
|
!this.compact,
|
||||||
() => html`${this.urlTemplate()} ${this.dateTemplate()}
|
() =>
|
||||||
${this.timeTemplate()}`
|
html`${this.urlTemplate()} ${this.dateTemplate()}
|
||||||
|
${this.timeTemplate()}`
|
||||||
)}
|
)}
|
||||||
</a>
|
</a>
|
||||||
${this.secondaryButtonTemplate()} ${this.tertiaryButtonTemplate()}
|
${this.secondaryButtonTemplate()} ${this.tertiaryButtonTemplate()}
|
||||||
|
|||||||
@@ -487,22 +487,23 @@ export class OpenTabsTabRow extends FxviewTabRowBase {
|
|||||||
return html`${when(
|
return html`${when(
|
||||||
this.indicators?.includes("soundplaying") ||
|
this.indicators?.includes("soundplaying") ||
|
||||||
this.indicators?.includes("muted"),
|
this.indicators?.includes("muted"),
|
||||||
() => html`<moz-button
|
() =>
|
||||||
type="icon ghost"
|
html`<moz-button
|
||||||
class="fxview-tab-row-button"
|
type="icon ghost"
|
||||||
id="fxview-tab-row-media-button"
|
class="fxview-tab-row-button"
|
||||||
data-l10n-id=${this.indicators?.includes("muted")
|
id="fxview-tab-row-media-button"
|
||||||
? "fxviewtabrow-unmute-tab-button-no-context"
|
data-l10n-id=${this.indicators?.includes("muted")
|
||||||
: "fxviewtabrow-mute-tab-button-no-context"}
|
? "fxviewtabrow-unmute-tab-button-no-context"
|
||||||
muted=${this.indicators?.includes("muted")}
|
: "fxviewtabrow-mute-tab-button-no-context"}
|
||||||
soundplaying=${this.indicators?.includes("soundplaying") &&
|
muted=${this.indicators?.includes("muted")}
|
||||||
!this.indicators?.includes("muted")}
|
soundplaying=${this.indicators?.includes("soundplaying") &&
|
||||||
@click=${this.muteOrUnmuteTab}
|
!this.indicators?.includes("muted")}
|
||||||
tabindex="${this.active &&
|
@click=${this.muteOrUnmuteTab}
|
||||||
this.currentActiveElementId === "fxview-tab-row-media-button"
|
tabindex="${this.active &&
|
||||||
? "0"
|
this.currentActiveElementId === "fxview-tab-row-media-button"
|
||||||
: "-1"}"
|
? "0"
|
||||||
></moz-button>`,
|
: "-1"}"
|
||||||
|
></moz-button>`,
|
||||||
() => html`<span></span>`
|
() => html`<span></span>`
|
||||||
)}`;
|
)}`;
|
||||||
}
|
}
|
||||||
@@ -558,8 +559,9 @@ export class OpenTabsTabRow extends FxviewTabRowBase {
|
|||||||
${this.#faviconTemplate()} ${this.titleTemplate()}
|
${this.#faviconTemplate()} ${this.titleTemplate()}
|
||||||
${when(
|
${when(
|
||||||
!this.compact,
|
!this.compact,
|
||||||
() => html`${this.#containerIndicatorTemplate()} ${this.urlTemplate()}
|
() =>
|
||||||
${this.dateTemplate()} ${this.timeTemplate()}`
|
html`${this.#containerIndicatorTemplate()} ${this.urlTemplate()}
|
||||||
|
${this.dateTemplate()} ${this.timeTemplate()}`
|
||||||
)}
|
)}
|
||||||
</a>
|
</a>
|
||||||
${this.#mediaButtonTemplate()} ${this.secondaryButtonTemplate()}
|
${this.#mediaButtonTemplate()} ${this.secondaryButtonTemplate()}
|
||||||
|
|||||||
@@ -271,22 +271,21 @@ class OpenTabsInView extends ViewPage {
|
|||||||
>
|
>
|
||||||
${when(
|
${when(
|
||||||
currentWindowIndex && currentWindowTabs,
|
currentWindowIndex && currentWindowTabs,
|
||||||
() =>
|
() => html`
|
||||||
html`
|
<view-opentabs-card
|
||||||
<view-opentabs-card
|
class=${cardClasses}
|
||||||
class=${cardClasses}
|
.tabs=${currentWindowTabs}
|
||||||
.tabs=${currentWindowTabs}
|
.paused=${this.paused}
|
||||||
.paused=${this.paused}
|
data-inner-id="${this.currentWindow.windowGlobalChild
|
||||||
data-inner-id="${this.currentWindow.windowGlobalChild
|
.innerWindowId}"
|
||||||
.innerWindowId}"
|
data-l10n-id="firefoxview-opentabs-current-window-header"
|
||||||
data-l10n-id="firefoxview-opentabs-current-window-header"
|
data-l10n-args="${JSON.stringify({
|
||||||
data-l10n-args="${JSON.stringify({
|
winID: currentWindowIndex,
|
||||||
winID: currentWindowIndex,
|
})}"
|
||||||
})}"
|
.searchQuery=${this.searchQuery}
|
||||||
.searchQuery=${this.searchQuery}
|
.bookmarkList=${this.bookmarkList}
|
||||||
.bookmarkList=${this.bookmarkList}
|
></view-opentabs-card>
|
||||||
></view-opentabs-card>
|
`
|
||||||
`
|
|
||||||
)}
|
)}
|
||||||
${map(
|
${map(
|
||||||
otherWindows,
|
otherWindows,
|
||||||
@@ -542,10 +541,11 @@ class OpenTabsInViewCard extends ViewPageContent {
|
|||||||
>
|
>
|
||||||
${when(
|
${when(
|
||||||
this.recentBrowsing,
|
this.recentBrowsing,
|
||||||
() => html`<h3
|
() =>
|
||||||
slot="header"
|
html`<h3
|
||||||
data-l10n-id="firefoxview-opentabs-header"
|
slot="header"
|
||||||
></h3>`,
|
data-l10n-id="firefoxview-opentabs-header"
|
||||||
|
></h3>`,
|
||||||
() => html`<h3 slot="header">${this.title}</h3>`
|
() => html`<h3 slot="header">${this.title}</h3>`
|
||||||
)}
|
)}
|
||||||
<div class="fxview-tab-list-container" slot="main">
|
<div class="fxview-tab-list-container" slot="main">
|
||||||
@@ -567,15 +567,16 @@ class OpenTabsInViewCard extends ViewPageContent {
|
|||||||
</div>
|
</div>
|
||||||
${when(
|
${when(
|
||||||
this.recentBrowsing,
|
this.recentBrowsing,
|
||||||
() => html` <div
|
() =>
|
||||||
@click=${this.enableShowAll}
|
html` <div
|
||||||
@keydown=${this.enableShowAll}
|
@click=${this.enableShowAll}
|
||||||
data-l10n-id="firefoxview-show-all"
|
@keydown=${this.enableShowAll}
|
||||||
?hidden=${!this.isShowAllLinkVisible()}
|
data-l10n-id="firefoxview-show-all"
|
||||||
slot="footer"
|
?hidden=${!this.isShowAllLinkVisible()}
|
||||||
tabindex="0"
|
slot="footer"
|
||||||
role="link"
|
tabindex="0"
|
||||||
></div>`,
|
role="link"
|
||||||
|
></div>`,
|
||||||
() =>
|
() =>
|
||||||
html` <div
|
html` <div
|
||||||
@click=${this.toggleShowMore}
|
@click=${this.toggleShowMore}
|
||||||
|
|||||||
@@ -163,9 +163,8 @@ class RecentlyClosedTabsInView extends ViewPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateRecentlyClosedTabs() {
|
updateRecentlyClosedTabs() {
|
||||||
let recentlyClosedTabsData = lazy.SessionStore.getClosedTabData(
|
let recentlyClosedTabsData =
|
||||||
getWindow()
|
lazy.SessionStore.getClosedTabData(getWindow());
|
||||||
);
|
|
||||||
if (Services.prefs.getBoolPref(INCLUDE_CLOSED_TABS_FROM_CLOSED_WINDOWS)) {
|
if (Services.prefs.getBoolPref(INCLUDE_CLOSED_TABS_FROM_CLOSED_WINDOWS)) {
|
||||||
recentlyClosedTabsData.push(
|
recentlyClosedTabsData.push(
|
||||||
...lazy.SessionStore.getClosedTabDataFromClosedWindows()
|
...lazy.SessionStore.getClosedTabDataFromClosedWindows()
|
||||||
@@ -338,26 +337,27 @@ class RecentlyClosedTabsInView extends ViewPage {
|
|||||||
/>
|
/>
|
||||||
${when(
|
${when(
|
||||||
!this.recentBrowsing,
|
!this.recentBrowsing,
|
||||||
() => html`<div
|
() =>
|
||||||
class="sticky-container bottom-fade"
|
html`<div
|
||||||
?hidden=${!this.selectedTab}
|
class="sticky-container bottom-fade"
|
||||||
>
|
?hidden=${!this.selectedTab}
|
||||||
<h2
|
>
|
||||||
class="page-header"
|
<h2
|
||||||
data-l10n-id="firefoxview-recently-closed-header"
|
class="page-header"
|
||||||
></h2>
|
data-l10n-id="firefoxview-recently-closed-header"
|
||||||
<div>
|
></h2>
|
||||||
<fxview-search-textbox
|
<div>
|
||||||
data-l10n-id="firefoxview-search-text-box-recentlyclosed"
|
<fxview-search-textbox
|
||||||
data-l10n-attrs="placeholder"
|
data-l10n-id="firefoxview-search-text-box-recentlyclosed"
|
||||||
@fxview-search-textbox-query=${this.onSearchQuery}
|
data-l10n-attrs="placeholder"
|
||||||
.size=${this.searchTextboxSize}
|
@fxview-search-textbox-query=${this.onSearchQuery}
|
||||||
pageName=${this.recentBrowsing
|
.size=${this.searchTextboxSize}
|
||||||
? "recentbrowsing"
|
pageName=${this.recentBrowsing
|
||||||
: "recentlyclosed"}
|
? "recentbrowsing"
|
||||||
></fxview-search-textbox>
|
: "recentlyclosed"}
|
||||||
</div>
|
></fxview-search-textbox>
|
||||||
</div>`
|
</div>
|
||||||
|
</div>`
|
||||||
)}
|
)}
|
||||||
<div class=${classMap({ "cards-container": this.selectedTab })}>
|
<div class=${classMap({ "cards-container": this.selectedTab })}>
|
||||||
<card-container
|
<card-container
|
||||||
@@ -374,22 +374,21 @@ class RecentlyClosedTabsInView extends ViewPage {
|
|||||||
></h3>
|
></h3>
|
||||||
${when(
|
${when(
|
||||||
this.recentlyClosedTabs.length,
|
this.recentlyClosedTabs.length,
|
||||||
() =>
|
() => html`
|
||||||
html`
|
<fxview-tab-list
|
||||||
<fxview-tab-list
|
slot="main"
|
||||||
slot="main"
|
.maxTabsLength=${!this.recentBrowsing || this.showAll
|
||||||
.maxTabsLength=${!this.recentBrowsing || this.showAll
|
? -1
|
||||||
? -1
|
: MAX_TABS_FOR_RECENT_BROWSING}
|
||||||
: MAX_TABS_FOR_RECENT_BROWSING}
|
.searchQuery=${ifDefined(
|
||||||
.searchQuery=${ifDefined(
|
this.searchResults && this.searchQuery
|
||||||
this.searchResults && this.searchQuery
|
)}
|
||||||
)}
|
.tabItems=${this.searchResults || this.recentlyClosedTabs}
|
||||||
.tabItems=${this.searchResults || this.recentlyClosedTabs}
|
@fxview-tab-list-secondary-action=${this.onDismissTab}
|
||||||
@fxview-tab-list-secondary-action=${this.onDismissTab}
|
@fxview-tab-list-primary-action=${this.onReopenTab}
|
||||||
@fxview-tab-list-primary-action=${this.onReopenTab}
|
secondaryActionClass="dismiss-button"
|
||||||
secondaryActionClass="dismiss-button"
|
></fxview-tab-list>
|
||||||
></fxview-tab-list>
|
`
|
||||||
`
|
|
||||||
)}
|
)}
|
||||||
${when(
|
${when(
|
||||||
this.recentBrowsing && !this.recentlyClosedTabs.length,
|
this.recentBrowsing && !this.recentlyClosedTabs.length,
|
||||||
@@ -397,15 +396,16 @@ class RecentlyClosedTabsInView extends ViewPage {
|
|||||||
)}
|
)}
|
||||||
${when(
|
${when(
|
||||||
this.isShowAllLinkVisible(),
|
this.isShowAllLinkVisible(),
|
||||||
() => html` <div
|
() =>
|
||||||
@click=${this.enableShowAll}
|
html` <div
|
||||||
@keydown=${this.enableShowAll}
|
@click=${this.enableShowAll}
|
||||||
data-l10n-id="firefoxview-show-all"
|
@keydown=${this.enableShowAll}
|
||||||
?hidden=${!this.isShowAllLinkVisible()}
|
data-l10n-id="firefoxview-show-all"
|
||||||
slot="footer"
|
?hidden=${!this.isShowAllLinkVisible()}
|
||||||
tabindex="0"
|
slot="footer"
|
||||||
role="link"
|
tabindex="0"
|
||||||
></div>`
|
role="link"
|
||||||
|
></div>`
|
||||||
)}
|
)}
|
||||||
</card-container>
|
</card-container>
|
||||||
${when(
|
${when(
|
||||||
|
|||||||
@@ -142,23 +142,24 @@ export class SyncedTabsTabRow extends FxviewTabRowBase {
|
|||||||
secondaryButtonTemplate() {
|
secondaryButtonTemplate() {
|
||||||
return html`${when(
|
return html`${when(
|
||||||
this.secondaryL10nId && this.secondaryActionHandler,
|
this.secondaryL10nId && this.secondaryActionHandler,
|
||||||
() => html`<moz-button
|
() =>
|
||||||
type="icon ghost"
|
html`<moz-button
|
||||||
class=${classMap({
|
type="icon ghost"
|
||||||
"fxview-tab-row-button": true,
|
class=${classMap({
|
||||||
[this.secondaryActionClass]: this.secondaryActionClass,
|
"fxview-tab-row-button": true,
|
||||||
})}
|
[this.secondaryActionClass]: this.secondaryActionClass,
|
||||||
?disabled=${this.closeRequested}
|
})}
|
||||||
id="fxview-tab-row-secondary-button"
|
?disabled=${this.closeRequested}
|
||||||
data-l10n-id=${this.secondaryL10nId}
|
id="fxview-tab-row-secondary-button"
|
||||||
data-l10n-args=${ifDefined(this.secondaryL10nArgs)}
|
data-l10n-id=${this.secondaryL10nId}
|
||||||
aria-haspopup=${ifDefined(this.hasPopup)}
|
data-l10n-args=${ifDefined(this.secondaryL10nArgs)}
|
||||||
@click=${this.secondaryActionHandler}
|
aria-haspopup=${ifDefined(this.hasPopup)}
|
||||||
tabindex="${this.active &&
|
@click=${this.secondaryActionHandler}
|
||||||
this.currentActiveElementId === "fxview-tab-row-secondary-button"
|
tabindex="${this.active &&
|
||||||
? "0"
|
this.currentActiveElementId === "fxview-tab-row-secondary-button"
|
||||||
: "-1"}"
|
? "0"
|
||||||
></moz-button>`
|
: "-1"}"
|
||||||
|
></moz-button>`
|
||||||
)}`;
|
)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,8 +184,9 @@ export class SyncedTabsTabRow extends FxviewTabRowBase {
|
|||||||
${this.faviconTemplate()} ${this.titleTemplate()}
|
${this.faviconTemplate()} ${this.titleTemplate()}
|
||||||
${when(
|
${when(
|
||||||
!this.compact,
|
!this.compact,
|
||||||
() => html`${this.urlTemplate()} ${this.dateTemplate()}
|
() =>
|
||||||
${this.timeTemplate()}`
|
html`${this.urlTemplate()} ${this.dateTemplate()}
|
||||||
|
${this.timeTemplate()}`
|
||||||
)}
|
)}
|
||||||
</a>
|
</a>
|
||||||
${this.secondaryButtonTemplate()} ${this.tertiaryButtonTemplate()}
|
${this.secondaryButtonTemplate()} ${this.tertiaryButtonTemplate()}
|
||||||
|
|||||||
@@ -306,16 +306,18 @@ class SyncedTabsInView extends ViewPage {
|
|||||||
</card-container>`;
|
</card-container>`;
|
||||||
renderArray.push(template);
|
renderArray.push(template);
|
||||||
if (this.isShowAllLinkVisible(tabItems)) {
|
if (this.isShowAllLinkVisible(tabItems)) {
|
||||||
renderArray.push(html` <div class="show-all-link-container">
|
renderArray.push(
|
||||||
<div
|
html` <div class="show-all-link-container">
|
||||||
class="show-all-link"
|
<div
|
||||||
@click=${this.enableShowAll}
|
class="show-all-link"
|
||||||
@keydown=${this.enableShowAll}
|
@click=${this.enableShowAll}
|
||||||
data-l10n-id="firefoxview-show-all"
|
@keydown=${this.enableShowAll}
|
||||||
tabindex="0"
|
data-l10n-id="firefoxview-show-all"
|
||||||
role="link"
|
tabindex="0"
|
||||||
></div>
|
role="link"
|
||||||
</div>`);
|
></div>
|
||||||
|
</div>`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Check renderInfo[id].tabs.length to determine whether to display an
|
// Check renderInfo[id].tabs.length to determine whether to display an
|
||||||
@@ -370,53 +372,61 @@ class SyncedTabsInView extends ViewPage {
|
|||||||
Services.prefs.getBoolPref(UI_OPEN_STATE, true);
|
Services.prefs.getBoolPref(UI_OPEN_STATE, true);
|
||||||
|
|
||||||
let renderArray = [];
|
let renderArray = [];
|
||||||
renderArray.push(html` <link
|
renderArray.push(
|
||||||
rel="stylesheet"
|
html` <link
|
||||||
href="chrome://browser/content/firefoxview/view-syncedtabs.css"
|
rel="stylesheet"
|
||||||
/>`);
|
href="chrome://browser/content/firefoxview/view-syncedtabs.css"
|
||||||
renderArray.push(html` <link
|
/>`
|
||||||
rel="stylesheet"
|
);
|
||||||
href="chrome://browser/content/firefoxview/firefoxview.css"
|
renderArray.push(
|
||||||
/>`);
|
html` <link
|
||||||
|
rel="stylesheet"
|
||||||
|
href="chrome://browser/content/firefoxview/firefoxview.css"
|
||||||
|
/>`
|
||||||
|
);
|
||||||
|
|
||||||
if (!this.recentBrowsing) {
|
if (!this.recentBrowsing) {
|
||||||
renderArray.push(html`<div class="sticky-container bottom-fade">
|
renderArray.push(
|
||||||
<h2
|
html`<div class="sticky-container bottom-fade">
|
||||||
class="page-header"
|
<h2
|
||||||
data-l10n-id="firefoxview-synced-tabs-header"
|
class="page-header"
|
||||||
></h2>
|
data-l10n-id="firefoxview-synced-tabs-header"
|
||||||
<div class="syncedtabs-header">
|
></h2>
|
||||||
<div>
|
<div class="syncedtabs-header">
|
||||||
<fxview-search-textbox
|
<div>
|
||||||
data-l10n-id="firefoxview-search-text-box-tabs"
|
<fxview-search-textbox
|
||||||
data-l10n-attrs="placeholder"
|
data-l10n-id="firefoxview-search-text-box-tabs"
|
||||||
@fxview-search-textbox-query=${this.onSearchQuery}
|
data-l10n-attrs="placeholder"
|
||||||
.size=${this.searchTextboxSize}
|
@fxview-search-textbox-query=${this.onSearchQuery}
|
||||||
pageName=${this.recentBrowsing ? "recentbrowsing" : "syncedtabs"}
|
.size=${this.searchTextboxSize}
|
||||||
></fxview-search-textbox>
|
pageName=${this.recentBrowsing
|
||||||
</div>
|
? "recentbrowsing"
|
||||||
${when(
|
: "syncedtabs"}
|
||||||
this.controller.currentSetupStateIndex === 4,
|
></fxview-search-textbox>
|
||||||
() => html`
|
</div>
|
||||||
<button
|
${when(
|
||||||
class="small-button"
|
this.controller.currentSetupStateIndex === 4,
|
||||||
data-action="add-device"
|
() => html`
|
||||||
@click=${e => this.controller.handleEvent(e)}
|
<button
|
||||||
>
|
class="small-button"
|
||||||
<img
|
|
||||||
class="icon"
|
|
||||||
role="presentation"
|
|
||||||
src="chrome://global/skin/icons/plus.svg"
|
|
||||||
alt="plus sign"
|
|
||||||
/><span
|
|
||||||
data-l10n-id="firefoxview-syncedtabs-connect-another-device"
|
|
||||||
data-action="add-device"
|
data-action="add-device"
|
||||||
></span>
|
@click=${e => this.controller.handleEvent(e)}
|
||||||
</button>
|
>
|
||||||
`
|
<img
|
||||||
)}
|
class="icon"
|
||||||
</div>
|
role="presentation"
|
||||||
</div>`);
|
src="chrome://global/skin/icons/plus.svg"
|
||||||
|
alt="plus sign"
|
||||||
|
/><span
|
||||||
|
data-l10n-id="firefoxview-syncedtabs-connect-another-device"
|
||||||
|
data-action="add-device"
|
||||||
|
></span>
|
||||||
|
</button>
|
||||||
|
`
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.recentBrowsing) {
|
if (this.recentBrowsing) {
|
||||||
|
|||||||
@@ -448,9 +448,8 @@ add_task(async function test_cumulative_searches_recently_closed_telemetry() {
|
|||||||
EventUtils.synthesizeMouseAtCenter(searchTextbox, {}, content);
|
EventUtils.synthesizeMouseAtCenter(searchTextbox, {}, content);
|
||||||
EventUtils.sendString(URLs[0], content);
|
EventUtils.sendString(URLs[0], content);
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const [recentlyclosedSlot, tabList] = await waitForRecentlyClosedTabsList(
|
const [recentlyclosedSlot, tabList] =
|
||||||
document
|
await waitForRecentlyClosedTabsList(document);
|
||||||
);
|
|
||||||
await TestUtils.waitForCondition(() => recentlyclosedSlot?.searchQuery);
|
await TestUtils.waitForCondition(() => recentlyclosedSlot?.searchQuery);
|
||||||
|
|
||||||
await click_recently_closed_tab_item(tabList[0]);
|
await click_recently_closed_tab_item(tabList[0]);
|
||||||
|
|||||||
@@ -217,9 +217,8 @@ add_task(async function test_list_ordering() {
|
|||||||
const { document } = browser.contentWindow;
|
const { document } = browser.contentWindow;
|
||||||
await clearAllParentTelemetryEvents();
|
await clearAllParentTelemetryEvents();
|
||||||
await navigateToViewAndWait(document, "recentlyclosed");
|
await navigateToViewAndWait(document, "recentlyclosed");
|
||||||
let [cardMainSlotNode, listItems] = await waitForRecentlyClosedTabsList(
|
let [cardMainSlotNode, listItems] =
|
||||||
document
|
await waitForRecentlyClosedTabsList(document);
|
||||||
);
|
|
||||||
|
|
||||||
is(
|
is(
|
||||||
cardMainSlotNode.tagName.toLowerCase(),
|
cardMainSlotNode.tagName.toLowerCase(),
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
<!-- 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,
|
- 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/. -->
|
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" role="document">
|
<html xmlns="http://www.w3.org/1999/xhtml" role="document">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
# 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/.
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
-->
|
-->
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|||||||
@@ -85,9 +85,8 @@ export var ChromeMigrationUtils = {
|
|||||||
manifestPath = PathUtils.join(manifestPath, extensionId);
|
manifestPath = PathUtils.join(manifestPath, extensionId);
|
||||||
// If there are multiple sub-directories in the extension directory,
|
// If there are multiple sub-directories in the extension directory,
|
||||||
// read the files in the latest directory.
|
// read the files in the latest directory.
|
||||||
let directories = await this._getSortedByVersionSubDirectoryNames(
|
let directories =
|
||||||
manifestPath
|
await this._getSortedByVersionSubDirectoryNames(manifestPath);
|
||||||
);
|
|
||||||
if (!directories[0]) {
|
if (!directories[0]) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -165,9 +164,8 @@ export var ChromeMigrationUtils = {
|
|||||||
}
|
}
|
||||||
let localeFilePath = await this.getExtensionPath(profileId);
|
let localeFilePath = await this.getExtensionPath(profileId);
|
||||||
localeFilePath = PathUtils.join(localeFilePath, extensionId);
|
localeFilePath = PathUtils.join(localeFilePath, extensionId);
|
||||||
let directories = await this._getSortedByVersionSubDirectoryNames(
|
let directories =
|
||||||
localeFilePath
|
await this._getSortedByVersionSubDirectoryNames(localeFilePath);
|
||||||
);
|
|
||||||
// If there are multiple sub-directories in the extension directory,
|
// If there are multiple sub-directories in the extension directory,
|
||||||
// read the files in the latest directory.
|
// read the files in the latest directory.
|
||||||
localeFilePath = PathUtils.join(
|
localeFilePath = PathUtils.join(
|
||||||
|
|||||||
@@ -45,9 +45,8 @@ export class ChromeWindowsLoginCrypto {
|
|||||||
let keyData;
|
let keyData;
|
||||||
try {
|
try {
|
||||||
// NB: For testing, allow directory service to be faked before getting.
|
// NB: For testing, allow directory service to be faked before getting.
|
||||||
const localState = await ChromeMigrationUtils.getLocalState(
|
const localState =
|
||||||
userDataPathSuffix
|
await ChromeMigrationUtils.getLocalState(userDataPathSuffix);
|
||||||
);
|
|
||||||
const withHeader = atob(localState.os_crypt.encrypted_key);
|
const withHeader = atob(localState.os_crypt.encrypted_key);
|
||||||
if (!withHeader.startsWith(DPAPI_KEY_PREFIX)) {
|
if (!withHeader.startsWith(DPAPI_KEY_PREFIX)) {
|
||||||
throw new Error("Invalid key format");
|
throw new Error("Invalid key format");
|
||||||
|
|||||||
@@ -373,9 +373,8 @@ Bookmarks.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
async _migrateFolder(aSourceFolder, aDestFolderGuid) {
|
async _migrateFolder(aSourceFolder, aDestFolderGuid) {
|
||||||
let { bookmarks, favicons } = await this._getBookmarksInFolder(
|
let { bookmarks, favicons } =
|
||||||
aSourceFolder
|
await this._getBookmarksInFolder(aSourceFolder);
|
||||||
);
|
|
||||||
if (!bookmarks.length) {
|
if (!bookmarks.length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
<!-- 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,
|
- 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/. -->
|
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ function templateHTML(options) {
|
|||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
- 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/. -->
|
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
- 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/. -->
|
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
- 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/. -->
|
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
- 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/. -->
|
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
|||||||
@@ -9,9 +9,8 @@ test_newtab({
|
|||||||
() => content.document.querySelector(siteSelector),
|
() => content.document.querySelector(siteSelector),
|
||||||
"Topsites have loaded"
|
"Topsites have loaded"
|
||||||
);
|
);
|
||||||
const contextMenuItems = await content.openContextMenuAndGetOptions(
|
const contextMenuItems =
|
||||||
siteSelector
|
await content.openContextMenuAndGetOptions(siteSelector);
|
||||||
);
|
|
||||||
let icon = contextMenuItems[0].querySelector(".icon");
|
let icon = contextMenuItems[0].querySelector(".icon");
|
||||||
ok(!icon, "icon was not rendered");
|
ok(!icon, "icon was not rendered");
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -19,9 +19,8 @@ test_newtab({
|
|||||||
"Topsite tippytop icon not found"
|
"Topsite tippytop icon not found"
|
||||||
);
|
);
|
||||||
|
|
||||||
const contextMenuItems = await content.openContextMenuAndGetOptions(
|
const contextMenuItems =
|
||||||
siteSelector
|
await content.openContextMenuAndGetOptions(siteSelector);
|
||||||
);
|
|
||||||
|
|
||||||
Assert.equal(contextMenuItems.length, 5, "Number of options is correct");
|
Assert.equal(contextMenuItems.length, 5, "Number of options is correct");
|
||||||
|
|
||||||
@@ -62,9 +61,8 @@ test_newtab({
|
|||||||
.querySelectorAll(siteSelector)[1]
|
.querySelectorAll(siteSelector)[1]
|
||||||
.getAttribute("href");
|
.getAttribute("href");
|
||||||
|
|
||||||
const contextMenuItems = await content.openContextMenuAndGetOptions(
|
const contextMenuItems =
|
||||||
siteSelector
|
await content.openContextMenuAndGetOptions(siteSelector);
|
||||||
);
|
|
||||||
await ContentTaskUtils.waitForCondition(
|
await ContentTaskUtils.waitForCondition(
|
||||||
() => contextMenuItems[4].textContent === "Dismiss",
|
() => contextMenuItems[4].textContent === "Dismiss",
|
||||||
"'Dismiss' is the 5th item in the context menu list"
|
"'Dismiss' is the 5th item in the context menu list"
|
||||||
@@ -99,9 +97,8 @@ test_newtab({
|
|||||||
"1 search topsites is loaded by default"
|
"1 search topsites is loaded by default"
|
||||||
);
|
);
|
||||||
|
|
||||||
const contextMenuItems = await content.openContextMenuAndGetOptions(
|
const contextMenuItems =
|
||||||
siteSelector
|
await content.openContextMenuAndGetOptions(siteSelector);
|
||||||
);
|
|
||||||
is(
|
is(
|
||||||
contextMenuItems.length,
|
contextMenuItems.length,
|
||||||
2,
|
2,
|
||||||
|
|||||||
@@ -931,9 +931,8 @@ add_task(
|
|||||||
);
|
);
|
||||||
let sandbox = sinon.createSandbox();
|
let sandbox = sinon.createSandbox();
|
||||||
let feed = getHighlightsFeedForTest(sandbox);
|
let feed = getHighlightsFeedForTest(sandbox);
|
||||||
feed.store.state.Prefs.values[
|
feed.store.state.Prefs.values["section.highlights.includeBookmarks"] =
|
||||||
"section.highlights.includeBookmarks"
|
false;
|
||||||
] = false;
|
|
||||||
|
|
||||||
let links = [
|
let links = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
# 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/.
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
-->
|
-->
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|||||||
@@ -34,8 +34,7 @@ function promiseTopicObserved(aTopic) {
|
|||||||
) {
|
) {
|
||||||
Services.obs.removeObserver(observe, aObsTopic);
|
Services.obs.removeObserver(observe, aObsTopic);
|
||||||
resolve([aObsSubject, aObsData]);
|
resolve([aObsSubject, aObsData]);
|
||||||
},
|
}, aTopic);
|
||||||
aTopic);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,10 +16,13 @@ registerCleanupFunction(async () => {
|
|||||||
|
|
||||||
async function selectAppMenuView(buttonId, viewId) {
|
async function selectAppMenuView(buttonId, viewId) {
|
||||||
let btn;
|
let btn;
|
||||||
await TestUtils.waitForCondition(() => {
|
await TestUtils.waitForCondition(
|
||||||
btn = document.getElementById(buttonId);
|
() => {
|
||||||
return btn;
|
btn = document.getElementById(buttonId);
|
||||||
}, "Should have the " + buttonId + " button");
|
return btn;
|
||||||
|
},
|
||||||
|
"Should have the " + buttonId + " button"
|
||||||
|
);
|
||||||
btn.click();
|
btn.click();
|
||||||
let view = document.getElementById(viewId);
|
let view = document.getElementById(viewId);
|
||||||
let viewPromise = BrowserTestUtils.waitForEvent(view, "ViewShown");
|
let viewPromise = BrowserTestUtils.waitForEvent(view, "ViewShown");
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
|||||||
@@ -30,9 +30,8 @@ let gSyncChooseWhatToSync = {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// Hide the 'Disconnect' button if not applicable
|
// Hide the 'Disconnect' button if not applicable
|
||||||
document
|
document.getElementById("syncChooseOptions").getButton("extra2").hidden =
|
||||||
.getElementById("syncChooseOptions")
|
true;
|
||||||
.getButton("extra2").hidden = true;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -72,9 +72,8 @@ var gFxaPairDeviceDialog = {
|
|||||||
FxAccountsPairingFlow.start({ emitter: this._emitter }),
|
FxAccountsPairingFlow.start({ emitter: this._emitter }),
|
||||||
]);
|
]);
|
||||||
const imgData = QR.encodeToDataURI(uri, "L");
|
const imgData = QR.encodeToDataURI(uri, "L");
|
||||||
document.getElementById(
|
document.getElementById("qrContainer").style.backgroundImage =
|
||||||
"qrContainer"
|
`url("${imgData.src}")`;
|
||||||
).style.backgroundImage = `url("${imgData.src}")`;
|
|
||||||
document
|
document
|
||||||
.getElementById("qrWrapper")
|
.getElementById("qrWrapper")
|
||||||
.setAttribute("pairing-status", "ready");
|
.setAttribute("pairing-status", "ready");
|
||||||
@@ -104,9 +103,8 @@ var gFxaPairDeviceDialog = {
|
|||||||
"https://accounts.firefox.com/pair",
|
"https://accounts.firefox.com/pair",
|
||||||
"L"
|
"L"
|
||||||
);
|
);
|
||||||
document.getElementById(
|
document.getElementById("qrContainer").style.backgroundImage =
|
||||||
"qrContainer"
|
`url("${imgData.src}")`;
|
||||||
).style.backgroundImage = `url("${imgData.src}")`;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onError(err) {
|
onError(err) {
|
||||||
|
|||||||
@@ -289,9 +289,16 @@ var gMainPane = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// approximately a "requestIdleInterval"
|
// approximately a "requestIdleInterval"
|
||||||
window.setTimeout(() => {
|
window.setTimeout(
|
||||||
window.requestIdleCallback(pollForDefaultBrowser);
|
() => {
|
||||||
}, backoffTimes[this._backoffIndex + 1 < backoffTimes.length ? this._backoffIndex++ : backoffTimes.length - 1]);
|
window.requestIdleCallback(pollForDefaultBrowser);
|
||||||
|
},
|
||||||
|
backoffTimes[
|
||||||
|
this._backoffIndex + 1 < backoffTimes.length
|
||||||
|
? this._backoffIndex++
|
||||||
|
: backoffTimes.length - 1
|
||||||
|
]
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
window.setTimeout(() => {
|
window.setTimeout(() => {
|
||||||
@@ -710,9 +717,8 @@ var gMainPane = {
|
|||||||
"updateSettingsContainer"
|
"updateSettingsContainer"
|
||||||
);
|
);
|
||||||
updateContainer.classList.add("updateSettingCrossUserWarningContainer");
|
updateContainer.classList.add("updateSettingCrossUserWarningContainer");
|
||||||
document.getElementById(
|
document.getElementById("updateSettingCrossUserWarningDesc").hidden =
|
||||||
"updateSettingCrossUserWarningDesc"
|
false;
|
||||||
).hidden = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -921,9 +927,8 @@ var gMainPane = {
|
|||||||
if (!(await FxAccounts.canConnectAccount())) {
|
if (!(await FxAccounts.canConnectAccount())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let url = await FxAccounts.config.promiseConnectAccountURI(
|
let url =
|
||||||
"dev-edition-setup"
|
await FxAccounts.config.promiseConnectAccountURI("dev-edition-setup");
|
||||||
);
|
|
||||||
let accountsTab = win.gBrowser.addWebTab(url);
|
let accountsTab = win.gBrowser.addWebTab(url);
|
||||||
win.gBrowser.selectedTab = accountsTab;
|
win.gBrowser.selectedTab = accountsTab;
|
||||||
},
|
},
|
||||||
@@ -1063,9 +1068,8 @@ var gMainPane = {
|
|||||||
await TranslationsParent.getSupportedLanguages();
|
await TranslationsParent.getSupportedLanguages();
|
||||||
const languageList =
|
const languageList =
|
||||||
TranslationsParent.getLanguageList(supportedLanguages);
|
TranslationsParent.getLanguageList(supportedLanguages);
|
||||||
const downloadPhases = await TranslationsState.createDownloadPhases(
|
const downloadPhases =
|
||||||
languageList
|
await TranslationsState.createDownloadPhases(languageList);
|
||||||
);
|
|
||||||
|
|
||||||
if (supportedLanguages.languagePairs.length === 0) {
|
if (supportedLanguages.languagePairs.length === 0) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
@@ -2344,12 +2348,10 @@ var gMainPane = {
|
|||||||
if (Services.appinfo.fissionAutostart) {
|
if (Services.appinfo.fissionAutostart) {
|
||||||
document.getElementById("limitContentProcess").hidden = true;
|
document.getElementById("limitContentProcess").hidden = true;
|
||||||
document.getElementById("contentProcessCount").hidden = true;
|
document.getElementById("contentProcessCount").hidden = true;
|
||||||
document.getElementById(
|
document.getElementById("contentProcessCountEnabledDescription").hidden =
|
||||||
"contentProcessCountEnabledDescription"
|
true;
|
||||||
).hidden = true;
|
document.getElementById("contentProcessCountDisabledDescription").hidden =
|
||||||
document.getElementById(
|
true;
|
||||||
"contentProcessCountDisabledDescription"
|
|
||||||
).hidden = true;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Services.appinfo.browserTabsRemoteAutostart) {
|
if (Services.appinfo.browserTabsRemoteAutostart) {
|
||||||
@@ -2368,21 +2370,17 @@ var gMainPane = {
|
|||||||
|
|
||||||
document.getElementById("limitContentProcess").disabled = false;
|
document.getElementById("limitContentProcess").disabled = false;
|
||||||
document.getElementById("contentProcessCount").disabled = false;
|
document.getElementById("contentProcessCount").disabled = false;
|
||||||
document.getElementById(
|
document.getElementById("contentProcessCountEnabledDescription").hidden =
|
||||||
"contentProcessCountEnabledDescription"
|
false;
|
||||||
).hidden = false;
|
document.getElementById("contentProcessCountDisabledDescription").hidden =
|
||||||
document.getElementById(
|
true;
|
||||||
"contentProcessCountDisabledDescription"
|
|
||||||
).hidden = true;
|
|
||||||
} else {
|
} else {
|
||||||
document.getElementById("limitContentProcess").disabled = true;
|
document.getElementById("limitContentProcess").disabled = true;
|
||||||
document.getElementById("contentProcessCount").disabled = true;
|
document.getElementById("contentProcessCount").disabled = true;
|
||||||
document.getElementById(
|
document.getElementById("contentProcessCountEnabledDescription").hidden =
|
||||||
"contentProcessCountEnabledDescription"
|
true;
|
||||||
).hidden = true;
|
document.getElementById("contentProcessCountDisabledDescription").hidden =
|
||||||
document.getElementById(
|
false;
|
||||||
"contentProcessCountDisabledDescription"
|
|
||||||
).hidden = false;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1549,12 +1549,10 @@ var gPrivacyPane = {
|
|||||||
|
|
||||||
// Hide all cookie options first, until we learn which one should be showing.
|
// Hide all cookie options first, until we learn which one should be showing.
|
||||||
document.querySelector(selector + " .all-cookies-option").hidden = true;
|
document.querySelector(selector + " .all-cookies-option").hidden = true;
|
||||||
document.querySelector(
|
document.querySelector(selector + " .unvisited-cookies-option").hidden =
|
||||||
selector + " .unvisited-cookies-option"
|
true;
|
||||||
).hidden = true;
|
document.querySelector(selector + " .cross-site-cookies-option").hidden =
|
||||||
document.querySelector(
|
true;
|
||||||
selector + " .cross-site-cookies-option"
|
|
||||||
).hidden = true;
|
|
||||||
document.querySelector(
|
document.querySelector(
|
||||||
selector + " .third-party-tracking-cookies-option"
|
selector + " .third-party-tracking-cookies-option"
|
||||||
).hidden = true;
|
).hidden = true;
|
||||||
@@ -1570,24 +1568,20 @@ var gPrivacyPane = {
|
|||||||
// Note "cookieBehavior0", will result in no UI changes, so is not listed here.
|
// Note "cookieBehavior0", will result in no UI changes, so is not listed here.
|
||||||
switch (item) {
|
switch (item) {
|
||||||
case "tp":
|
case "tp":
|
||||||
document.querySelector(
|
document.querySelector(selector + " .trackers-option").hidden =
|
||||||
selector + " .trackers-option"
|
false;
|
||||||
).hidden = false;
|
|
||||||
break;
|
break;
|
||||||
case "-tp":
|
case "-tp":
|
||||||
document.querySelector(
|
document.querySelector(selector + " .trackers-option").hidden =
|
||||||
selector + " .trackers-option"
|
true;
|
||||||
).hidden = true;
|
|
||||||
break;
|
break;
|
||||||
case "tpPrivate":
|
case "tpPrivate":
|
||||||
document.querySelector(
|
document.querySelector(selector + " .pb-trackers-option").hidden =
|
||||||
selector + " .pb-trackers-option"
|
false;
|
||||||
).hidden = false;
|
|
||||||
break;
|
break;
|
||||||
case "-tpPrivate":
|
case "-tpPrivate":
|
||||||
document.querySelector(
|
document.querySelector(selector + " .pb-trackers-option").hidden =
|
||||||
selector + " .pb-trackers-option"
|
true;
|
||||||
).hidden = true;
|
|
||||||
break;
|
break;
|
||||||
case "fp":
|
case "fp":
|
||||||
document.querySelector(
|
document.querySelector(
|
||||||
@@ -1600,14 +1594,12 @@ var gPrivacyPane = {
|
|||||||
).hidden = true;
|
).hidden = true;
|
||||||
break;
|
break;
|
||||||
case "cm":
|
case "cm":
|
||||||
document.querySelector(
|
document.querySelector(selector + " .cryptominers-option").hidden =
|
||||||
selector + " .cryptominers-option"
|
false;
|
||||||
).hidden = false;
|
|
||||||
break;
|
break;
|
||||||
case "-cm":
|
case "-cm":
|
||||||
document.querySelector(
|
document.querySelector(selector + " .cryptominers-option").hidden =
|
||||||
selector + " .cryptominers-option"
|
true;
|
||||||
).hidden = true;
|
|
||||||
break;
|
break;
|
||||||
case "stp":
|
case "stp":
|
||||||
// Store social tracking cookies pref
|
// Store social tracking cookies pref
|
||||||
@@ -1622,9 +1614,8 @@ var gPrivacyPane = {
|
|||||||
break;
|
break;
|
||||||
case "-stp":
|
case "-stp":
|
||||||
// Store social tracking cookies pref
|
// Store social tracking cookies pref
|
||||||
document.querySelector(
|
document.querySelector(selector + " .social-media-option").hidden =
|
||||||
selector + " .social-media-option"
|
true;
|
||||||
).hidden = true;
|
|
||||||
break;
|
break;
|
||||||
case "cookieBehavior1":
|
case "cookieBehavior1":
|
||||||
document.querySelector(
|
document.querySelector(
|
||||||
@@ -1632,9 +1623,8 @@ var gPrivacyPane = {
|
|||||||
).hidden = false;
|
).hidden = false;
|
||||||
break;
|
break;
|
||||||
case "cookieBehavior2":
|
case "cookieBehavior2":
|
||||||
document.querySelector(
|
document.querySelector(selector + " .all-cookies-option").hidden =
|
||||||
selector + " .all-cookies-option"
|
false;
|
||||||
).hidden = false;
|
|
||||||
break;
|
break;
|
||||||
case "cookieBehavior3":
|
case "cookieBehavior3":
|
||||||
document.querySelector(
|
document.querySelector(
|
||||||
|
|||||||
@@ -1461,9 +1461,10 @@ class DefaultEngineDropDown {
|
|||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let defaultEngine = await Services.search[
|
let defaultEngine =
|
||||||
this.#type == "normal" ? "getDefault" : "getDefaultPrivate"
|
await Services.search[
|
||||||
]();
|
this.#type == "normal" ? "getDefault" : "getDefaultPrivate"
|
||||||
|
]();
|
||||||
|
|
||||||
this.#element.removeAllItems();
|
this.#element.removeAllItems();
|
||||||
for (let engine of enginesList) {
|
for (let engine of enginesList) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
# 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/.
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
-->
|
-->
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" class="private">
|
<html xmlns="http://www.w3.org/1999/xhtml" class="private">
|
||||||
<head>
|
<head>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
<!-- 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,
|
- 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/. -->
|
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html
|
<html
|
||||||
xmlns="http://www.w3.org/1999/xhtml"
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
role="document"
|
role="document"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
<!-- 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,
|
- 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/. -->
|
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html
|
<html
|
||||||
xmlns="http://www.w3.org/1999/xhtml"
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
role="document"
|
role="document"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
<!-- 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,
|
- 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/. -->
|
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html
|
<html
|
||||||
xmlns="http://www.w3.org/1999/xhtml"
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
role="document"
|
role="document"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
<!-- 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,
|
- 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/. -->
|
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html
|
<html
|
||||||
xmlns="http://www.w3.org/1999/xhtml"
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
role="document"
|
role="document"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- 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/. -->
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
<!-- 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,
|
- 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/. -->
|
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
|
|||||||
@@ -90,9 +90,8 @@ add_task(async function dragTest1Point5Zoom() {
|
|||||||
|
|
||||||
result.zoom = zoom;
|
result.zoom = zoom;
|
||||||
result.devicePixelRatio = window.devicePixelRatio;
|
result.devicePixelRatio = window.devicePixelRatio;
|
||||||
result.contentDevicePixelRatio = await getContentDevicePixelRatio(
|
result.contentDevicePixelRatio =
|
||||||
browser
|
await getContentDevicePixelRatio(browser);
|
||||||
);
|
|
||||||
|
|
||||||
info("result: " + JSON.stringify(result, null, 2));
|
info("result: " + JSON.stringify(result, null, 2));
|
||||||
|
|
||||||
|
|||||||
@@ -1920,9 +1920,8 @@ class SERPCategorizer {
|
|||||||
for (let domain of domains) {
|
for (let domain of domains) {
|
||||||
domainsCount++;
|
domainsCount++;
|
||||||
|
|
||||||
let categoryCandidates = await SearchSERPDomainToCategoriesMap.get(
|
let categoryCandidates =
|
||||||
domain
|
await SearchSERPDomainToCategoriesMap.get(domain);
|
||||||
);
|
|
||||||
|
|
||||||
if (!categoryCandidates.length) {
|
if (!categoryCandidates.length) {
|
||||||
unknownsCount++;
|
unknownsCount++;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user