Skip to content

Commit

Permalink
[WPE][GTK] API test `WebKit.PrivateBrowsingPushStateNoHistoryCallback…
Browse files Browse the repository at this point in the history
…` is a timeout

https://bugs.webkit.org/show_bug.cgi?id=258721

Reviewed by Michael Catanzaro.

`FrameLoader::HistoryController` won't update global history and notify
its client that it `didNavigateWithNavigationData()` when
`usesEphemeralSession()`.

On WPE and GTK `WKWebsiteDataStoreGetDefaultDataStore()` by default
creates a data store with an ephemeral session id.

To fix it, we must explicitly create and use a non-ephemeral data store.

* Tools/TestWebKitAPI/Tests/WebKit/PrivateBrowsingPushStateNoHistoryCallback.cpp:
(TestWebKitAPI::TEST):
* Tools/TestWebKitAPI/glib/TestExpectations.json:

Canonical link: https://commits.webkit.org/265707@main
  • Loading branch information
obyknovenius committed Jul 3, 2023
1 parent 996faad commit 4fdb80d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "Test.h"
#include <WebKit/WKPreferencesRefPrivate.h>
#include <WebKit/WKRetainPtr.h>
#include <WebKit/WKWebsiteDataStoreConfigurationRef.h>
#include <WebKit/WKWebsiteDataStoreRef.h>

namespace TestWebKitAPI {
Expand Down Expand Up @@ -91,7 +92,10 @@ TEST(WebKit, PrivateBrowsingPushStateNoHistoryCallback)

Util::run(&didSameDocumentNavigation);

WKPageConfigurationSetWebsiteDataStore(pageConfiguration.get(), WKWebsiteDataStoreGetDefaultDataStore());
WKRetainPtr<WKWebsiteDataStoreConfigurationRef> dataStoreConfiguration = adoptWK(WKWebsiteDataStoreConfigurationCreate());
WKRetainPtr<WKWebsiteDataStoreRef> dataStore = adoptWK(WKWebsiteDataStoreCreateWithConfiguration(dataStoreConfiguration.get()));
WKPageConfigurationSetWebsiteDataStore(pageConfiguration.get(), dataStore.get());

PlatformWebView webView2(pageConfiguration.get());

historyClient.didNavigateWithNavigationData = didNavigateWithNavigationData;
Expand Down
3 changes: 0 additions & 3 deletions Tools/TestWebKitAPI/glib/TestExpectations.json
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,6 @@
"WebKit.FocusedFrameAfterCrash": {
"expected": {"gtk": {"status": ["TIMEOUT", "PASS"], "bug": "webkit.org/b/205336"}}
},
"WebKit.PrivateBrowsingPushStateNoHistoryCallback": {
"expected": {"all": {"status": ["TIMEOUT"], "bug": "webkit.org/b/254002"}}
},
"WebKit.GeolocationWatchMultiprocess": {
"expected": {"gtk": {"status": ["FAIL", "PASS"], "bug": "webkit.org/b/254002"}}
},
Expand Down

0 comments on commit 4fdb80d

Please sign in to comment.