Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f1e512aef1b67e097379833c333ea6c975450f66
      
https://github.com/WebKit/WebKit/commit/f1e512aef1b67e097379833c333ea6c975450f66
  Author: Rupin Mittal <[email protected]>
  Date:   2025-10-02 (Thu, 02 Oct 2025)

  Changed paths:
    M LayoutTests/TestExpectations
    R 
LayoutTests/http/wpt/navigation-api/navigate-event/navigate-history-back-bfcache-expected.txt
    R 
LayoutTests/http/wpt/navigation-api/navigate-event/navigate-history-back-bfcache.html
    R 
LayoutTests/http/wpt/navigation-api/navigation-activation/activation-after-bfcache-cross-origin-expected.txt
    R 
LayoutTests/http/wpt/navigation-api/navigation-activation/activation-after-bfcache-cross-origin.html
    R 
LayoutTests/http/wpt/navigation-api/navigation-activation/activation-after-bfcache-expected.txt
    R 
LayoutTests/http/wpt/navigation-api/navigation-activation/activation-after-bfcache.html
    R 
LayoutTests/http/wpt/navigation-api/navigation-history-entry/entries-after-bfcache-expected.txt
    R 
LayoutTests/http/wpt/navigation-api/navigation-history-entry/entries-after-bfcache-in-iframe-expected.txt
    R 
LayoutTests/http/wpt/navigation-api/navigation-history-entry/entries-after-bfcache-in-iframe.html
    R 
LayoutTests/http/wpt/navigation-api/navigation-history-entry/entries-after-bfcache.html
    R 
LayoutTests/http/wpt/navigation-api/navigation-history-entry/resources/is_uuid.js
    R 
LayoutTests/http/wpt/navigation-api/per-entry-events/dispose-after-bfcache-expected.txt
    R 
LayoutTests/http/wpt/navigation-api/per-entry-events/dispose-after-bfcache.html
    M 
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/cross-origin-traversal-does-not-fire-navigate-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigation-back-cross-document-preventDefault-expected.txt
    M LayoutTests/platform/wk2/TestExpectations
    M Source/WebKit/UIProcess/API/C/WKPage.cpp
    M Source/WebKit/UIProcess/API/C/WKPage.h
    M Tools/TestRunnerShared/TestFeatures.cpp
    M Tools/WebKitTestRunner/TestController.cpp
    M Tools/WebKitTestRunner/TestOptions.h

  Log Message:
  -----------
  Enable BFCache by default in WebKitTestRunner for Navigation API tests
https://bugs.webkit.org/show_bug.cgi?id=299917
rdar://161693746

Reviewed by Chris Dumez.

Some WPT Navigation API tests require the BFCache. This is off by default for
WKTR which means we can't run these tests. 300439@main tried to skip the WPT
tests and make a copy of them in the http/wpt folder, but these tests were
skipped in 300617@main. So these tests aren't being tested at all.

To allow these tests to run and therefore improve our test coverage, we enable
the BFCache by default in WKTR for Navigation API tests.

We also remove the copied tests created in 300439@main.

With this change, these two tests are timeouts (as they are on WPT). They were
passing locally before, but are failing on WPT. Since that's our source of 
truth,
we mark them as timeouts here as well and will investigate in a subsequent 
patch:
cross-origin-traversal-does-not-fire-navigate.html
navigation-back-cross-document-preventDefault.html

* LayoutTests/TestExpectations:
* 
LayoutTests/http/wpt/navigation-api/navigate-event/navigate-history-back-bfcache-expected.txt:
 Removed.
* 
LayoutTests/http/wpt/navigation-api/navigate-event/navigate-history-back-bfcache.html:
 Removed.
* 
LayoutTests/http/wpt/navigation-api/navigation-activation/activation-after-bfcache-cross-origin-expected.txt:
 Removed.
* 
LayoutTests/http/wpt/navigation-api/navigation-activation/activation-after-bfcache-cross-origin.html:
 Removed.
* 
LayoutTests/http/wpt/navigation-api/navigation-activation/activation-after-bfcache-expected.txt:
 Removed.
* 
LayoutTests/http/wpt/navigation-api/navigation-activation/activation-after-bfcache.html:
 Removed.
* 
LayoutTests/http/wpt/navigation-api/navigation-history-entry/entries-after-bfcache-expected.txt:
 Removed.
* 
LayoutTests/http/wpt/navigation-api/navigation-history-entry/entries-after-bfcache-in-iframe-expected.txt:
 Removed.
* 
LayoutTests/http/wpt/navigation-api/navigation-history-entry/entries-after-bfcache-in-iframe.html:
 Removed.
* 
LayoutTests/http/wpt/navigation-api/navigation-history-entry/entries-after-bfcache.html:
 Removed.
* 
LayoutTests/http/wpt/navigation-api/navigation-history-entry/resources/is_uuid.js:
 Removed.
* 
LayoutTests/http/wpt/navigation-api/per-entry-events/dispose-after-bfcache-expected.txt:
 Removed.
* 
LayoutTests/http/wpt/navigation-api/per-entry-events/dispose-after-bfcache.html:
 Removed.
* 
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/cross-origin-traversal-does-not-fire-navigate-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigation-back-cross-document-preventDefault-expected.txt:
* LayoutTests/platform/wk2/TestExpectations:
* Source/WebKit/UIProcess/API/C/WKPage.cpp:
(WKPageClearBackForwardCache):
* Source/WebKit/UIProcess/API/C/WKPage.h:
* Tools/TestRunnerShared/TestFeatures.cpp:
(WTR::shouldUseBackForwardCache):
(WTR::hardcodedFeaturesBasedOnPathForTest):

If the test path contains "navigation-api/", use the BFCache.

* Tools/WebKitTestRunner/TestController.cpp:
(WTR::TestController::generatePageConfiguration):

If the TestOptions flag for UsesBackForwardCache is true, set the
UsesBackForwardCache flag on the Preferences object to be true, so
that the Page knows to use the BFCache.

(WTR::TestController::resetStateToConsistentValues):

Clear the BFCache for the Test Page in between tests

* Tools/WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::usesBackForwardCache const):

Canonical link: https://commits.webkit.org/300920@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to