Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 13ea4e838840e4c8ac4ba43e421f75e1dbf26e0a
      
https://github.com/WebKit/WebKit/commit/13ea4e838840e4c8ac4ba43e421f75e1dbf26e0a
  Author: Qianlang Chen <[email protected]>
  Date:   2026-02-12 (Thu, 12 Feb 2026)

  Changed paths:
    R 
LayoutTests/http/tests/site-isolation/inspector/unit-tests/target-manager.html
    A 
LayoutTests/http/tests/site-isolation/inspector/unit-tests/target-manager.html
    M LayoutTests/inspector/unit-tests/target-manager.html
    M Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py
    M Tools/TestRunnerShared/TestFeatures.cpp

  Log Message:
  -----------
  Web Inspector: Simplify infra for frontend tests involving optional site 
isolation behavior
https://bugs.webkit.org/show_bug.cgi?id=307006

Reviewed by BJ Burg.

As we continue site isolation work and inevitably have to update Web
Inspector frontend tests to account for either site isolated or non
site isolated behaviors, it would be more convenient if we didn't need
to store and maintain two copies of a test case, just so the test can
also run with SI enabled and while properly loading the correct expected
test results.

With this patch, when we make SI-related changes in the inspector, we
can now update the original test case to account for SI-specific
behaviors, and then symlink that test case into site-isolation/inspector
to have it automatically run under SI. This reduces the amount of test
cases we must maintain and also make writing SI test cases more akin to
making SI frontend changes (where we'll also guard codes with similar
flags rather than creating copies of entire classes).

   - One caveat is that the updated test case must now try to include
     inspector-test.html from two relative paths, as it can be run from
     two different places.

Update the one SI-specific test case we have so far, target-manager, to
make use of this enhancement.

* Tools/TestRunnerShared/TestFeatures.cpp:
(WTR::shouldEnableSiteIsolation):
(WTR::hardcodedFeaturesBasedOnPathForTest):
Automatically treat site-isolation/inspector tests as if having the
SiteIsolationEnabled=true flag set on top.

* Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py:
(LayoutTestFinder):
Allow symlinks to be discovered as test cases.

* 
LayoutTests/http/tests/site-isolation/inspector/unit-tests/target-manager.html:
* LayoutTests/inspector/unit-tests/target-manager.html:
Use symlink to simplify this existing test.

Try to include inspector-test.html from two places and allow one to
quietly fail.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to