Bug 125586

Summary: [GTK] /webkit2/WebKitWebPage/get-uri fails if run alone
Product: WebKit Reporter: Alberto Garcia <berto>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: cgarcia
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 108832    

Description Alberto Garcia 2013-12-11 11:02:58 PST
$ Programs/WebKit2APITests/TestLoaderClient -p /webkit2/WebKitWebPage/get-uri
ERROR:../../usr/local/devel/WebKit/Source/WebKit2/UIProcess/API/gtk/tests/TestLoaderClient.cpp:344:void testWebPageURI(WebPageURITest*, gconstpointer): assertion failed (test->m_webPageURIs.size() == test->m_webViewURIs.size()): (0 == 2)

m_webPageURIs is enlarged in the WebKitWebExtension::page-created
callback. The problem is that this signal is emitted before its
handler is registered in busAcquiredCallback().

This doesn't happen in a normal execution because there's time for the
bus to be acquired before this particular test (which is almost the
last one) is run.
Comment 1 Alberto Garcia 2013-12-17 07:19:55 PST
This fails all the time if TestLoaderClient is run with the
network process enabled.

The reason for this is that after each test the web process is

void WebProcessProxy::removeWebPage(uint64_t pageID)

    // If this was the last WebPage open in that web process, and we have no other reason to keep it alive, let it go.
    // We only allow this when using a network process, as otherwise the WebProcess needs to preserve its session state.
    if (m_context->usesNetworkProcess() && canTerminateChildProcess()) {

Because of this there's a new web process for each test and the bug is
hit all the time.
Comment 2 Carlos Garcia Campos 2013-12-22 02:19:04 PST
This has already been fixed in r160904.