Index: third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp |
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp |
index 9384bb5bf72f96ed55c2f067761f06f4f620fd12..d9d1801dc77a55991026c6d04a8555561fd18da6 100644 |
--- a/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp |
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp |
@@ -444,7 +444,9 @@ class FrameFetchContextHintsTest : public FrameFetchContextTest { |
resourceWidth.isSet = true; |
fetchRequest.setResourceWidth(resourceWidth); |
} |
- fetchContext->addClientHintsIfNecessary(fetchRequest); |
+ fetchContext->addClientHintsIfNecessary( |
+ fetchRequest.clientHintsPreferences(), fetchRequest.getResourceWidth(), |
+ fetchRequest.mutableResourceRequest()); |
EXPECT_EQ(isPresent ? String(headerValue) : String(), |
fetchRequest.resourceRequest().httpHeaderField(headerName)); |
@@ -561,7 +563,7 @@ TEST_F(FrameFetchContextTest, MainResource) { |
request, Resource::MainResource, FetchRequest::NoDefer)); |
} |
-TEST_F(FrameFetchContextTest, PopulateRequestData) { |
+TEST_F(FrameFetchContextTest, SetFirstPartyCookieAndRequestorOrigin) { |
struct TestCase { |
const char* documentURL; |
bool documentSandboxed; |
@@ -580,13 +582,14 @@ TEST_F(FrameFetchContextTest, PopulateRequestData) { |
"http://example.test"}, |
// If the request already has a requestor origin, then |
- // 'populateRequestData' leaves it alone: |
+ // 'setFirstPartyCookieAndRequestorOrigin' leaves it alone: |
{"http://example.test", false, "http://not-example.test", |
WebURLRequest::FrameTypeNone, "http://not-example.test"}, |
{"http://example.test", true, "http://not-example.test", |
WebURLRequest::FrameTypeNone, "http://not-example.test"}, |
- // If the request's frame type is not 'none', then 'populateRequestData' |
+ // If the request's frame type is not 'none', then |
+ // 'setFirstPartyCookieAndRequestorOrigin' |
// leaves it alone: |
{"http://example.test", false, "", WebURLRequest::FrameTypeTopLevel, ""}, |
{"http://example.test", false, "", WebURLRequest::FrameTypeAuxiliary, ""}, |
@@ -617,7 +620,7 @@ TEST_F(FrameFetchContextTest, PopulateRequestData) { |
} |
// Compare the populated |requestorOrigin| against |test.serializedOrigin| |
- fetchContext->populateRequestData(request); |
+ fetchContext->setFirstPartyCookieAndRequestorOrigin(request); |
if (strlen(test.serializedOrigin) == 0) { |
EXPECT_TRUE(request.requestorOrigin()->isUnique()); |
} else { |