Chromium Code Reviews| 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 1b4fc8e4e620c9e3c8ccd6222041dd417a5cb258..7f43a16a634e2ac7c222c893ed2c01003a775d4b 100644 |
| --- a/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp |
| +++ b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp |
| @@ -763,9 +763,9 @@ TEST_F(FrameFetchContextTest, SetFirstPartyCookieAndRequestorOrigin) { |
| struct TestCase { |
| const char* document_url; |
| bool document_sandboxed; |
| - const char* requestor_origin; // "" => unique origin |
| + const char* requestor_origin; // "" => null |
| WebURLRequest::FrameType frame_type; |
| - const char* serialized_origin; // "" => unique origin |
| + const char* serialized_origin; // "" => null |
| } cases[] = { |
| // No document origin => unique request origin |
| {"", false, "", WebURLRequest::kFrameTypeNone, "null"}, |
| @@ -778,24 +778,17 @@ TEST_F(FrameFetchContextTest, SetFirstPartyCookieAndRequestorOrigin) { |
| "http://example.test"}, |
| // If the request already has a requestor origin, then |
| - // 'setFirstPartyCookieAndRequestorOrigin' leaves it alone: |
| + // 'SetFirstPartyCookieAndRequestorOrigin' leaves it alone: |
| {"http://example.test", false, "http://not-example.test", |
| WebURLRequest::kFrameTypeNone, "http://not-example.test"}, |
| {"http://example.test", true, "http://not-example.test", |
| WebURLRequest::kFrameTypeNone, "http://not-example.test"}, |
| - |
| - // If the request's frame type is not 'none', then |
| - // 'setFirstPartyCookieAndRequestorOrigin' |
| - // leaves it alone: |
| - {"http://example.test", false, "", WebURLRequest::kFrameTypeTopLevel, ""}, |
| - {"http://example.test", false, "", WebURLRequest::kFrameTypeAuxiliary, |
| - ""}, |
| - {"http://example.test", false, "", WebURLRequest::kFrameTypeNested, ""}, |
|
kinuko
2017/06/07 02:00:49
Now SetFirstPartyCookieAndRequestorOrigin also han
|
| }; |
| + int index = 0; |
| for (const auto& test : cases) { |
| - SCOPED_TRACE(::testing::Message() |
| - << test.document_url << " => " << test.serialized_origin); |
| + SCOPED_TRACE(::testing::Message() << index++ << " " << test.document_url |
| + << " => " << test.serialized_origin); |
| // Set up a new document to ensure sandbox flags are cleared: |
| dummy_page_holder = DummyPageHolder::Create(IntSize(500, 500)); |
| dummy_page_holder->GetPage().SetDeviceScaleFactorDeprecated(1.0); |
| @@ -819,7 +812,7 @@ TEST_F(FrameFetchContextTest, SetFirstPartyCookieAndRequestorOrigin) { |
| // Compare the populated |requestorOrigin| against |test.serializedOrigin| |
| fetch_context->SetFirstPartyCookieAndRequestorOrigin(request); |
| if (strlen(test.serialized_origin) == 0) { |
| - EXPECT_TRUE(request.RequestorOrigin()->IsUnique()); |
| + EXPECT_TRUE(!request.RequestorOrigin()); |
| } else { |
| EXPECT_EQ(String(test.serialized_origin), |
| request.RequestorOrigin()->ToString()); |