Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): sign-in and captchas work again in desktop browser tabs #16939

Mergedjuliusmarmingemerged 1 commit intomain fromrefs/pull/16939/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 29 additions and 2 deletions.

x
0 of 2 viewed, 2 left
22 additions and 0 deletionsapps/desktop/src/preview/CdpRelay.test.tsModified
View file
@@ -75,6 +75,28 @@
});
});
​
+ it("resumes paused child frames, so cross-site iframes run", async () => {
+ const send = vi.fn(async () => ({}));
+ const relay = createCdpRelayConnection(makeTarget(send), () => {});
+ // The page's own session is already running; only its children wait.
+ relay.receive(
+ JSON.stringify({
+ id: 1,
+ method: "Runtime.runIfWaitingForDebugger",
+ sessionId: "t3-preview-page",
+ }),
+ );
+ relay.receive(
+ JSON.stringify({
+ id: 2,
+ method: "Runtime.runIfWaitingForDebugger",
+ sessionId: "iframe-session",
+ }),
+ );
+ await settle();
+ expect(send.mock.calls).toEqual([["Runtime.runIfWaitingForDebugger", {}, "iframe-session"]]);
+ });
+​
it("routes tab events to the page session once the page is announced", async () => {
const written: Array<Record<string, unknown>> = [];
const relay = createCdpRelayConnection(makeTarget(vi.fn()), (raw) =>