When disabling legacy private browsing for testing, change the SessionID back to...
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Sep 2019 16:19:50 +0000 (16:19 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Sep 2019 16:19:50 +0000 (16:19 +0000)
commitdbc6313ba68185a5c0ac40dd7a62e30e22372739
tree9a917a3335e31a33bdd30f3ff94acb96ced013bd
parent2a081f82e145b4bb36fe1d5a22fe4dfad3222539
When disabling legacy private browsing for testing, change the SessionID back to what it was, not the defaultSessionID
https://bugs.webkit.org/show_bug.cgi?id=201480

Reviewed by Youenn Fablet.

Source/WebCore:

No change in behavior, but this blocks bug 200050 which will make WebKitTestRunner use a persistent, non-default session.
Without this change, that change causes lots of test failures because we are switching from the legacy private browsing session
to the default session instead of the session we were using.

* page/Page.cpp:
(WebCore::Page::enableLegacyPrivateBrowsing): Deleted.
* page/Page.h:
* page/PageGroup.cpp:
(WebCore::PageGroup::addPage):
(WebCore::PageGroup::setSessionIDForTesting):
(WebCore::PageGroup::enableLegacyPrivateBrowsingForTesting): Deleted.
* page/PageGroup.h:
* storage/StorageNamespaceProvider.cpp:
(WebCore::StorageNamespaceProvider::setSessionIDForTesting):
(WebCore::StorageNamespaceProvider::enableLegacyPrivateBrowsingForTesting): Deleted.
* storage/StorageNamespaceProvider.h:

Source/WebKit:

* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setPrivateBrowsingEnabled):
* WebProcess/InjectedBundle/InjectedBundle.h:

Source/WebKitLegacy/mac:

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKitLegacy/win:

* WebView.cpp:
(WebView::notifyPreferencesChanged):

Tools:

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setPrivateBrowsingEnabled):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249575 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/Page.cpp
Source/WebCore/page/Page.h
Source/WebCore/page/PageGroup.cpp
Source/WebCore/page/PageGroup.h
Source/WebCore/storage/StorageNamespaceProvider.cpp
Source/WebCore/storage/StorageNamespaceProvider.h
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.cpp
Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h
Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.h
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebView/WebView.mm
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/WebView.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/glib/CMakeLists.txt
Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp