Bug 125586 - [GTK] /webkit2/WebKitWebPage/get-uri fails if run alone
Summary: [GTK] /webkit2/WebKitWebPage/get-uri fails if run alone
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 108832
  Show dependency treegraph
 
Reported: 2013-12-11 11:02 PST by Alberto Garcia
Modified: 2013-12-22 02:19 PST (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 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
terminated:

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()) {
        abortProcessLaunchIfNeeded();
        disconnect();
    }
}

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.