| 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 dd6319fd4c99aad448b889f99bb784dcbc055de3..11092283c3132b63cbdf9dc892eabfe73b6ea074 100644
|
| --- a/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
|
| +++ b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
|
| @@ -428,7 +428,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));
|
| @@ -545,7 +547,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;
|
| @@ -564,13 +566,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, ""},
|
| @@ -601,7 +604,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 {
|
|
|