Bug 183144 - [WPE] testRunner.setWindowIsKey() has no effect on the web process side in WebKit2
Summary: [WPE] testRunner.setWindowIsKey() has no effect on the web process side in We...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: PlatformOnly
Depends on:
Blocks:
 
Reported: 2018-02-26 13:14 PST by Daniel Bates
Modified: 2018-02-27 20:56 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2018-02-26 13:14:46 PST
The WPE implementation of testRunner.setWindowIsKey() only updates a boolean flag and does not change the activation state of the window. We need to fix it up so that it actually changes the activation state of the window so as to be able to test page activation issues. Once we implement such behavior we may be able to unskip some or all of the following tests:

fast/dom/Window/window-focus-self.html
fast/events/blur-focus-window-should-blur-focus-element.html
fast/selectors/querySelector-window-inactive.html
fast/selectors/selection-window-inactive.html
scrollbars/corner-resizer-window-inactive.html
Comment 1 Michael Catanzaro 2018-02-27 15:39:12 PST
WPE has no concept of window focus. I'm not sure what the expected behavior for these tests should be; it will require some thinking. Perhaps it should behave as if the window is always focused.
Comment 2 Daniel Bates 2018-02-27 20:56:19 PST
(In reply to Michael Catanzaro from comment #1)
> WPE has no concept of window focus. I'm not sure what the expected behavior
> for these tests should be; it will require some thinking. Perhaps it should
> behave as if the window is always focused.

The tests do not seem applicable to WPE. We should mark then as WONTFIX in WPE’s TestExpectations. These tests are explicitly testing the behavior of the non-standard ::selection:window-inactive selector to match selected text when the window is deactivated (i.e. not the frontmost focused window). Towards that, testRunner.setWindowIsKey() allows a test to make the window activated (frontmost focused) or deactivated (background; defocused).