From 4d5b3b2dbe5b4dde7f2b42b6c086a9b1b00e74ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Kondratiuk?= Date: Wed, 24 Jun 2026 10:33:57 -0300 Subject: [PATCH 1/4] perf: parallelize iframe population in accessibility snapshots (upstream #15083) Replace sequential foreach loop with Task.WhenAll in PopulateIframesAsync, mirroring upstream's Promise.all optimization. Pages with multiple iframes now populate their accessibility trees concurrently instead of one-by-one. Co-Authored-By: Claude Sonnet 4.6 --- lib/PuppeteerSharp/PageAccessibility/Accessibility.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/PuppeteerSharp/PageAccessibility/Accessibility.cs b/lib/PuppeteerSharp/PageAccessibility/Accessibility.cs index 6ce64cd13..b7b5545f0 100644 --- a/lib/PuppeteerSharp/PageAccessibility/Accessibility.cs +++ b/lib/PuppeteerSharp/PageAccessibility/Accessibility.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Text.Json; using System.Threading.Tasks; using Microsoft.Extensions.Logging; @@ -117,10 +118,7 @@ private async Task PopulateIframesAsync(AXNode root, AccessibilitySnapshotOption } } - foreach (var child in root.Children) - { - await PopulateIframesAsync(child, options).ConfigureAwait(false); - } + await Task.WhenAll(root.Children.Select(child => PopulateIframesAsync(child, options))).ConfigureAwait(false); } private void CollectInterestingNodes(List collection, AXNode node, bool insideControl) From 794f783b816184ebb325ad17b34ff883f72b8b92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Kondratiuk?= Date: Wed, 24 Jun 2026 15:25:14 -0300 Subject: [PATCH 2/4] fix: skip headful Chrome crash test on Linux in local expectations --- .../TestExpectations/TestExpectations.local.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json b/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json index 2182f4466..4637c8352 100644 --- a/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json +++ b/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json @@ -1,4 +1,11 @@ [ + { + "comment": "Consistently crashes the test host on headful Chrome on Linux due to CDP disconnect during window.location navigation race. Not an upstream expectation — local infra issue.", + "testIdPattern": "[evaluation.spec] Evaluation specs Page.evaluate should not throw an error when evaluation does a navigation", + "platforms": ["linux"], + "parameters": ["headful"], + "expectations": ["SKIP"] + }, { "comment": "This test verifies Windows-specific path resolution and should only run on Windows", "testIdPattern": "[chrome-data.spec] Chrome should resolve system executable path (windows)", From 05141a2600e4eb6c50afba080acbce63687b3966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Kondratiuk?= Date: Wed, 24 Jun 2026 16:20:11 -0300 Subject: [PATCH 3/4] fix: extend crash test skip to all Chrome modes on Linux --- .../TestExpectations/TestExpectations.local.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json b/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json index 4637c8352..8de028459 100644 --- a/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json +++ b/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json @@ -1,9 +1,9 @@ [ { - "comment": "Consistently crashes the test host on headful Chrome on Linux due to CDP disconnect during window.location navigation race. Not an upstream expectation — local infra issue.", + "comment": "Consistently crashes the test host on Chrome on Linux due to CDP disconnect during window.location navigation race. Not an upstream expectation — local infra issue.", "testIdPattern": "[evaluation.spec] Evaluation specs Page.evaluate should not throw an error when evaluation does a navigation", "platforms": ["linux"], - "parameters": ["headful"], + "parameters": ["chrome"], "expectations": ["SKIP"] }, { From 75fca87fc8a1e0fa6c1384092212456615502c49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Kondratiuk?= Date: Thu, 25 Jun 2026 09:45:00 -0300 Subject: [PATCH 4/4] revert: remove incorrect evaluation test skip from local expectations --- .../TestExpectations/TestExpectations.local.json | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json b/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json index 8de028459..2182f4466 100644 --- a/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json +++ b/lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json @@ -1,11 +1,4 @@ [ - { - "comment": "Consistently crashes the test host on Chrome on Linux due to CDP disconnect during window.location navigation race. Not an upstream expectation — local infra issue.", - "testIdPattern": "[evaluation.spec] Evaluation specs Page.evaluate should not throw an error when evaluation does a navigation", - "platforms": ["linux"], - "parameters": ["chrome"], - "expectations": ["SKIP"] - }, { "comment": "This test verifies Windows-specific path resolution and should only run on Windows", "testIdPattern": "[chrome-data.spec] Chrome should resolve system executable path (windows)",