Bug 213190 - [GTK] WebKitPolicyClient new-window-policy is racey
Summary: [GTK] WebKitPolicyClient new-window-policy is racey
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-15 05:19 PDT by Charlie Turner
Modified: 2020-06-15 05:22 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Charlie Turner 2020-06-15 05:19:47 PDT
In this function in WebKitPolicyClient test,

void beforeAll()
{
    kServer = new WebKitTestServer();
    kServer->run(serverCallback);

    PolicyClientTest::add("WebKitPolicyClient", "navigation-policy", testNavigationPolicy);   // 1
    PolicyClientTest::add("WebKitPolicyClient", "response-policy", testResponsePolicy);       // 2
    PolicyClientTest::add("WebKitPolicyClient", "new-window-policy", testNewWindowPolicy);    // 3
}

If you run any permutations where 3 is not last, you will hit assertions. Placing 3 first gives it the best chance of failing.

The issue is caused due to the piggy timeouts in the new window policy test, they come with a comment,

    // Using a short timeout is a bit ugly here, but it's hard to get around because if we block
    // the new window signal we cannot halt the main loop in the create callback. If we
    // halt the main loop in the policy decision, the create callback never executes.