Skip to content

Commit

Permalink
--site-isolation should not load file URLs into iframes
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=271429
rdar://125202486

Reviewed by Pascoe.

`-—site-isolation` does not use `-—self-comparison-header` after 276416@main, instead this should
check `additional_header`. This is needed to have coverage for tests outside of http/.

* LayoutTests/platform/mac-site-isolation/TestExpectations:
* Tools/Scripts/webkitpy/port/driver.py:
(Driver.is_http_test):

Canonical link: https://commits.webkit.org/276514@main
  • Loading branch information
charliewolfe committed Mar 22, 2024
1 parent 238ec67 commit c0c0f3a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion LayoutTests/platform/mac-site-isolation/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ displaylists [ Skip ]
dom [ Skip ]
editing [ Skip ]
fast [ Skip ]
fetch [ Skip ]
fonts [ Skip ]
fullscreen [ Skip ]
gamepad [ Skip ]
Expand Down Expand Up @@ -232,6 +231,10 @@ http/tests/site-isolation/selection-focus.html [ Skip ]
#######################
# Tests that time out #
#######################
fetch/body-init.html [ Skip ]
fetch/fetch-blob-unbounded-range.html [ Skip ]
fetch/fetch-error-messages.html [ Skip ]
fetch/fetch-url-serialization.html [ Skip ]
http/tests/loading/basic-auth-remove-credentials.html [ Skip ]
http/tests/loading/main-resource-delegates-on-back-navigation.html [ Skip ]
http/tests/loading/sizes/preload-image-sizes-2x.html [ Skip ]
Expand Down
2 changes: 1 addition & 1 deletion Tools/Scripts/webkitpy/port/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def _command_wrapper(self):
WEBKIT_WEB_PLATFORM_TEST_SERVER_ROUTE = "WebKit/"

def is_http_test(self, driver_input):
if driver_input.self_comparison_header and "runInCrossOriginFrame=true" in driver_input.self_comparison_header:
if driver_input.additional_header and "runInCrossOriginFrame=true" in driver_input.additional_header:
return True
return driver_input.test_name.startswith(self.HTTP_DIR) and not driver_input.test_name.startswith(self.HTTP_LOCAL_DIR)

Expand Down
2 changes: 1 addition & 1 deletion Tools/Scripts/webkitpy/port/driver_unittest.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def test_test_to_uri(self):
driver = Driver(port, None, pixel_tests=False)

self.assertEqual(driver.test_to_uri(DriverInput('foo/bar.html', 1000, None, None)), 'file://%s/foo/bar.html' % port.layout_tests_dir())
self.assertEqual(driver.test_to_uri(DriverInput('foo/bar.html', 1000, None, None, self_comparison_header='runInCrossOriginFrame=true')), 'http://127.0.0.1:8000/root/foo/bar.html')
self.assertEqual(driver.test_to_uri(DriverInput('foo/bar.html', 1000, None, None, additional_header='runInCrossOriginFrame=true')), 'http://127.0.0.1:8000/root/foo/bar.html')
self.assertEqual(driver.test_to_uri(DriverInput('http/tests/foo.html', 1000, None, None)), 'http://127.0.0.1:8000/foo.html')
self.assertEqual(driver.test_to_uri(DriverInput('http/tests/ssl/bar.html', 1000, None, None)), 'https://127.0.0.1:8443/ssl/bar.html')
self.assertEqual(driver.test_to_uri(DriverInput('imported/w3c/web-platform-tests/foo/bar.html', 1000, None, None)), 'http://localhost:8800/foo/bar.html')
Expand Down

0 comments on commit c0c0f3a

Please sign in to comment.