Commit dfee1b09 authored by arthursonzogni's avatar arthursonzogni Committed by Commit Bot

Remove ServiceWorkerNavigationLoaderTest.ResponseWithCoop

(1) 2020-03-12: pmeuleman@ added support for parsing COOP for SW main
resource response, just before M82 branch cut.
https://chromium-review.googlesource.com/c/chromium/src/+/2100790

The parser is executed from the browser process, violating:
https://chromium.googlesource.com/chromium/src/+/master/docs/security/rule-of-2.md
The unittest is entirely executed from the browser process.

(2) 2020-03-16: arthursonzogni@ added 8 equivalent WPT subtests:
https://chromium-review.googlesource.com/c/chromium/src/+/2102577

Today, yhirano@ is working on avoiding parsing COEP from the browser
process:
https://chromium-review.googlesource.com/c/chromium/src/+/2132902 and
arthursonzogni@ is doing the same for both COOP and COEP:
https://chromium-review.googlesource.com/c/chromium/src/+/2134292/10
https://chromium-review.googlesource.com/c/chromium/src/+/2134374/7

Since the unittest (1) is run entirely in the browser process, there are
no ways to move the parsing to the renderer process without breaking
this test. It needs to be removed. The WPT tests (2) are enough.

This patch removes ServiceWorkerNavigationLoaderTest.ResponseWithCoop.
This unblocks removing COOP parser usages from the browser process.

Bug: 1059295
Change-Id: I838eb387387d9b735d25cef6ecda999f1fab1f32
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2135688Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#756269}
parent 33d3f636
......@@ -989,19 +989,5 @@ TEST_F(ServiceWorkerNavigationLoaderTest, CancelNavigationDuringFetchEvent) {
EXPECT_EQ(net::ERR_ABORTED, client_.completion_status().error_code);
}
TEST_F(ServiceWorkerNavigationLoaderTest, ResponseWithCoop) {
base::test::ScopedFeatureList feature_list;
feature_list.InitWithFeatures({network::features::kCrossOriginOpenerPolicy},
{});
service_worker_->RespondWithHeaders(
{{"Cross-Origin-Opener-Policy", "same-origin"}});
// Perform the request.
StartRequest(CreateRequest());
client_.RunUntilComplete();
EXPECT_EQ(network::mojom::CrossOriginOpenerPolicy::kSameOrigin,
client_.response_head()->cross_origin_opener_policy);
}
} // namespace service_worker_navigation_loader_unittest
} // namespace content
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment