playwright-core 1.55.0-alpha-2025-07-17 → 1.55.0-alpha-2025-07-19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/browsers.json CHANGED
@@ -15,15 +15,15 @@
15
15
  },
16
16
  {
17
17
  "name": "chromium-tip-of-tree",
18
- "revision": "1349",
18
+ "revision": "1350",
19
19
  "installByDefault": false,
20
- "browserVersion": "140.0.7297.0"
20
+ "browserVersion": "140.0.7301.0"
21
21
  },
22
22
  {
23
23
  "name": "chromium-tip-of-tree-headless-shell",
24
- "revision": "1349",
24
+ "revision": "1350",
25
25
  "installByDefault": false,
26
- "browserVersion": "140.0.7297.0"
26
+ "browserVersion": "140.0.7301.0"
27
27
  },
28
28
  {
29
29
  "name": "firefox",
@@ -58,38 +58,11 @@ class BidiBrowser extends import_browser.Browser {
58
58
  const browser = new BidiBrowser(parent, transport, options);
59
59
  if (options.__testHookOnConnectToBrowser)
60
60
  await options.__testHookOnConnectToBrowser();
61
- let proxy;
62
- if (options.proxy) {
63
- proxy = {
64
- proxyType: "manual"
65
- };
66
- const url = new URL(options.proxy.server);
67
- switch (url.protocol) {
68
- case "http:":
69
- proxy.httpProxy = url.host;
70
- break;
71
- case "https:":
72
- proxy.httpsProxy = url.host;
73
- break;
74
- case "socks4:":
75
- proxy.socksProxy = url.host;
76
- proxy.socksVersion = 4;
77
- break;
78
- case "socks5:":
79
- proxy.socksProxy = url.host;
80
- proxy.socksVersion = 5;
81
- break;
82
- default:
83
- throw new Error("Invalid proxy server protocol: " + options.proxy.server);
84
- }
85
- if (options.proxy.bypass)
86
- proxy.noProxy = options.proxy.bypass.split(",");
87
- }
88
61
  browser._bidiSessionInfo = await browser._browserSession.send("session.new", {
89
62
  capabilities: {
90
63
  alwaysMatch: {
91
64
  acceptInsecureCerts: false,
92
- proxy,
65
+ proxy: getProxyConfiguration(options.proxy),
93
66
  unhandledPromptBehavior: {
94
67
  default: bidi.Session.UserPromptHandlerType.Ignore
95
68
  },
@@ -119,7 +92,8 @@ class BidiBrowser extends import_browser.Browser {
119
92
  }
120
93
  async doCreateNewContext(options) {
121
94
  const { userContext } = await this._browserSession.send("browser.createUserContext", {
122
- acceptInsecureCerts: options.ignoreHTTPSErrors
95
+ acceptInsecureCerts: options.ignoreHTTPSErrors,
96
+ proxy: getProxyConfiguration(options.proxy)
123
97
  });
124
98
  const context = new BidiBrowserContext(this, userContext, options);
125
99
  await context._initialize();
@@ -436,6 +410,35 @@ function toBidiSameSite(sameSite) {
436
410
  }
437
411
  return bidi.Network.SameSite.None;
438
412
  }
413
+ function getProxyConfiguration(proxySettings) {
414
+ if (!proxySettings)
415
+ return void 0;
416
+ const proxy = {
417
+ proxyType: "manual"
418
+ };
419
+ const url = new URL(proxySettings.server);
420
+ switch (url.protocol) {
421
+ case "http:":
422
+ proxy.httpProxy = url.host;
423
+ break;
424
+ case "https:":
425
+ proxy.sslProxy = url.host;
426
+ break;
427
+ case "socks4:":
428
+ proxy.socksProxy = url.host;
429
+ proxy.socksVersion = 4;
430
+ break;
431
+ case "socks5:":
432
+ proxy.socksProxy = url.host;
433
+ proxy.socksVersion = 5;
434
+ break;
435
+ default:
436
+ throw new Error("Invalid proxy server protocol: " + proxySettings.server);
437
+ }
438
+ if (proxySettings.bypass)
439
+ proxy.noProxy = proxySettings.bypass.split(",");
440
+ return proxy;
441
+ }
439
442
  var Network;
440
443
  ((Network2) => {
441
444
  let SameSite;