diff options
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; } }, |
