Closed
Conversation
The emulation-focus tests were marked as expected failures in headful mode, but the Playwright driver already handles focus emulation via Emulation.setFocusEmulationEnabled (Chromium) and Emulation.setActiveAndFocused (WebKit). The tests should pass in headful mode as they do in upstream Playwright. Changes: - Fix assertion order in ShouldFocusPopupsByDefault to match upstream (check popup focus before page focus) - Add Firefox headful skip for ShouldChangeFocusedIframe matching upstream's it.skip for headed Firefox losing focus - Add IsHeadless property to TestConstants for runtime headless checks - Remove [emulation-focus.spec.ts] expected failure entry from TestExpectations Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
ShouldFocusPopupsByDefaultto match upstream (check popup focus before page focus)ShouldChangeFocusedIframematching upstreamit.skip(browserName === 'firefox' && !headless)IsHeadlessproperty toTestConstantsfor runtime headless mode detection[emulation-focus.spec.ts] *expected failure entry fromTestExpectations.local.jsonCloses #119
Test plan
HEADLESS=false): all should pass exceptShouldChangeFocusedIframeon Firefox (skipped to match upstream)dotnet build ./src/PlaywrightSharp.sln🤖 Generated with Claude Code