aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorTianren Dong <tianrendong.dtr@gmail.com>2026-09-28 20:19:57 -0400
committerGitHub <noreply@github.com>2026-09-28 20:19:57 -0400
commit72233686a3fb5fabc496dc301c85beaf8aec9f0b (patch)
tree813066f1694e887f10eb0effb3cb4f1b31e99e7a /test-suite
parent0192da77e06b6ee3d0ce04e9d43ea387372281ca (diff)
Drop the full-screen tab rule for automation targets (#27)
0.15.54 opened Pi's automation target as a tab in the user's window while it was full screen, assuming macOS would merge a new window into it as a hidden window tab. Chrome disables automatic window tabbing (app_controller_mac.mm), so that never happens; the hidden tabs came from the tab-group bug fixed in 0.15.56. Always prefer Pi's own window.
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/unit/hidden-input.test.mjs18
1 files changed, 9 insertions, 9 deletions
diff --git a/test-suite/unit/hidden-input.test.mjs b/test-suite/unit/hidden-input.test.mjs
index 4b45a49..874b5e5 100644
--- a/test-suite/unit/hidden-input.test.mjs
+++ b/test-suite/unit/hidden-input.test.mjs
@@ -111,15 +111,15 @@ test("visible pages, failed probes, and foreground tabs that become visible proc
});
// ---- automation target placement ----
-test("automation targets use a background tab, not a new window, while the user's window is full screen", async () => {
- const full = worker({ win: { id: 1, state: "fullscreen" } });
- await full.w.createAutomationTarget("s1", undefined);
- assert.equal(full.calls.some((c) => c.method === "windows.create"), false);
- assert.deepEqual(clone(full.calls.find((c) => c.method === "tabs.create").props), { url: "about:blank", active: false });
-
- const normal = worker({ win: { id: 1, state: "maximized" } });
- await normal.w.createAutomationTarget("s2", undefined);
- assert.deepEqual(clone(normal.calls.find((c) => c.method === "windows.create").props), { url: "about:blank", focused: false });
+test("automation targets get their own window even while the user's window is full screen", async () => {
+ // Chrome disables macOS automatic window tabbing, so a new window is never merged into the user's
+ // full-screen window; putting Pi's tab in the user's window would only lose isolation.
+ for (const state of ["fullscreen", "maximized"]) {
+ const h = worker({ win: { id: 1, state } });
+ await h.w.createAutomationTarget(`s-${state}`, undefined);
+ assert.deepEqual(clone(h.calls.find((c) => c.method === "windows.create").props), { url: "about:blank", focused: false }, state);
+ assert.equal(h.calls.some((c) => c.method === "tabs.create"), false, state);
+ }
});
// ---- input.debug ----