Commit 3cf44a1a authored by Titouan Rigoudy's avatar Titouan Rigoudy Committed by Commit Bot

[CORS-RFC1918] Add previously-flaky test.

This test failed on a single CI bot last time, for an unclear reason. I
am hoping that maybe crrev.com/c/2489918 will help.

Fixed: chromium:1135654, chromium:1124358
Change-Id: I3f98ec8bc46fd8af0a5f613411169f8600de077b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2494763Reviewed-by: default avatarArthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Auto-Submit: Titouan Rigoudy <titouan@chromium.org>
Commit-Queue: Titouan Rigoudy <titouan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#821240}
parent c0b0ff90
...@@ -142,9 +142,25 @@ IN_PROC_BROWSER_TEST_F(ChromePrivateNetworkRequestBrowserTest, ...@@ -142,9 +142,25 @@ IN_PROC_BROWSER_TEST_F(ChromePrivateNetworkRequestBrowserTest,
EXPECT_THAT(GetAddressSpaceFeatureBucketCounts(histogram_tester), IsEmpty()); EXPECT_THAT(GetAddressSpaceFeatureBucketCounts(histogram_tester), IsEmpty());
} }
// TODO(crbug.com/1124358): Verifiy that when a secure context served from the // This test verifies that when a secure context served from the public address
// public address space loads a resource from the local network, the correct // space loads a resource from the local network, the correct WebFeature is
// WebFeature is use-counted. // use-counted.
IN_PROC_BROWSER_TEST_F(ChromePrivateNetworkRequestBrowserTest,
RecordsAddressSpaceFeatureForFetch) {
base::HistogramTester histogram_tester;
std::unique_ptr<net::EmbeddedTestServer> server = NewServer();
EXPECT_TRUE(content::NavigateToURL(web_contents(), PublicSecureURL(*server)));
EXPECT_TRUE(content::ExecJs(web_contents(), R"(
fetch("defaultresponse")
)"));
EXPECT_TRUE(NavigateAndFlushHistograms());
EXPECT_THAT(
GetAddressSpaceFeatureBucketCounts(histogram_tester),
ElementsAre(Pair(
WebFeature::kAddressSpaceLocalEmbeddedInPublicSecureContext, 1)));
}
// This test verifies that when a non-secure context served from the public // This test verifies that when a non-secure context served from the public
// address space loads a resource from the local network, the correct WebFeature // address space loads a resource from the local network, the correct WebFeature
......
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