Skip to content

Commit 130a655

Browse files
committed
Bug 1826062 - Automatic fixes for upgrading Prettier to 2.8.8. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,calu
Differential Revision: https://phabricator.services.mozilla.com/D177027
1 parent 12189bf commit 130a655

File tree

2,220 files changed

+32634
-200721
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,220 files changed

+32634
-200721
lines changed

accessible/tests/browser/bounds/browser_test_display_contents.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,8 @@
77
/* import-globals-from ../../mochitest/layout.js */
88

99
async function testContentBounds(browser, acc) {
10-
let [
11-
expectedX,
12-
expectedY,
13-
expectedWidth,
14-
expectedHeight,
15-
] = await getContentBoundsForDOMElm(browser, getAccessibleDOMNodeID(acc));
10+
let [expectedX, expectedY, expectedWidth, expectedHeight] =
11+
await getContentBoundsForDOMElm(browser, getAccessibleDOMNodeID(acc));
1612

1713
let contentDPR = await getContentDPR(browser);
1814
let [x, y, width, height] = getBounds(acc, contentDPR);

accessible/tests/browser/bounds/browser_test_simple_transform.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,10 @@ addAccessibleTask(
131131
async function (browser, docAcc) {
132132
const tree = { TEXT_CONTAINER: [{ PARAGRAPH: [{ TEXT_LEAF: [] }] }] };
133133

134-
const divWithTransform = findAccessibleChildByID(docAcc, "container")
135-
.firstChild;
134+
const divWithTransform = findAccessibleChildByID(
135+
docAcc,
136+
"container"
137+
).firstChild;
136138
testAccessibleTree(divWithTransform, tree);
137139
// testBoundsWithContent takes an id, but divWithTransform doesn't have one,
138140
// so we can't test the bounds for it.

accessible/tests/browser/bounds/browser_test_zoom.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,8 @@
77
/* import-globals-from ../../mochitest/layout.js */
88

99
async function testContentBounds(browser, acc) {
10-
let [
11-
expectedX,
12-
expectedY,
13-
expectedWidth,
14-
expectedHeight,
15-
] = await getContentBoundsForDOMElm(browser, getAccessibleDOMNodeID(acc));
10+
let [expectedX, expectedY, expectedWidth, expectedHeight] =
11+
await getContentBoundsForDOMElm(browser, getAccessibleDOMNodeID(acc));
1612

1713
let contentDPR = await getContentDPR(browser);
1814
let [x, y, width, height] = getBounds(acc, contentDPR);

accessible/tests/browser/browser_shutdown_parent_own_reference.js

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ add_task(async function () {
3232
// Create a11y service in the main process. This will trigger creating of
3333
// the a11y service in parent as well.
3434
const [parentA11yInitObserver, parentA11yInit] = initAccService();
35-
const [contentA11yInitObserver, contentA11yInit] = initAccService(
36-
browser
37-
);
35+
const [contentA11yInitObserver, contentA11yInit] =
36+
initAccService(browser);
3837

3938
await Promise.all([parentA11yInitObserver, contentA11yInitObserver]);
4039

@@ -61,10 +60,8 @@ add_task(async function () {
6160
// This promise will resolve only if contentCanShutdown flag is set to true.
6261
// If 'a11y-init-or-shutdown' event with '0' flag (in content) comes before
6362
// it can be shut down, the promise will reject.
64-
const [
65-
contentA11yShutdownObserver,
66-
contentA11yShutdownPromise,
67-
] = shutdownAccService(browser);
63+
const [contentA11yShutdownObserver, contentA11yShutdownPromise] =
64+
shutdownAccService(browser);
6865
await contentA11yShutdownObserver;
6966
const contentA11yShutdown = new Promise((resolve, reject) =>
7067
contentA11yShutdownPromise.then(flag =>
@@ -87,10 +84,8 @@ add_task(async function () {
8784
// Now allow a11y service to shutdown in content.
8885
contentCanShutdown = true;
8986
// Remove the a11y service reference in the main process.
90-
const [
91-
parentA11yShutdownObserver,
92-
parentA11yShutdown,
93-
] = shutdownAccService();
87+
const [parentA11yShutdownObserver, parentA11yShutdown] =
88+
shutdownAccService();
9489
await parentA11yShutdownObserver;
9590

9691
accService = null;

accessible/tests/browser/browser_shutdown_remote_no_reference.js

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,12 @@ add_task(async function () {
3232
// Create a11y service in the main process. This will trigger creating of
3333
// the a11y service in parent as well.
3434
const [parentA11yInitObserver, parentA11yInit] = initAccService();
35-
const [contentA11yInitObserver, contentA11yInit] = initAccService(
36-
browser
37-
);
38-
let [
39-
parentConsumersChangedObserver,
40-
parentConsumersChanged,
41-
] = accConsumersChanged();
42-
let [
43-
contentConsumersChangedObserver,
44-
contentConsumersChanged,
45-
] = accConsumersChanged(browser);
35+
const [contentA11yInitObserver, contentA11yInit] =
36+
initAccService(browser);
37+
let [parentConsumersChangedObserver, parentConsumersChanged] =
38+
accConsumersChanged();
39+
let [contentConsumersChangedObserver, contentConsumersChanged] =
40+
accConsumersChanged(browser);
4641

4742
await Promise.all([
4843
parentA11yInitObserver,
@@ -94,22 +89,14 @@ add_task(async function () {
9489
"down in content"
9590
);
9691
// Remove a11y service reference in the main process.
97-
const [
98-
parentA11yShutdownObserver,
99-
parentA11yShutdown,
100-
] = shutdownAccService();
101-
const [
102-
contentA11yShutdownObserver,
103-
contentA11yShutdown,
104-
] = shutdownAccService(browser);
105-
[
106-
parentConsumersChangedObserver,
107-
parentConsumersChanged,
108-
] = accConsumersChanged();
109-
[
110-
contentConsumersChangedObserver,
111-
contentConsumersChanged,
112-
] = accConsumersChanged(browser);
92+
const [parentA11yShutdownObserver, parentA11yShutdown] =
93+
shutdownAccService();
94+
const [contentA11yShutdownObserver, contentA11yShutdown] =
95+
shutdownAccService(browser);
96+
[parentConsumersChangedObserver, parentConsumersChanged] =
97+
accConsumersChanged();
98+
[contentConsumersChangedObserver, contentConsumersChanged] =
99+
accConsumersChanged(browser);
113100

114101
await Promise.all([
115102
parentA11yShutdownObserver,

accessible/tests/browser/browser_shutdown_remote_own_reference.js

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,10 @@ add_task(async function () {
3232
// Create a11y service in the main process. This will trigger creating of
3333
// the a11y service in parent as well.
3434
const [parentA11yInitObserver, parentA11yInit] = initAccService();
35-
const [contentA11yInitObserver, contentA11yInit] = initAccService(
36-
browser
37-
);
38-
let [
39-
contentConsumersChangedObserver,
40-
contentConsumersChanged,
41-
] = accConsumersChanged(browser);
35+
const [contentA11yInitObserver, contentA11yInit] =
36+
initAccService(browser);
37+
let [contentConsumersChangedObserver, contentConsumersChanged] =
38+
accConsumersChanged(browser);
4239

4340
await Promise.all([
4441
parentA11yInitObserver,
@@ -67,10 +64,8 @@ add_task(async function () {
6764
"Adding additional reference to accessibility service in content " +
6865
"process"
6966
);
70-
[
71-
contentConsumersChangedObserver,
72-
contentConsumersChanged,
73-
] = accConsumersChanged(browser);
67+
[contentConsumersChangedObserver, contentConsumersChanged] =
68+
accConsumersChanged(browser);
7469
await contentConsumersChangedObserver;
7570
// Add a new reference to the a11y service inside the content process.
7671
await SpecialPowers.spawn(browser, [], () => {
@@ -106,21 +101,15 @@ add_task(async function () {
106101
"content stays alive"
107102
);
108103
let contentCanShutdown = false;
109-
const [
110-
parentA11yShutdownObserver,
111-
parentA11yShutdown,
112-
] = shutdownAccService();
113-
[
114-
contentConsumersChangedObserver,
115-
contentConsumersChanged,
116-
] = accConsumersChanged(browser);
104+
const [parentA11yShutdownObserver, parentA11yShutdown] =
105+
shutdownAccService();
106+
[contentConsumersChangedObserver, contentConsumersChanged] =
107+
accConsumersChanged(browser);
117108
// This promise will resolve only if contentCanShutdown flag is set to true.
118109
// If 'a11y-init-or-shutdown' event with '0' flag (in content) comes before
119110
// it can be shut down, the promise will reject.
120-
const [
121-
contentA11yShutdownObserver,
122-
contentA11yShutdownPromise,
123-
] = shutdownAccService(browser);
111+
const [contentA11yShutdownObserver, contentA11yShutdownPromise] =
112+
shutdownAccService(browser);
124113
const contentA11yShutdown = new Promise((resolve, reject) =>
125114
contentA11yShutdownPromise.then(flag =>
126115
contentCanShutdown
@@ -164,10 +153,8 @@ add_task(async function () {
164153
info("Removing a service in content");
165154
// Now allow a11y service to shutdown in content.
166155
contentCanShutdown = true;
167-
[
168-
contentConsumersChangedObserver,
169-
contentConsumersChanged,
170-
] = accConsumersChanged(browser);
156+
[contentConsumersChangedObserver, contentConsumersChanged] =
157+
accConsumersChanged(browser);
171158
await contentConsumersChangedObserver;
172159
// Remove last reference to a11y service in content and force garbage
173160
// collection that should trigger shutdown.

accessible/tests/browser/e10s/browser_caching_description.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ const tests = [
6060
expected: "another description",
6161
},
6262
{
63-
desc:
64-
"No description change when @alt is dropped but @aria-describedby remains",
63+
desc: "No description change when @alt is dropped but @aria-describedby remains",
6564
attrs: [
6665
{
6766
attr: "alt",

accessible/tests/browser/e10s/browser_caching_value.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ const valueTests = [
9696
expected: ["hey!", 6, 0, 7, 0],
9797
},
9898
{
99-
desc:
100-
"Value should change to @aria-valuetext when @aria-valuenow is removed",
99+
desc: "Value should change to @aria-valuetext when @aria-valuenow is removed",
101100
id: "slider",
102101
attrs: [
103102
{

accessible/tests/browser/e10s/browser_events_textchange.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ async function changeText(browser, id, value, events) {
4242
);
4343
// Change text in the subtree.
4444
await invokeContentTask(browser, [id, value], (contentId, contentValue) => {
45-
content.document.getElementById(
46-
contentId
47-
).firstChild.textContent = contentValue;
45+
content.document.getElementById(contentId).firstChild.textContent =
46+
contentValue;
4847
});
4948
let resolvedEvents = await onEvents;
5049

accessible/tests/browser/e10s/browser_treeupdate_doc.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,8 @@ addAccessibleTask(
220220
reorderEventPromise = waitForEvent(EVENT_REORDER, iframe);
221221
await invokeContentTask(browser, [], () => {
222222
let docNode = content.document.getElementById("iframe").contentDocument;
223-
let inputNode = (content.window.inputNode = docNode.createElement(
224-
"input"
225-
));
223+
let inputNode = (content.window.inputNode =
224+
docNode.createElement("input"));
226225
docNode.documentElement.appendChild(inputNode);
227226
});
228227
event = await reorderEventPromise;
@@ -238,8 +237,9 @@ addAccessibleTask(
238237

239238
reorderEventPromise = waitForEvent(EVENT_REORDER, iframe);
240239
await invokeContentTask(browser, [], () => {
241-
let docEl = content.document.getElementById("iframe").contentDocument
242-
.documentElement;
240+
let docEl =
241+
content.document.getElementById("iframe").contentDocument
242+
.documentElement;
243243
// Remove aftermath of this test before next test starts.
244244
docEl.firstChild.remove();
245245
});

accessible/tests/browser/mac/browser_app.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,7 @@ add_task(async () => {
245245
await BrowserTestUtils.withNewTab(
246246
{
247247
gBrowser,
248-
url:
249-
'data:text/html,<a id="exampleLink" href="https://example.com">link</a>',
248+
url: 'data:text/html,<a id="exampleLink" href="https://example.com">link</a>',
250249
},
251250
async browser => {
252251
if (!Services.search.isInitialized) {

accessible/tests/browser/mac/browser_text_input.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,8 @@ function matchWebArea(expectedId, expectedInfo) {
7878
return false;
7979
}
8080

81-
let textChangeElemID = data.AXTextChangeElement.getAttributeValue(
82-
"AXDOMIdentifier"
83-
);
81+
let textChangeElemID =
82+
data.AXTextChangeElement.getAttributeValue("AXDOMIdentifier");
8483

8584
return (
8685
iface.getAttributeValue("AXRole") == "AXWebArea" &&

accessible/tests/browser/telemetry/browser_HCM_telemetry.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ function reset() {
3434

3535
async function openColorsDialog() {
3636
await openPreferencesViaOpenPreferencesAPI("general", { leaveOpen: true });
37-
const colorsButton = gBrowser.selectedBrowser.contentDocument.getElementById(
38-
"colors"
39-
);
37+
const colorsButton =
38+
gBrowser.selectedBrowser.contentDocument.getElementById("colors");
4039

4140
const dialogOpened = promiseLoadSubDialog(
4241
"chrome://browser/content/preferences/dialogs/colors.xhtml"

accessible/tests/browser/tree/browser_aria_owns.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -219,25 +219,25 @@ addAccessibleTask(
219219
}
220220
);
221221

222-
addAccessibleTask(`<div id="a"></div><div id="b"></div>`, async function (
223-
browser,
224-
accDoc
225-
) {
226-
testChildrenIds(accDoc, ["a", "b"]);
227-
228-
let waitFor = {
229-
expected: [[EVENT_REORDER, e => e.accessible == accDoc]],
230-
};
231-
232-
await contentSpawnMutation(browser, waitFor, function () {
233-
content.document.documentElement.style.display = "none";
234-
content.document.documentElement.getBoundingClientRect();
235-
content.document.body.setAttribute("aria-owns", "b a");
236-
content.document.documentElement.remove();
237-
});
238-
239-
testChildrenIds(accDoc, []);
240-
});
222+
addAccessibleTask(
223+
`<div id="a"></div><div id="b"></div>`,
224+
async function (browser, accDoc) {
225+
testChildrenIds(accDoc, ["a", "b"]);
226+
227+
let waitFor = {
228+
expected: [[EVENT_REORDER, e => e.accessible == accDoc]],
229+
};
230+
231+
await contentSpawnMutation(browser, waitFor, function () {
232+
content.document.documentElement.style.display = "none";
233+
content.document.documentElement.getBoundingClientRect();
234+
content.document.body.setAttribute("aria-owns", "b a");
235+
content.document.documentElement.remove();
236+
});
237+
238+
testChildrenIds(accDoc, []);
239+
}
240+
);
241241

242242
// Don't allow ordinal child to be placed after aria-owned child (bug 1405796)
243243
addAccessibleTask(

accessible/tests/browser/tree/browser_test_nsIAccessibleDocument_URL.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ add_task(async function testInHTTPSURIContainingPrivateThings() {
4242
"https://username:password@example.com/browser/toolkit/content/tests/browser/file_empty.html?query=some#ref";
4343
const kURLWithoutUserPass =
4444
"https://example.com/browser/toolkit/content/tests/browser/file_empty.html?query=some#ref";
45-
const waitForDocumentLoadComplete = promiseEventDocumentLoadComplete(
46-
kURLWithoutUserPass
47-
);
45+
const waitForDocumentLoadComplete =
46+
promiseEventDocumentLoadComplete(kURLWithoutUserPass);
4847
await BrowserTestUtils.withNewTab(kURL, async browser => {
4948
is(
5049
(await waitForDocumentLoadComplete).URL,

accessible/tests/mochitest/autocomplete.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ function shutdownAutoComplete() {
4343
function registerAutoCompleteSearch(aSearch, aDescription) {
4444
var name = "@mozilla.org/autocomplete/search;1?name=" + aSearch.name;
4545

46-
var uuidGenerator = Cc["@mozilla.org/uuid-generator;1"].getService(
47-
nsIUUIDGenerator
48-
);
46+
var uuidGenerator =
47+
Cc["@mozilla.org/uuid-generator;1"].getService(nsIUUIDGenerator);
4948
var cid = uuidGenerator.generateUUID();
5049

5150
var componentManager = Components.manager.QueryInterface(

accessible/tests/mochitest/browser.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,13 @@ function openBrowserWindowIntl() {
119119
}
120120
}
121121

122-
gBrowserContext.browserWnd = window.browsingContext.topChromeWindow.openDialog(
123-
AppConstants.BROWSER_CHROME_URL,
124-
"_blank",
125-
params,
126-
gBrowserContext.startURL || "data:text/html,<html></html>"
127-
);
122+
gBrowserContext.browserWnd =
123+
window.browsingContext.topChromeWindow.openDialog(
124+
AppConstants.BROWSER_CHROME_URL,
125+
"_blank",
126+
params,
127+
gBrowserContext.startURL || "data:text/html,<html></html>"
128+
);
128129

129130
whenDelayedStartupFinished(browserWindow(), function () {
130131
addA11yLoadEvent(startBrowserTests, browserWindow());

accessible/tests/mochitest/common.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,8 +524,9 @@ function testAccessibleTree(aAccOrElmOrID, aAccTree, aFlags) {
524524
}
525525

526526
if (prevOffset != -1) {
527-
var charCount = getAccessible(acc, [nsIAccessibleText])
528-
.characterCount;
527+
var charCount = getAccessible(acc, [
528+
nsIAccessibleText,
529+
]).characterCount;
529530
let attrs = accTree[prop][prevOffset];
530531
testTextAttrs(
531532
acc,

0 commit comments

Comments
 (0)