Commit fc55d866 authored by Maks Orlovich's avatar Maks Orlovich Committed by Commit Bot

Adjust NoStatePrefetchBrowserTest.PrefetchCookie* to upcoming cookie changes.

The cookies used in the test don't explicitly specify SameSite
attribute, so eventually they'll be interpreted as 1st-party only.

Adjust the code in tests that queries them to delcare itself as 1st
party so it can actually see them.

Bug: 1006816
Change-Id: Ied26333b46fa76142580fbb0dabdcb0df25a08e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1856887Reviewed-by: default avatarTarun Bansal <tbansal@chromium.org>
Commit-Queue: Maksim Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706129}
parent 228b4fc3
......@@ -546,7 +546,7 @@ IN_PROC_BROWSER_TEST_F(NoStatePrefetchBrowserTest, PrefetchCookie) {
content::StoragePartition* storage_partition =
content::BrowserContext::GetStoragePartitionForSite(
current_browser()->profile(), url, false);
net::CookieOptions options;
net::CookieOptions options = net::CookieOptions::MakeAllInclusive();
base::RunLoop loop;
storage_partition->GetCookieManagerForBrowserProcess()->GetCookieList(
url, options, base::BindOnce(GetCookieCallback, loop.QuitClosure()));
......@@ -563,10 +563,12 @@ IN_PROC_BROWSER_TEST_F(NoStatePrefetchBrowserTest, PrefetchCookieCrossDomain) {
std::unique_ptr<TestPrerender> test_prerender =
PrefetchFromURL(cross_domain_url, FINAL_STATUS_NOSTATE_PREFETCH_FINISHED);
// While the request is cross-site, it's permitted to set (implicitly) lax
// cookies on a cross-site navigation.
content::StoragePartition* storage_partition =
content::BrowserContext::GetStoragePartitionForSite(
current_browser()->profile(), cross_domain_url, false);
net::CookieOptions options;
net::CookieOptions options = net::CookieOptions::MakeAllInclusive();
base::RunLoop loop;
storage_partition->GetCookieManagerForBrowserProcess()->GetCookieList(
cross_domain_url, options,
......
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