// call.mjs — a real call, in a real browser. // // Driven by TestCallInARealBrowser, which starts the app on a real // port, signs the two members in through the magic-link flow, creates // the meeting, and hands this script the origin, the meeting id and the // scenario to run. // // node test/browser/call.mjs // // The secrets do not travel on argv, where every process on the box can // read them off /proc: the session cookies and the meeting's join-link // token arrive in the environment, as CALLS_COOKIE_NAME, CALLS_COOKIE_A, // CALLS_COOKIE_B and CALLS_JOIN_TOKEN. // // One scenario per process. Every assertion prints one line; the exit // code is the gate. // // Two things this script cannot do for itself, and asks Go for over its // own stdin and stdout: read the mail recorder (a guest signs itself in // from the browser, and only Go can see the link that was mailed), and // restart the app. Both go out as a line beginning "CONTROL " and come // back as one line. // // Chromium's flags are not decoration. --use-fake-device-for-media-stream // gives every context a camera and a microphone that always work; // --use-fake-ui-for-media-stream answers the permission prompt; // --autoplay-policy=no-user-gesture-required lets a remote