Skip to content

Run generated browser samples with Playwright - #5312

Merged
mattleibow merged 31 commits into
mainfrom
mattleibow-browser-sample-runs
Oct 13, 2026
Merged

mattleibow merged 31 commits into
mainfrom
mattleibow-browser-sample-runs

Conversation

@mattleibow

@mattleibow mattleibow commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

Exercise generated Basic Web, BrowserWASM, Blazor CPU/GPU/Drawing and Uno CPU/Drawing samples using Playwright. Samples consume one exact producing package cohort; the runner remains source-backed. Published head 54e7bc8ca451cc5f3393582ff7b87b4c2ba55c22 is based on canonical main 085a3a619c1af059a022a41f0718c195bdac753d.

BrowserSampleTests owns the browser facts and console/page-error regressions. BasicSampleTests retains generated-build, Console and HTTP cases, with a minimal shared preparation base. BrowserRunningApp owns the browser lifetime above HostApp; navigation, waits, screenshots and callback completion surface browser errors. Drawing facts exercise real pointer strokes, color/brush selection, clear and CPU return.

Image validation has two Validate overloads and documented options; diagnostic bytes are saved and PNG-validated before comparison. Shared attachments have unique names. DotNet uses one optional DotNetOptions record for configuration, framework, properties, timeout and working directory. Build, sample Run and BuildSample each have one method; raw CLI execution is Execute. Release, private caches, diagnostics, standard --framework and callback cleanup are preserved. Run timeout controls address/exit waits, not callback duration.

Canonical caller-configured templates and eight typed Samples jobs remain unchanged. Browser/error-regression tests are Host; builds and pure infrastructure are Build. Chromium installation is CI-only for Host or unfiltered runs; local installation remains explicit. No legacy deletion, Gallery/Fiddle UI, Appium/device/native, root-only restore, SDK/workload or scene-clock changes.

Related issues

Related to #5308 and #5291; includes merged #5341 and #5339 through main. Extraction source #5291 f7640ff545bf366881a61f276920e6409fd543e0.

Required skia PR

None.

Areas affected

  • Managed API (binding/)
  • Native / C API (externals/skia/src/c, include/c)
  • Generated P/Invoke bindings
  • Native dependency or Skia update (libpng, HarfBuzz, FreeType, zlib, milestone bump, …)
  • Views & integrations (MAUI, Uno, WPF, WinUI, Blazor, …)
  • Rendering output / visual behavior
  • Performance
  • Tests
  • Build, packaging, or CI
  • Documentation or samples

Changes

None to public product API/ABI or sample rendering.

Seven named browser facts use actual samples with 1280×900, scale 1, light captures. Nine reviewed references per host retain strict 0.075% differing pixels, zero channel tolerance. Only animated Blazor GPU uses the 6% mean RGBA smoke allowance, replacing the pixel criterion; uniform dark output may pass. No masks, frozen clocks, tolerance weakening or expanded skips. Playwright 1.55.0 is explicit prerequisite setup, not fixture/discovery download.

Core/legacy goldens, Integration/MSBuild suites and website workflow are untouched. Before/after product screenshots do not apply. Updated references are reviewed actual platform captures with four-attempt parity, not copied cross-platform baselines.

Testing

Full exact-head CI passed. Build 1633132, 4.156.0-pr.5312.26513.7, completed succeeded at 2026-10-13 09:30:20 UTC. Producing merge d3499e87432647caaffcf150dff237902429042a has parents canonical main 085a3a619c1af059a022a41f0718c195bdac753d and published source 54e7bc8ca451cc5f3393582ff7b87b4c2ba55c22. All 121 GitHub checks succeeded; four website checks were policy-skipped. Managed/native/core/interop/packages/MSBuild and all eight Samples jobs passed.

Each Samples job ran dotnet cake --target=samples --verbosity=normal --configuration=Release --runGroup=<group> --sampleRunId=<host>_<group-lowercase> through the canonical template. Completed runner logs report:

Host Build Host Docker
Linux 130 passed 14 passed 4 passed
macOS 136 passed 14 passed Not scheduled by canonical policy
Windows 137 passed 14 passed 4 passed

Every scheduled group had zero failures and zero skips. Host includes the actual browser sample facts and browser-error regressions. No timeout, skip or tolerance workaround was added.

Local class-split checks, current head:

dotnet build tests/SkiaSharp.Tests.Samples/SkiaSharp.Tests.Samples.csproj --no-restore --verbosity quiet
dotnet test tests/SkiaSharp.Tests.Samples/SkiaSharp.Tests.Samples.csproj --no-build --no-restore -- --filter-class '*SampleInfrastructureTests' --filter-class '*SampleDiscoveryTests'
dotnet tests/SkiaSharp.Tests.Samples/bin/Debug/net10.0/SkiaSharp.Tests.Samples.dll --list-tests --filter-class '*BrowserSampleTests' --filter-class '*BasicSampleTests'

Passed: source/required-analyzer build (two existing warnings), 78 selected tests/zero failures/zero skips, and discovery of 30 Basic/browser rows including 12 browser rows without inherited duplicate tests. Discovery is diagnostic, not a runtime gate.

Options validation before the class-only split, source a38c2f2a8a8717cdca4bfe07730034c920c8784b:

dotnet test tests/SkiaSharp.Tests.Samples/SkiaSharp.Tests.Samples.csproj -p:TargetFramework=net10.0 -p:TargetFrameworks=net10.0 -- --filter-trait Category=Infrastructure --report-trx --results-directory output/logs/testlogs/samples/dotnet-options

119 passed/zero failures/zero skips on Mac ARM64. Covers options defaults, copying, argument/property ownership, working directory, address/exit timeout and cleanup, referenced-library TFM isolation, diagnostics, attachments and image policies. The current-head full grouped CI supersedes this narrower proof.

Local cohort 1628893 source a4a9680d7623cf83a6b45aa10dfadfb8b52d2571: SkiaSharp 4.156.0-pr.5291.26508.18/HarfBuzzSharp 14.4.0.100-pr.5291.26508.18/matching natives. Runner SDK 10.0.401; consumer inherited PATH SDK 11.0.100-rc.1.26425.128. No reset/reacquisition.

dotnet test tests/SkiaSharp.Tests.Samples.slnx -p:TargetFramework=net10.0 -p:TargetFrameworks=net10.0 -- --report-trx was not run locally at current head; the complete canonical grouped CI passed instead. PR remains draft; no merge/readiness/stack changes.

Checklist

  • Tests added or updated (if omitted, explain why above)
  • Changes above lists all public API and behavioral changes (or "None.")
  • New/changed public API? Added or updated accurate source /// documentation and regenerated bindings when applicable
  • Native change? Companion mono/skia PR linked above and bindings regenerated

Conditional public-API/native items do not apply.

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

📦 Try the packages from this PR

Warning

Do not run these scripts without first reviewing the code in this PR.

Step 1 — Download the packages

bash / macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.sh | bash -s -- 5312

PowerShell / Windows:

iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 5312"

Step 2 — Add the local NuGet source

dotnet nuget add source ~/.skiasharp/hives/pr-5312/packages --name skiasharp-pr-5312
More options
Option Description
--successful-only / -SuccessfulOnly Only use successful builds
--force / -Force Overwrite previously downloaded packages
--list / -List List available artifacts without downloading
--build-id ID / -BuildId ID Download from a specific build

Or download manually from Azure Pipelines — look for the nuget artifact on the build for this PR.

Remove the source when you're done:

dotnet nuget remove source skiasharp-pr-5312

@mattleibow
mattleibow added this pull request to stack #5309 October 9, 2026 03:47
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

📊 SkiaSharp benchmarks — PR #5312

⭐ this PR (full source build) vs 🌙 nightly · Linux · Windows · macOS

Informational only — this never blocks the PR. 🟢 faster / less allocation · 🔴 slower / more allocation; moves under 5% are hidden as noise.

⏱️ Times are raw BenchmarkDotNet means, and the ⭐ PR and baseline legs run on separate CI runners, so microbenchmarks can swing run-to-run — treat small time deltas as noise. Allocations are deterministic and the reliable signal. The interactive perf-dashboard (linked below) applies smoothing for the trend view.

Highlights

⏱️ Time — 🔴 81 slower · 🟢 5 faster

  • 🔴 RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) · macOS · 69.23 µs → 224.11 µs (+224%)
  • 🔴 SceneRenderBenchmark.RenderFrame(Complexity: 4) · macOS · 5.70 ms → 18.05 ms (+216%)
  • 🔴 RuntimeEffectShaderBenchmark.DrawFrame · macOS · 547.29 µs → 1.71 ms (+212%)
  • 🔴 SceneRenderBenchmark.RenderFrame(Complexity: 1) · macOS · 1.26 ms → 3.94 ms (+212%)
  • 🔴 RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) · macOS · 152.32 µs → 398.58 µs (+162%)
  • …and 81 more (see details below)
Full per-OS benchmark deltas

Linux

⏱️ Time (vs 🌙 nightly 4.156.0-nightly.26512.11)

Benchmark baseline this PR Δ
ColorMathBenchmark.ToColor(Colors: 4096) 5.10 µs 9.05 µs 🔴 +78%
ColorMathBenchmark.PreMultiply(Colors: 4096) 7.48 µs 12.03 µs 🔴 +61%
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 1.38 µs 1.99 µs 🔴 +44%
ColorParseBenchmark.Parse(Iterations: 1000) 42.23 µs 59.57 µs 🔴 +41%
ColorMathBenchmark.UnPreMultiply(Colors: 4096) 7.16 µs 9.89 µs 🔴 +38%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 145.59 µs 200.88 µs 🔴 +38%
ColorMathBenchmark.ToColorF(Colors: 4096) 8.01 µs 10.99 µs 🔴 +37%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 46.74 µs 63.68 µs 🔴 +36%
PathBoundsBenchmark.TightBounds(Points: 1024) 6.43 µs 8.76 µs 🔴 +36%
MatrixMapPointsBenchmark.MapPoint(Points: 256) 2.95 µs 3.96 µs 🔴 +34%
MatrixOpsBenchmark.Concat(Count: 4096) 142.45 µs 190.19 µs 🔴 +34%
PathBoundsBenchmark.TightBounds(Points: 64) 604.7 ns 792.3 ns 🔴 +31%
MatrixMapPointsBenchmark.MapPoints(Points: 256) 125.1 ns 161.7 ns 🔴 +29%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 158.34 µs 204.08 µs 🔴 +29%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) 866.47 µs 1.10 ms 🔴 +27%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 231.35 µs 292.42 µs 🔴 +26%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 608.56 µs 762.64 µs 🔴 +25%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 61.05 µs 76.49 µs 🔴 +25%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 2048) 1.77 ms 2.21 ms 🔴 +25%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 1.28 ms 1.60 ms 🔴 +25%
MatrixOpsBenchmark.Invert(Count: 4096) 92.91 µs 116.13 µs 🔴 +25%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 118.51 µs 146.45 µs 🔴 +24%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 2048) 5.06 ms 6.24 ms 🔴 +23%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 1024) 463.84 µs 570.65 µs 🔴 +23%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 155.24 µs 188.82 µs 🔴 +22%
…and 9 more

Windows

⏱️ Time (vs 🌙 nightly 4.156.0-nightly.26512.11)

Benchmark baseline this PR Δ
ColorMathBenchmark.ToColor(Colors: 4096) 5.38 µs 7.98 µs 🔴 +48%
MatrixMapPointsBenchmark.MapPoints(Points: 256) 94.8 ns 137.4 ns 🔴 +45%
MatrixMapPointsBenchmark.MapRadius(Points: 256) 5.78 µs 7.87 µs 🔴 +36%
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 70.54 µs 94.97 µs 🔴 +35%
MatrixOpsBenchmark.Concat(Count: 4096) 145.81 µs 194.35 µs 🔴 +33%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 94.43 µs 121.41 µs 🔴 +29%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 168.72 µs 216.85 µs 🔴 +29%
PathBoundsBenchmark.TightBounds(Points: 1024) 9.45 µs 12.01 µs 🔴 +27%
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 1.18 µs 1.48 µs 🔴 +25%
PathBoundsBenchmark.TightBounds(Points: 64) 948.1 ns 1.17 µs 🔴 +24%
MatrixMapPointsBenchmark.MapRect(Points: 256) 5.28 µs 6.17 µs 🔴 +17%
MatrixMapPointsBenchmark.MapVector(Points: 4096) 84.06 µs 98.09 µs 🔴 +17%
MatrixMapPointsBenchmark.MapRect(Points: 4096) 84.56 µs 98.47 µs 🔴 +16%
MatrixMapPointsBenchmark.MapVector(Points: 256) 5.30 µs 6.14 µs 🔴 +16%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 2048) 6.67 ms 7.59 ms 🔴 +14%
ColorParseBenchmark.Parse(Iterations: 1000) 45.43 µs 51.11 µs 🔴 +13%
RuntimeEffectShaderBenchmark.DrawFrame 626.66 µs 690.71 µs 🔴 +10%
CanvasDrawBenchmark.Draw(Shapes: 512) 11.74 ms 12.93 ms 🔴 +10%
CanvasDrawBenchmark.Draw(Shapes: 64) 1.47 ms 1.62 ms 🔴 +10%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 1.68 ms 1.83 ms 🔴 +9%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 178.31 µs 194.39 µs 🔴 +9%
MatrixOpsBenchmark.Invert(Count: 4096) 95.71 µs 104.32 µs 🔴 +9%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 51.37 µs 55.95 µs 🔴 +9%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) 692.43 µs 754.13 µs 🔴 +9%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 2048) 2.11 ms 2.30 ms 🔴 +9%
…and 4 more

macOS

⏱️ Time (vs 🌙 nightly 4.156.0-nightly.26512.11)

Benchmark baseline this PR Δ
RasterImageLifecycleBenchmark.CreateDataWithReleaseProc(Count: 256) 69.23 µs 224.11 µs 🔴 +224%
SceneRenderBenchmark.RenderFrame(Complexity: 4) 5.70 ms 18.05 ms 🔴 +216%
RuntimeEffectShaderBenchmark.DrawFrame 547.29 µs 1.71 ms 🔴 +212%
SceneRenderBenchmark.RenderFrame(Complexity: 1) 1.26 ms 3.94 ms 🔴 +212%
RasterImageLifecycleBenchmark.CreateRasterImage(Count: 256) 152.32 µs 398.58 µs 🔴 +162%
PathBoundsBenchmark.TightBounds(Points: 1024) 8.77 µs 22.60 µs 🔴 +158%
MatrixMapPointsBenchmark.MapPoints(Points: 4096) 1.66 µs 2.34 µs 🔴 +41%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 64) 178.12 µs 238.50 µs 🔴 +34%
MatrixOpsBenchmark.Concat(Count: 4096) 117.51 µs 146.39 µs 🔴 +25%
BitmapDrawBenchmark.DrawUnscaledTiles(Tiles: 256) 595.55 µs 740.86 µs 🔴 +24%
MatrixMapPointsBenchmark.MapRadius(Points: 4096) 106.56 µs 131.96 µs 🔴 +24%
MatrixMapPointsBenchmark.MapPoints(Points: 256) 142.9 ns 175.6 ns 🔴 +23%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 256) 772.84 µs 915.13 µs 🔴 +18%
LargeImageScaleBenchmark.UpscaleCrossfade(Size: 1024) 1.54 ms 1.72 ms 🔴 +11%
BitmapDrawBenchmark.DrawScaledTiles(Tiles: 64) 210.94 µs 231.82 µs 🔴 +10%
MatrixMapPointsBenchmark.MapRadius(Points: 256) 6.66 µs 7.31 µs 🔴 +10%
MatrixMapPointsBenchmark.MapPoint(Points: 256) 1.22 µs 1.34 µs 🔴 +10%
MatrixOpsBenchmark.Invert(Count: 4096) 70.70 µs 77.17 µs 🔴 +9%
PathBoundsBenchmark.TightBounds(Points: 64) 951.2 ns 873.0 ns 🟢 -8%
ColorMathBenchmark.UnPreMultiply(Colors: 4096) 8.11 µs 8.66 µs 🔴 +7%
MatrixMapPointsBenchmark.MapPoint(Points: 4096) 19.39 µs 20.56 µs 🔴 +6%
CanvasDrawBenchmark.Draw(Shapes: 64) 1.68 ms 1.58 ms 🟢 -6%
LargeImageScaleBenchmark.UpscaleOpaque(Size: 2048) 2.82 ms 2.98 ms 🔴 +6%

📈 Full interactive perf-dashboard & run details →

@mattleibow
mattleibow removed this pull request from stack #5309 October 10, 2026 20:20
@mattleibow
mattleibow changed the base branch from mattleibow-samples-foundation-extraction to main October 10, 2026 20:20
@mattleibow
mattleibow force-pushed the mattleibow-browser-sample-runs branch from 2dcdea3 to 9b143ba Compare October 12, 2026 14:34
v and others added 21 commits October 13, 2026 06:58
Add named Web, BrowserWASM, and Blazor CPU/GPU runtime facts, strict stable-image references, and retained browser diagnostics. Supply the actual BrowserWASM sample's native project dependency and recognize its app-host address without moving product packages into the runner. Keep browser installation an explicit local/CI prerequisite.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Reuse Basic and Docker runtime wrappers and the shared sample image comparer. Replace custom image extraction and duplicate browser tests with full-page Chromium screenshots and console-error checks. Add user-approved local-first Mac page references from the exact 1628893 package cohort.

Use a GPU-only normalized mean RGBA error bound of 6%, measured against 24 actual animated frames and white/black/dark controls. Preserve the foundation's 0.075% differing-pixel rule elsewhere and document the uniform-dark smoke-test limitation.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Restore the existing HTTP health and PNG response checks against the container's reviewed image golden. Remove the Chromium image-viewer screenshot and its host-qualified reference; retain Playwright only for actual Web, BrowserWASM and Blazor UIs.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Restore WebSampleReturnsImage with its HTTP status, content type and 512x512 PNG golden checks. Keep WebSamplePageRenders as an independent Playwright console-error and full-page screenshot fact, sharing the existing sample build/run helper.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Retain short golden captures while allowing sample callbacks to navigate, wait, capture multiple screenshots and use Playwright Page for interactions. Keep owned lifecycle, error checks and shared comparison, and trim the maintainer guide to setup and usage rather than investigation history.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Introduce RunBrowserSample around the existing owned server/browser lifecycle, remove Capture, and return screenshot paths for explicit SampleImage.ValidateFile calls. Preserve golden policies and browser errors.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Log browser events directly, retain all console/page errors across operations, and assert after navigation, waits, screenshots and callback completion. Remove Record and duplicate browser.log; add multi-error and page-error regressions and short readability comments.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Expose HostApp on BrowserRunningApp, use host-owned diagnostics and instance RequestUri with cached address resolution, and preserve origin/query validation. Update instance regressions and host-wrapper checks.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Move version-matched browser installation into a CI-only pre-test target, removing duplicated pipeline setup. Keep local installation explicit and trim the maintainer guide to essential setup and diagnostics.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Add explicit framework and test-owned MSBuild property overloads while preserving default build/run behavior and ordinary referenced library targets. Keep framework diagnostics distinct and reject overrides of helper-owned properties.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Expected references can share the actual capture basename or already be attached by an earlier capture. Prefix their attachment names so mismatches report their real differing pixels instead of an xUnit duplicate-name exception. Preserve the pixel thresholds and attachment size limit.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 22da25a5-a573-4363-bc2a-7b56234b665e
Select Uno's declared browser target, verify actual CPU rendering and navigation, draw repeatable colored strokes and clear both drawing pages. Add reviewed Mac captures for the new scenarios and actual Linux/Windows CI captures for the existing browser pages, keeping strict and animated-GPU comparison policies unchanged.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Use actual producing build 1632425 captures from source 80980e. Map frames through named test results, retain settled cleared-button state, and verify exact pixel parity across four attempts per platform. No scene, threshold or skip changes.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Use one options-based signature for file validation, saved-image validation and golden comparison. Keep strict default pixel thresholds, the explicit animated GPU allowance, dimensions and diagnostic attachments unchanged. Cover option forwarding, immutable reuse, invalid limits and existing comparison boundaries.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Align the shared options contract with the Gallery layer without changing lower-layer pixel budgets. Options own the default differing-pixel limit and explicit limits are range checked. Cover exact budget boundaries and unchanged defaults.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Explain expected dimensions, differing-pixel fractions and the alternative normalized mean RGBA metric beside the options properties.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Validate files or save supplied bytes then validate the file. Decode once for dimensions and golden comparison; assert PNG response format in the HTTP scenarios. Preserve diagnostic snapshots with distinct attachment names for repeated comparisons.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Keep repeated attachment snapshots uniquely named in the shared attachment helper instead of SampleImage. Preserve existing attachment limits, expected-image prefixes and image comparison behavior.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Centralize the signature assertion instead of repeating it in HTTP scenarios, retaining the supplied bytes on disk before validation fails.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Review actual build 1632678 captures against local Mac baselines. All four captures per page match exactly; differences are text rendering rather than scene geometry or layout. BrowserWASM image interior is unchanged. Retain strict pixel thresholds and actual sample scenes.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Preserve merged grouped CI and caller-configured templates. Classify browser page and error-regression tests as Host, retain build/infrastructure classification, and pass the selected group to the CI browser prerequisite so only Host or unfiltered runs install Chromium.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
@mattleibow
mattleibow force-pushed the mattleibow-browser-sample-runs branch from d096c95 to ed31872 Compare October 13, 2026 05:03
v and others added 10 commits October 13, 2026 07:20
Replace growing Build, Run and BuildSample overloads with one shared DotNetOptions record. Retain Release and command-specific timeout defaults, private caches, framework selection, diagnostics and callback cleanup. Forward additional properties consistently and allow explicit working-directory and wait-timeout selection.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Keep generated-build, Console, and HTTP cases in BasicSampleTests. Move browser sample execution and error regression cases to BrowserSampleTests, sharing the existing basic sample preparation helper without changing run groups or image validation.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Keep SampleTestBase and BasicSampleTestBase in the sample test project root and its matching namespace. Leave execution helpers and fixtures in Utils.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Combine Basic and Gallery compilation in SampleBuildTests while retaining separate runtime classes. Use one root-level SampleTestBase with folder-parameterized execution, and keep image options in their own file without changing comparison policy.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Keep RunBrowserSample on SampleTestBase with explicit relative folders and normalize separators in RunSample. Separate Uno browser facts and framework-specific startup/readiness from ordinary web tests; share the existing pixel-count assertion through SampleImage without changing image policy.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Separate Docker image-build coverage from container execution while sharing one collection fixture, preserving cached images and serial resource ownership. Use explicit Run names for host/browser classes and retain typed execution groups. Add a fixture-sharing regression check and document the class organization.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Rename the .NET-specific base to DotNetSampleTestBase. Add DockerSampleTestBase for flat context staging and build/run orchestration; keep the shared Docker fixture responsible for daemon checks, image caching, container execution, and resource cleanup. Reuse existing tree-copy helpers rather than imposing a shared inheritance contract on different workspace lifetimes.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Use a focused Docker wrapper for captured CLI execution and checked commands. Keep daemon policy, cached image ownership, container callbacks, and cleanup in DockerSampleFixture; route sample context builds and running-app operations through the wrapper.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Expose Docker.Ps, Build, Run, Info and container/image operations instead of raw argument execution. Keep command syntax and timeout defaults private to the CLI wrapper; fixtures, sample bases, and running applications call operation methods.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
Remove assembly-wide parallelization suppression. Serialize browser classes together and retain Docker's collection-owned image cache, allowing independent collections to run concurrently. Keep ordinary xUnit class/theory-row serialization and add a regression check for the scoped policy.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 69d588ee-ed83-4294-b04b-53579cb8ed43
@mattleibow
mattleibow added this pull request to stack #5348 October 13, 2026 18:38
@mattleibow
mattleibow marked this pull request as ready for review October 13, 2026 20:40
@mattleibow
mattleibow merged commit 1d1d1b1 into main Oct 13, 2026
87 of 125 checks passed
@mattleibow
mattleibow deleted the mattleibow-browser-sample-runs branch October 13, 2026 20:46
VirgilMing added a commit to VirgilMing/SkiaSharp that referenced this pull request Oct 15, 2026
A visible canvas can still be empty while the raster interop module loads.
Wait for the sample's first opaque pixel before capturing the existing
golden image, and exercise delayed module initialization as a regression.

The delayed case fails with the old condition and passes with pixel
readiness. Normal initialization, infrastructure/discovery tests, and the
unfiltered Console solution pass locally.

Related to mono#5312; observed while validating mono#5352. The earliest introduction
of the readiness gap is not established by the current refactored-file blame.
mattleibow pushed a commit that referenced this pull request Oct 15, 2026
A visible canvas can still be empty while the raster interop module loads.
Wait for the sample's first opaque pixel before capturing the existing
golden image, and exercise delayed module initialization as a regression.

The delayed case fails with the old condition and passes with pixel
readiness. Normal initialization, infrastructure/discovery tests, and the
unfiltered Console solution pass locally.

Related to #5312; observed while validating #5352. The earliest introduction
of the readiness gap is not established by the current refactored-file blame.
@github-actions github-actions Bot added this to the 4.156.0-rc.1 milestone Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant