Bug 198055 - [Meta][WinCairo] Enable WebDriver
Summary: [Meta][WinCairo] Enable WebDriver
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebDriver (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 269315
Blocks:
  Show dependency treegraph
 
Reported: 2019-05-20 15:40 PDT by Don Olmstead
Modified: 2024-02-15 13:51 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Don Olmstead 2019-05-20 15:40:52 PDT
WebDriver support is nice to have.
Comment 1 haruhisa.shin 2024-02-05 01:31:25 PST
Pull request: https://github.com/WebKit/WebKit/pull/23847
Comment 2 EWS 2024-02-13 00:11:13 PST
Committed 274530@main (db706f64b581): <https://commits.webkit.org/274530@main>

Reviewed commits have been landed. Closing PR #23847 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2024-02-13 00:12:14 PST
<rdar://problem/122855467>
Comment 4 Fujii Hironori 2024-02-13 12:30:59 PST
Debug build is crashing. I'm going to revert. PTAL.

Buildbot: builder WinCairo-64-bit-Debug-Tests build 21837 : 274532@main
https://build.webkit.org/#/builders/727/builds/21837

ASSERTION FAILED: (m_client && !client) || (!m_client && client)
C:\BW\WinCairo-64-bit-Debug-Build\build\Source\JavaScriptCore\inspector/remote/RemoteInspector.cpp(166) : setClient
1   00007FF8F5DD1CA9 WTFCrash
2   00007FF8E80E383D WTFCrashWithInfo
3   00007FF8E90F17DD Inspector::RemoteInspector::setClient
4   00007FF8EA6213B2 WebKit::AutomationClient::AutomationClient
5   00007FF8EA6342D7 std::make_unique<WebKit::AutomationClient,WebKit::WebProcessPool &,0>
6   00007FF8EA632EB0 WTF::makeUnique<WebKit::AutomationClient,WebKit::WebProcessPool &>
7   00007FF8EA6328CF WebKit::WebProcessPool::platformInitialize
8   00007FF8EB6F4108 WebKit::WebProcessPool::WebProcessPool
9   00007FF8EB6F36DC WebKit::WebProcessPool::create
10  00007FF8EB87BC10 WKContextCreateWithConfiguration
11  00007FF64CA1F65D WTR::TestController::generatePageConfiguration
12  00007FF64CA20806 WTR::TestController::createWebViewWithOptions
13  00007FF64CA21520 WTR::TestController::ensureViewSupportsOptionsForTest
14  00007FF64CA24052 WTR::TestController::configureViewForTest
15  00007FF64CA78C4A WTR::TestInvocation::invoke
16  00007FF64CA24378 WTR::TestController::runTest
17  00007FF64CA2462E WTR::TestController::runTestingServerLoop
18  00007FF64CA1D1D7 WTR::TestController::run
19  00007FF64CA1CDCA WTR::TestController::TestController
20  00007FF64CAA8F8D main
21  00007FF64CE8F674 __scrt_common_main_seh
22  00007FF904EF4DE0 BaseThreadInitThunk
23  00007FF91541EC4B RtlUserThreadStart
Comment 5 haruhisa.shin 2024-02-13 17:42:14 PST
(In reply to Fujii Hironori from comment #4)
> Debug build is crashing. I'm going to revert. PTAL.
> 
> Buildbot: builder WinCairo-64-bit-Debug-Tests build 21837 : 274532@main
> https://build.webkit.org/#/builders/727/builds/21837
> 
> ASSERTION FAILED: (m_client && !client) || (!m_client && client)
> C:\BW\WinCairo-64-bit-Debug-Build\build\Source\JavaScriptCore\inspector/
> remote/RemoteInspector.cpp(166) : setClient
> 1   00007FF8F5DD1CA9 WTFCrash
> 2   00007FF8E80E383D WTFCrashWithInfo
> 3   00007FF8E90F17DD Inspector::RemoteInspector::setClient
> 4   00007FF8EA6213B2 WebKit::AutomationClient::AutomationClient
> 5   00007FF8EA6342D7
> std::make_unique<WebKit::AutomationClient,WebKit::WebProcessPool &,0>
> 6   00007FF8EA632EB0
> WTF::makeUnique<WebKit::AutomationClient,WebKit::WebProcessPool &>
> 7   00007FF8EA6328CF WebKit::WebProcessPool::platformInitialize
> 8   00007FF8EB6F4108 WebKit::WebProcessPool::WebProcessPool
> 9   00007FF8EB6F36DC WebKit::WebProcessPool::create
> 10  00007FF8EB87BC10 WKContextCreateWithConfiguration
> 11  00007FF64CA1F65D WTR::TestController::generatePageConfiguration
> 12  00007FF64CA20806 WTR::TestController::createWebViewWithOptions
> 13  00007FF64CA21520 WTR::TestController::ensureViewSupportsOptionsForTest
> 14  00007FF64CA24052 WTR::TestController::configureViewForTest
> 15  00007FF64CA78C4A WTR::TestInvocation::invoke
> 16  00007FF64CA24378 WTR::TestController::runTest
> 17  00007FF64CA2462E WTR::TestController::runTestingServerLoop
> 18  00007FF64CA1D1D7 WTR::TestController::run
> 19  00007FF64CA1CDCA WTR::TestController::TestController
> 20  00007FF64CAA8F8D main
> 21  00007FF64CE8F674 __scrt_common_main_seh
> 22  00007FF904EF4DE0 BaseThreadInitThunk
> 23  00007FF91541EC4B RtlUserThreadStart

Thank you for the information. I will confirm today.
Comment 6 haruhisa.shin 2024-02-15 01:19:07 PST
The socket port implementation can only hold one JSC::RemoteInspector::Client.
However, when two or more WebContext(WebProcessPool) were created, each would attempt to set the JSC::RemoteInspector::Client, resulting in the above assertion.

One test before "animation/cross-fade-background-image.html" is "animation/crash-on-removing-animation.html".
This test caused WTR to restart, which generated a second WebContext, thus causing the above assertion.
Also, when "New Window" was executed in MiniBrowser, multiple WebContxts were created and the same assertion occurred.

To fix this problem, in the WebProessPool::platformInitialize(), do not create a new AutomationClient if JSC::RemoteInspector::Client is already set.
This means that only the first generated WebContext can be manipulated by WebDriver.
Comment 7 haruhisa.shin 2024-02-15 01:22:15 PST
Pull request: https://github.com/WebKit/WebKit/pull/24495
Comment 8 EWS 2024-02-15 13:51:50 PST
Committed 274762@main (b09419cb34e8): <https://commits.webkit.org/274762@main>

Reviewed commits have been landed. Closing PR #24495 and removing active labels.