diff options
| author | Igor Soarez <igor@soarez.org> | 2026-11-08 16:10:10 +0000 |
|---|---|---|
| committer | Igor Soarez <igor@soarez.org> | 2026-11-08 16:10:10 +0000 |
| commit | 69d7159eef27d541cf01ea3ea1471ef0ce3a7677 (patch) | |
| tree | 83c710c67e964b96da91b68c3825bc94a2ab24ea /test-suite/unit | |
| parent | 56356bd3400c104eb0b7af1322ff515c155ef7a4 (diff) | |
overlay.clear: run in the page's own world with the click the fallback uses
The isolated-world body events did not free a 1Password-blocked tab; the DOM
click fallback (MAIN world, full pointer event shape, el.click()) did. Use that
shape, aimed at the page root so no control is clicked.
Diffstat (limited to 'test-suite/unit')
| -rw-r--r-- | test-suite/unit/overlay.test.mjs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test-suite/unit/overlay.test.mjs b/test-suite/unit/overlay.test.mjs index a4247b3..87c8fb9 100644 --- a/test-suite/unit/overlay.test.mjs +++ b/test-suite/unit/overlay.test.mjs @@ -52,6 +52,7 @@ test("overlay.clear removes the frame and reports the tab usable", async () => { assert.deepEqual(result.removedFrames, ["chrome-extension://aeblf/inline/universal-sign-on/x.html"]); assert.equal(result.debuggerAttachable, true); assert.equal(calls[0].options.args[0], "ours"); + assert.equal(calls[0].options.world, "MAIN"); }); test("overlay.clear says so when the tab is still blocked (toolbar popup, desktop app)", async () => { @@ -73,7 +74,7 @@ test("the injected clean-up removes foreign extension iframes, not ours, and blu let blurred = false, escaped = false; const bodyEvents = []; const sandbox = { - document: { querySelectorAll: () => [foreign, ours, page, host], activeElement: { blur: () => { blurred = true; } }, body: { dispatchEvent: (e) => { bodyEvents.push(e.type); } }, dispatchEvent: (e) => { escaped = e.key === "Escape"; } }, + document: { querySelectorAll: () => [foreign, ours, page, host], activeElement: { blur: () => { blurred = true; } }, body: {}, documentElement: { dispatchEvent: (e) => { bodyEvents.push(e.type); }, click: () => { bodyEvents.push("click"); } }, dispatchEvent: (e) => { escaped = e.key === "Escape"; } }, KeyboardEvent: class { constructor(type, init) { this.type = type; Object.assign(this, init); } }, MouseEvent: class { constructor(type) { this.type = type; } }, PointerEvent: class { constructor(type) { this.type = type; } }, |
