Bug 119855

Summary: [WK2] NetworkProcess should use a temporary storage session for tests
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: Tools / TestsAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed patch darin: review+

Description Alexey Proskuryakov 2013-08-15 11:52:18 PDT
Both DumpRenderTree and single WebProcess WebKitTestRunner switch loader to a private testing session to avoid interfering with regular browsing storage, or leaking information between runs.

We should do this for NetworkProcess, too.
Comment 1 Alexey Proskuryakov 2013-08-15 12:01:59 PDT
Created attachment 208834 [details]
proposed patch
Comment 2 Darin Adler 2013-08-15 12:17:44 PDT
Comment on attachment 208834 [details]
proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=208834&action=review

> Source/WebKit2/UIProcess/WebContext.cpp:1083
> +void WebContext::useTestingNetworkSession()
> +{
> +    ASSERT(m_processes.isEmpty());
> +#if ENABLE(NETWORK_PROCESS)
> +    ASSERT(!m_networkProcess);
> +#endif
> +
> +    m_useTestingNetworkSession = true;
> +}

Would be nice to do nothing if called incorrectly. Silently in release builds, after the assertion in debug builds.

> Source/WebKit2/UIProcess/WebContext.h:470
> +    bool m_useTestingNetworkSession;

I would name this m_shouldUseTestingNetworkSession or m_usesTestingNetworkSession. The way it’s named here sounds like a verb phrase, not an adjective phrase.
Comment 3 Alexey Proskuryakov 2013-08-15 15:25:13 PDT
Committed r154144 with proposed changes.