Conversation
kblok
marked this pull request as ready for review
September 2, 2026 20:30
kblok
commented
Sep 11, 2026
Comment on lines
+149
to
+169
| run: | | ||
| # List every test's fully-qualified name straight from the built | ||
| # assembly (dotnet test --list-tests only prints the bare method | ||
| # name, which collides across classes and isn't safe to filter on). | ||
| # $RUNNER_TEMP (not /tmp) so the path is already OS-native on Windows. | ||
| all_tests="$RUNNER_TEMP/all_tests.txt" | ||
| dotnet vstest src/PlaywrightNative.Tests/bin/Release/net10.0/PlaywrightNative.Tests.dll \ | ||
| /ListFullyQualifiedTests "/ListTestsTargetPath:$all_tests" | ||
| # Drop the trailing ".MethodName" (and any TestCase "(...)" suffix) | ||
| # to get one entry per test class, then assign classes to shards by | ||
| # position in a stable sort -- deterministic across the shardTotal | ||
| # jobs of a single run without the shards needing to coordinate. | ||
| all_classes="$RUNNER_TEMP/all_classes.txt" | ||
| sed -E 's/\.[A-Za-z0-9_]+(\([^)]*\))?$//' "$all_tests" | sort -u > "$all_classes" | ||
| echo "Discovered $(wc -l < "$all_classes") test classes" | ||
| shard_classes="$RUNNER_TEMP/shard_classes.txt" | ||
| awk -v shard="${{ matrix.shardIndex }}" -v total="${{ matrix.shardTotal }}" \ | ||
| 'NR % total == (shard - 1) { print }' "$all_classes" > "$shard_classes" | ||
| echo "Shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }}: $(wc -l < "$shard_classes") classes" | ||
| filter=$(awk '{ printf "%sFullyQualifiedName~%s.", (NR > 1 ? "|" : ""), $0 }' "$shard_classes") | ||
| echo "TEST_FILTER=$filter" >> "$GITHUB_ENV" |
Member
Author
There was a problem hiding this comment.
We can move this to a bash file
Map Meta+C/X/V/Z (and Shift+Meta+Z) to mac editing commands so contenteditable copy/cut/paste/undo work under Input.dispatchKeyEvent. Prefer raw upgraded-stream frames in OfficialServerWebSocket so application close codes are echoed instead of WebKit reporting 1006. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Run animation finish/restore in the same frame world so infinite animations resume after capture; await fonts.ready under screenshot timeout. Treat Missing injected script as a destroyed-context race so clicks retry across navigation. Synthesize loadingFailed for navigation 204 like upstream. Align ShouldWorkWithCsp with upstream swallow-and- assert-blocked behavior. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Public response body reads throw when the frame has navigated away even if prefetch cached bytes. Clock embedder performanceNow falls back to wall-clock elapsed when native Performance.now freezes after replace. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Ignore Target worker targets and use Worker.workerCreated only; clear workers on provisional commit; map worker Console JS errors to pageerror. Re-enable file-chooser intercept on provisional sessions and after main-frame navigations. Dispose locator action handles so RequestGC can collect detached nodes. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Handshake proxy without loopback bypass makes the browser send Proxy-Connection; drop those hop-by-hop headers from public request headers so they match the origin. Lock binding coalesce so concurrent duplicate Runtime.bindingCalled events share one host invocation. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Keep LocaleHandshakeProxy Latin1-safe so binary/UTF-8 continue postData survives loopback rewrite; reinject Proxy-Authorization on continue; omit invented Content-Length on default fulfill; fire-and-forget JSHandle dispose; stash evaluate results to avoid binding double-fire; reapply orientation after provisional swaps; rewrite local.playwright for APIRequest; treat fetcher INSTALLATION_COMPLETE as a cache hit. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Remove the injected 20ms ensureOpened fallback that raced Task.Run handlers and forwarded page frames before OnMessage was registered. Queue page messages until the handler completes, and wire HarRecorder.ObserveWebSocket via RoutedHarWebSocket on ConnectToServer so modified server-side frames are recorded. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Re-assert page focus after child-frame context is ready and after iframe navigations, and run child-frame thenables via callFunctionOn with emulateUserGesture so requestStorageAccess sees activation. Prefer CheckFunction (LABEL→control retarget) before ClickAsync so WebKit hit-test hangs no longer block check/uncheck. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Match upstream wkPage.ts: release buffered requestWillBeSent on loadingFailed without attaching a route, and continue orphan requestIntercepted events with Network.interceptWithRequest instead of parking them or re-invoking routes on already-materialized requests. Also skip data:/about: willBeSent and clone buffered payloads. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Force TLS 1.3 with HTTP/1.1-only ALPN on the playwright-test HTTPS fixture so HAR/securityDetails negotiate TLS 1.3 instead of 1.2. Harden the client-certificate MITM TLS error page for TLS 1.2 ClientHellos (explicit protocols + sync PrependStream reads), and treat local.playwright as localhost when matching APIRequest certs. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Race in-flight awaitPromise evaluates against executionContextDestroyed and stop retrying page.evaluate when navigation aborts mid-flight, so pending promises fail with the official navigation error instead of hanging. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Trailing semicolons on InitScript/install/remove IIFEs became SyntaxErrors
under WKExecutionContext's stash wrap (() => { const __pw_r = (EXPR); ... }),
so exposeFunction/evaluate callbacks never installed on current documents.
Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Kestrel TLS 1.3-only fails WebKit/mac handshakes ("An SSL error has
occurred"), which wiped the third-party cookie HTTPS suite. Offering
1.2 alongside 1.3 restores those navigations while keeping HTTP/1.1-only
ALPN; HAR/securityDetails still pass when the protocol field is empty
or TLS 1.3 is negotiated.
Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Stop wrapping the upgraded stream with ManagedWebSocket when OfficialServerWebSocket owns raw frames, start receive eagerly, and make LocaleHandshakeProxy tunnels half-close aware so application close codes can complete cleanly. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
cfNetwork never proxies localhost, so LocaleHandshakeProxy never saw ws://localhost upgrades and left Accept-Language as en-US. Install a macOS init shim that rewrites loopback WebSocket URLs (and Blob worker sources) to local.playwright; the handshake proxy maps that host back to localhost when connecting. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Binding coalesce keyed only on the JSON envelope, so main and child frames both calling cb(42) with seq=1 shared one host invocation. Scope the coalesce key by frame so same-frame world duplicates still dedupe while sibling frames each fire. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Clear page lifecycle before main-frame commit so waitForLoadState does not resolve from the previous document; resolve load/DOMContentLoaded waitForEvent inline and drain continuations when the state is already reached. Use Network.interceptContinue when continue headers are a no-op so macOS WebKit does not invent an extra wire header. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Route bare expressions like `1 + 1` through returnByValue serialize so Darwin avoids MaterializeAsync awaitPromise wedges. Wait for element visibility before screenshot decorations/fonts, and shorten the fonts budget. Retry destroyed-context frame evaluates after iframe goto. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Broad CanWrapExpression wrapping of any semicolon-free expression routed property-access evaluates (e.g. document.body.textContent) through returnByValue serialize and caused Darwin WebKit empty-stack timeouts. Keep wrapping only simple sync expressions like `1 + 1`. Remove the pre-CaptureAsync Stable wait so infinite CSS/Web animations can be frozen inside CaptureAsync before visibility/stable checks. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Darwin CFNetwork can leave document.cookie rows after a single expires:0 setCookies. Re-expire until getAllCookies is clean, expire leading-dot domain variants, and clear matched non-HttpOnly names via document.cookie Max-Age=0 on open pages (ShouldRemoveCookiesByNameRegex). Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Treat WebKit "Execution context is not yet available" as a destroyed/ navigating race so screenshot decorations retry and surface the official navigating error (ShouldWorkWhileNavigating). MaterializeAsync now reads inline number/boolean/string payloads instead of SerializeAwaitedJs, avoiding Darwin awaitPromise wedges on Date.now() / matchMedia. Cookie document.cookie clears use a wrappable IIFE. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Allow CanWrapExpression on sync IIFEs even when the body mentions
Promise/.then so clock kickoff stays on returnByValue and does not
deadlock Darwin awaitPromise. Strip trailing semicolons before
parenthesizing in WithSerializedResult so injectors like
`(() => {…})();` stay valid.
Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
…d cookies Promote and latch main-frame GET document responses even before Fetch marks TracksDocumentNavigation so concurrent-goto ERR_ABORTED recovery still finds the committed 200 under Windows suite load. Never fall back to the page main world for HTML5 drag setup/cleanup — that drops textarea text selection on headful Chromium. On Linux WebKit, reconcile empty-name cookie values from live document.cookie into CookiesAsync so Cookies→AddCookies roundtrips do not resurrect a stale protocol value. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Under Windows suite load a second Page.navigate can abort the first before Network.requestWillBeSent / frameNavigated, so concurrent-goto recovery never sees the committed 200. Track in-flight frame navigations and wait for the peer to start (and briefly for commit) before sending a superseding navigate; hung cancel/replace peers still abort after a short grace. Also flush handleJavaScriptDialog without an async state machine so fire-and-forget Accept from Dialog handlers schedules the CDP write promptly. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
sawTargetLifecycle could stay true after a later frameNavigated cleared LifecycleEvents to only commit, so GoTo returned without load present (GoToShouldClearLifecycleOnNewNavigation under Windows suite load). Require the target lifecycle to be currently recorded, reset the mid- navigate saw flag on new-document commits, and replay DCL/load for data: URLs that commit without a second loadEventFired. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
…vigated reset Require live lifecycle only for networkidle; keep sawTargetLifecycle OR Contains for other events so MITM/TLS and dialog paths do not hang, while clearing sawTargetLifecycle on new-document FrameNavigated and replaying data: DOMContentLoaded/load so GoToCannotClearLifecycle flakes stay fixed. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Keep sawTargetLifecycle OR Contains for non-networkidle so MITM/TLS
does not hang, but when GoTo resolves with only {commit} left in
LifecycleEvents, replay DOMContentLoaded/load so EmptyPage assertions
and waitUntil stay honest after a mid-wait FrameNavigated clear.
Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Skip ClearLifecycleEvents when frameNavigated repeats the same loaderId so a late re-commit cannot wipe load after GoTo resolved. Also ensure promised DCL/load is recorded on successful GoTo exit (including MITM). Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Validate full-page/clip dimensions against the 32767 device-pixel cap (same as WebKit) so a too-tall capture throws PlaywrightException instead of crashing the page, allowing scale:css retries to succeed. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
loadingFinished can race ahead of responseReceived on redirect hops and emit DONE before the 302 Response event. Skip the page requestfinished while Response is null so ShouldSupportRedirects sees GET,302,DONE. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
…timing loadingFinished removed navigations from the request map before Response arrived, so deferred requestfinished never resumed after fulfill/redirect races (RouteRequestUrl hang). Keep the entry until Response is attached. Also snap RequestStart/ResponseStart forward when WebKit float-rounds SSL timings a few sub-ms out of order (ShouldWorkForSsl). Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Keeping Response-less finished navigations in _requestsById blocked WebKit requestId reuse and hung later navigations (macOS IsVisible data: GoTo timeout). Park them in a side map so late Response/DONE still attach without colliding with new requests. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Require only a missing waitUntil event — not commit/DocumentId parity — so persistent+HAR data: navigations under CI load do not hang when FrameNavigated races Page.navigate (ShouldHavePagesInPersistentContext). Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Deferred navigation requestfinished left requests counted as inflight until a late Response path ran, which could wedge networkidle / provisional-swap commit under CI load. Clear inflight on defer, track request ids so finish is idempotent, and reset page inflight on cross-document navigations. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Replaying load before FrameNavigated could complete GoTo while the browser was still on about:blank, so QuerySelector returned null (FillAsyncSetsInputValue on Windows CI). Require commit, DocumentId match, or a data: frame URL before replaying — without requiring all of them, so persistent+HAR races that skip a fresh commit still complete. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
After gating lifecycle replay on landed navigation, persistent data: GoTo under Windows suite load could hang the full timeout when FrameNavigated and commit never arrived (DialogAcceptShouldWork). Poll location.href and document.readyState briefly so a usable data: document still completes GoTo without replaying against about:blank. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
LifecycleEvents still contains commit from about:blank until FrameNavigated clears it, so treating commit alone as landed made GoTo return before the data: DOM existed (PressAsyncDispatchesKey). Require DocumentId/URL match or evaluate readyState confirmation. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Increase initial settle and poll delay after scheduling runFor/pauseAt on builtins.setTimeout so Runtime.evaluate does not starve embedder timers (RunForShouldAcceptMinuteSecondString hang cascading into later Launch/Click timeouts on macOS WebKit shards). Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Allow media.play without a gesture so ShouldPlayAudio advances currentTime under headful CI. Await ResolveFrameAsync and prefer the creating frame when dispatching sendToPage so iframe sockets receive messages (ShouldEmitCloseUponFrameDetach on WebKit Linux). Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Extend navigation URL settle wait to Chromium expectNavigation clicks so ClickAsync does not return after the document request but before FrameNavigated (ShouldAwaitFormGetOnClick got route|click|navigated on Windows headful). Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Darwin WebKit can wedge on returning SCRIPT from evaluateHandle under suite load; inject by-value with a sentinel, then fetch the handle. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Remove --autoplay-policy=no-user-gesture-required (breaks AudioContext suspended). Catch TimeoutException while confirming data: readyState. Wait until promoted downloads are readable; treat locator-handler hide probe timeouts as hidden after iframe detach. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
AwaitPageJsonAsync returns default on timeout, so RefreshAsync never hit the TitleAsync fallback and persistent-context HAR pages kept an empty title under Windows suite load. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
…obes Main-frame overlay hide probes keep waiting on timeouts so ShouldWaitForHiddenByDefault2 only runs the handler once. Frame-scoped overlays still treat resolve timeouts/detach as hidden. data: GoTo confirmation uses short context probes and a single evaluate snapshot instead of blocking 5s EvaluateAsync waits (DialogAcceptShouldWork). Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Bound Chromium SetContent utility-world writes and fall back to main world on timeout. Cap OfficialTraceSession FlushPending/Aria evaluate so StopChunk cannot hang the suite. Harden WebSocket iframe sendToPage: bounded frame probes, child-frame pull pump, and broader WebKit evaluate fan-out. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
StopChunk races an in-flight evaluate Promise (ShouldNotEmitAfterWithoutBefore). Abandon pending resource captures on chunk stop and cap StopAsync at 5s so Windows headful suite load cannot wedge the NUnit budget. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
Seed about:blank iframe lifecycle from document.readyState before frame.waitForLoadState. Scope nested srcdoc/data FrameLocator retries to the owner frame so frameset stitches do not re-embed the parent tree. Co-authored-by: Darío Kondratiuk <dariokondratiuk@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Keep PR #7 CI green with product-only fixes (no skipped tests, no TestExpectations expected failures, no tests modified to match local code).
Tip (this push)
ShouldResolveImmediatelyWhenAlreadyLoaded— seed child-framedocument.readyStatebeforeframe.waitForLoadState(about:blank iframes can miss protocol load events).ShouldStitchIframesInsideAFramesetFrame— scope nested srcdoc/dataFrameLocatorretries to the owner frame so frameset stitches do not re-embed the parent tree.Prior
d11c3d7— hard-bound StopChunk / abandon pending captures while evaluate hangs (winhf4).922794b— SetContent write fallback, WS iframe dispatch; wkub + win headless + all mac green except later tip reds.Test plan