Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the requestAnimationFrame work-around in L10n.prototype.destroy (PR 18313 follow-up) #18333

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"@babel/preset-env": "^7.24.7",
"@babel/runtime": "^7.24.7",
"@fluent/bundle": "^0.18.0",
"@fluent/dom": "^0.9.0",
"@fluent/dom": "^0.10.0",
"@jazzer.js/core": "^2.1.0",
"@metalsmith/layouts": "^2.7.0",
"@metalsmith/markdown": "^1.10.0",
Expand Down
6 changes: 1 addition & 5 deletions test/integration/stamp_editor_spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -559,12 +559,8 @@ describe("Stamp Editor", () => {
});

afterAll(async () => {
// Close the pages in reverse order because the second document will have
// focus at the end of the test and the `testingClose` method requires
// (via `requestAnimationFrame` usage in the `this.l10n.destroy()` call)
// that the page it's called on has focus.
await closePages(pages2);
await closePages(pages1);
await closePages(pages2);
});

it("must check that the alt-text button is here when pasting in the second tab", async () => {
Expand Down
7 changes: 0 additions & 7 deletions web/l10n.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,6 @@ class L10n {
}
this.#elements.clear();
this.#l10n.pauseObserving();

// Since `disconnectRoot`/`pauseObserving` can still trigger asynchronous
// operations, without any way to actually cancel them, attempt to
// workaround timing issues when closing the integration-tests.
await new Promise(resolve => {
window.requestAnimationFrame(resolve);
});
}

/** @inheritdoc */
Expand Down