Changeset 195543 in webkit
- Timestamp:
- Jan 25, 2016 10:41:27 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r195538 r195543 1 2016-01-25 Daniel Bates <dabates@apple.com> 2 3 WebKitTestRunner: Credential cache is not cleared between tests 4 https://bugs.webkit.org/show_bug.cgi?id=153407 5 <rdar://problem/24280834> 6 7 Reviewed by Brady Eidson. 8 9 Add SPI to call NetworkStorageSession::switchToNewTestingSession() to create a new testing session. 10 The new testing session will have an empty credential cache. 11 12 * NetworkProcess/NetworkProcess.cpp: 13 (WebKit::NetworkProcess::switchToNewTestingSession): Added. 14 * NetworkProcess/NetworkProcess.h: 15 * NetworkProcess/NetworkProcess.messages.in: Added message SwitchToNewTestingSession(). 16 * UIProcess/API/C/WKContext.cpp: 17 (WKContextResetTestingNetworkSession): Added. 18 * UIProcess/API/C/WKContextPrivate.h: 19 * UIProcess/WebProcessPool.cpp: 20 (WebKit::WebProcessPool::resetTestingNetworkSession): Added. 21 * UIProcess/WebProcessPool.h: 22 * WebProcess/WebProcess.cpp: 23 (WebKit::WebProcess::switchToNewTestingSession): Added. 24 * WebProcess/WebProcess.h: 25 * WebProcess/WebProcess.messages.in: Added message SwitchToNewTestingSession(). 26 1 27 2016-01-22 Ryosuke Niwa <rniwa@webkit.org> 2 28 -
trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp
r195357 r195543 256 256 } 257 257 258 void NetworkProcess::switchToNewTestingSession() 259 { 260 NetworkStorageSession::switchToNewTestingSession(); 261 } 262 258 263 void NetworkProcess::ensurePrivateBrowsingSession(SessionID sessionID) 259 264 { -
trunk/Source/WebKit2/NetworkProcess/NetworkProcess.h
r195357 r195543 147 147 void deleteWebsiteDataForOrigins(WebCore::SessionID, uint64_t websiteDataTypes, const Vector<WebCore::SecurityOriginData>& origins, const Vector<String>& cookieHostNames, uint64_t callbackID); 148 148 149 void switchToNewTestingSession(); 150 149 151 // FIXME: This should take a session ID so we can identify which disk cache to delete. 150 152 void clearDiskCache(std::chrono::system_clock::time_point modifiedSince, std::function<void ()> completionHandler); -
trunk/Source/WebKit2/NetworkProcess/NetworkProcess.messages.in
r195357 r195543 33 33 #endif 34 34 35 SwitchToNewTestingSession() 36 35 37 EnsurePrivateBrowsingSession(WebCore::SessionID sessionID) 36 38 DestroyPrivateBrowsingSession(WebCore::SessionID sessionID) -
trunk/Source/WebKit2/UIProcess/API/C/WKContext.cpp
r194295 r195543 539 539 } 540 540 541 void WKContextResetTestingNetworkSession(WKContextRef context) 542 { 543 toImpl(context)->resetTestingNetworkSession(); 544 } 545 541 546 WKDictionaryRef WKContextCopyPlugInAutoStartOriginHashes(WKContextRef contextRef) 542 547 { -
trunk/Source/WebKit2/UIProcess/API/C/WKContextPrivate.h
r192796 r195543 83 83 WK_EXPORT void WKContextUseTestingNetworkSession(WKContextRef context); 84 84 85 // Test only. Should be called before running a test. 86 WK_EXPORT void WKContextResetTestingNetworkSession(WKContextRef context); 87 85 88 typedef void (*WKContextInvalidMessageFunction)(WKStringRef messageName); 86 89 WK_EXPORT void WKContextSetInvalidMessageFunction(WKContextInvalidMessageFunction invalidMessageFunction); -
trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp
r194880 r195543 1074 1074 } 1075 1075 1076 void WebProcessPool::resetTestingNetworkSession() 1077 { 1078 ASSERT(!m_processes.isEmpty()); 1079 ASSERT(m_networkProcess); 1080 1081 if (!m_shouldUseTestingNetworkSession || !m_networkProcess || m_processes.isEmpty()) 1082 return; 1083 1084 sendToAllProcesses(Messages::WebProcess::SwitchToNewTestingSession()); 1085 m_networkProcess->send(Messages::NetworkProcess::SwitchToNewTestingSession(), 0); 1086 } 1087 1076 1088 void WebProcessPool::allowSpecificHTTPSCertificateForHost(const WebCertificateInfo* certificate, const String& host) 1077 1089 { -
trunk/Source/WebKit2/UIProcess/WebProcessPool.h
r194880 r195543 240 240 241 241 void useTestingNetworkSession(); 242 void resetTestingNetworkSession(); 242 243 bool isUsingTestingNetworkSession() const { return m_shouldUseTestingNetworkSession; } 243 244 -
trunk/Source/WebKit2/WebProcess/WebProcess.cpp
r194880 r195543 499 499 } 500 500 501 void WebProcess::switchToNewTestingSession() 502 { 503 NetworkStorageSession::switchToNewTestingSession(); 504 } 505 501 506 WebPage* WebProcess::focusedWebPage() const 502 507 { -
trunk/Source/WebKit2/WebProcess/WebProcess.h
r194880 r195543 211 211 void platformInitializeWebProcess(WebProcessCreationParameters&&); 212 212 213 void switchToNewTestingSession(); 214 213 215 void platformTerminate(); 214 216 void registerURLSchemeAsEmptyDocument(const String&); -
trunk/Source/WebKit2/WebProcess/WebProcess.messages.in
r192796 r195543 45 45 UserPreferredLanguagesChanged(Vector<String> languages) 46 46 FullKeyboardAccessModeChanged(bool fullKeyboardAccessEnabled) 47 48 SwitchToNewTestingSession() 47 49 48 50 // Legacy private browsing session is per process. Individual pages or page groups may use the private session or the default one as appropriate. -
trunk/Tools/ChangeLog
r195513 r195543 1 2016-01-25 Daniel Bates <dabates@apple.com> 2 3 WebKitTestRunner: Credential cache is not cleared between tests 4 https://bugs.webkit.org/show_bug.cgi?id=153407 5 <rdar://problem/24280834> 6 7 Reviewed by Brady Eidson. 8 9 * WebKitTestRunner/TestController.cpp: 10 (WTR::TestController::resetStateToConsistentValues): Reset testing network session 11 to clear cached credentials. 12 1 13 2016-01-24 Dan Bernstein <mitz@apple.com> 2 14 -
trunk/Tools/WebKitTestRunner/TestController.cpp
r195474 r195543 715 715 WKContextSetCacheModel(TestController::singleton().context(), kWKCacheModelDocumentBrowser); 716 716 717 WKContextResetTestingNetworkSession(TestController::singleton().context()); 718 717 719 // FIXME: This function should also ensure that there is only one page open. 718 720
Note: See TracChangeset
for help on using the changeset viewer.