Commit 99424620 authored by Jun Cai's avatar Jun Cai Committed by Commit Bot

Network Service: Remove VariationsHttpHeadersBrowserTest.TestStrippingHeadersFromNetworkService

This CL removes VariationsHttpHeadersBrowserTest.TestStrippingHeadersFromNetworkService
since the consumers are required to add headers directly for the initial
request.

Bug: 841309
Change-Id: Ic84eeef7fcdbc6f1693aa7e56972cd05bf311719
Reviewed-on: https://chromium-review.googlesource.com/1120955Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Reviewed-by: default avatarAlexei Svitkine <asvitkine@chromium.org>
Commit-Queue: Jun Cai <juncai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574356}
parent bc82cb56
...@@ -241,29 +241,6 @@ IN_PROC_BROWSER_TEST_F(VariationsHttpHeadersBrowserTest, ...@@ -241,29 +241,6 @@ IN_PROC_BROWSER_TEST_F(VariationsHttpHeadersBrowserTest,
EXPECT_FALSE(HasReceivedHeader(GetExampleUrl(), "X-Client-Data")); EXPECT_FALSE(HasReceivedHeader(GetExampleUrl(), "X-Client-Data"));
} }
// Verify in an integration that that the variations header (X-Client-Data) is
// correctly attached and stripped from network requests that are triggered via
// the network service.
IN_PROC_BROWSER_TEST_F(VariationsHttpHeadersBrowserTest,
TestStrippingHeadersFromNetworkService) {
content::StoragePartition* partition =
content::BrowserContext::GetDefaultStoragePartition(browser()->profile());
network::mojom::NetworkContext* network_context =
partition->GetNetworkContext();
EXPECT_EQ(net::OK, content::LoadBasicRequest(network_context,
GetGoogleRedirectUrl1()));
// TODO(crbug.com/794644) Once the network service stack starts injecting
// X-Client-Data headers, the following expectations should be used.
EXPECT_FALSE(HasReceivedHeader(GetGoogleRedirectUrl1(), "X-Client-Data"));
/*
EXPECT_TRUE(HasReceivedHeader(GetGoogleRedirectUrl1(), "X-Client-Data"));
EXPECT_TRUE(HasReceivedHeader(GetGoogleRedirectUrl2(), "X-Client-Data"));
EXPECT_TRUE(HasReceivedHeader(GetExampleUrl(), "Host"));
EXPECT_FALSE(HasReceivedHeader(GetExampleUrl(), "X-Client-Data"));
*/
}
IN_PROC_BROWSER_TEST_F(VariationsHttpHeadersBrowserTest, IN_PROC_BROWSER_TEST_F(VariationsHttpHeadersBrowserTest,
TestStrippingHeadersFromSubresourceRequest) { TestStrippingHeadersFromSubresourceRequest) {
GURL url = server()->GetURL("/simple_page.html"); GURL url = server()->GetURL("/simple_page.html");
......
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