Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1030)

Unified Diff: Source/platform/network/ResourceRequestTest.cpp

Issue 1071893003: WebURLRequest: Track the requesting document's URL through navigations. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Ugh. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/network/ResourceRequest.cpp ('k') | public/platform/WebURLRequest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/network/ResourceRequestTest.cpp
diff --git a/Source/platform/network/ResourceRequestTest.cpp b/Source/platform/network/ResourceRequestTest.cpp
index 7256138dc01bb8701fcbe67e189d24d3420fc346..d3bbd1cebed2d3455ea6aa08669b0c944eed9a29 100644
--- a/Source/platform/network/ResourceRequestTest.cpp
+++ b/Source/platform/network/ResourceRequestTest.cpp
@@ -21,6 +21,7 @@ TEST(ResourceRequestTest, CrossThreadResourceRequestData)
original.setCachePolicy(UseProtocolCachePolicy);
original.setTimeoutInterval(10);
original.setFirstPartyForCookies(KURL(ParsedURLString, "http://www.example.com/first_party.htm"));
+ original.setRequestorOrigin(SecurityOrigin::create(KURL(ParsedURLString, "http://www.example.com/first_party.htm")));
original.setHTTPMethod(AtomicString("GET", AtomicString::ConstructFromLiteral));
original.setHTTPHeaderField(AtomicString("Foo"), AtomicString("Bar"));
original.setHTTPHeaderField(AtomicString("Piyo"), AtomicString("Fuga"));
@@ -46,6 +47,7 @@ TEST(ResourceRequestTest, CrossThreadResourceRequestData)
EXPECT_EQ(UseProtocolCachePolicy, original.cachePolicy());
EXPECT_EQ(10, original.timeoutInterval());
EXPECT_STREQ("http://www.example.com/first_party.htm", original.firstPartyForCookies().string().utf8().data());
+ EXPECT_STREQ("www.example.com", original.requestorOrigin()->host().utf8().data());
EXPECT_STREQ("GET", original.httpMethod().utf8().data());
EXPECT_STREQ("Bar", original.httpHeaderFields().get("Foo").utf8().data());
EXPECT_STREQ("Fuga", original.httpHeaderFields().get("Piyo").utf8().data());
@@ -73,6 +75,7 @@ TEST(ResourceRequestTest, CrossThreadResourceRequestData)
EXPECT_EQ(UseProtocolCachePolicy, copy1->cachePolicy());
EXPECT_EQ(10, copy1->timeoutInterval());
EXPECT_STREQ("http://www.example.com/first_party.htm", copy1->firstPartyForCookies().string().utf8().data());
+ EXPECT_STREQ("www.example.com", copy1->requestorOrigin()->host().utf8().data());
EXPECT_STREQ("GET", copy1->httpMethod().utf8().data());
EXPECT_STREQ("Bar", copy1->httpHeaderFields().get("Foo").utf8().data());
EXPECT_EQ(ResourceLoadPriorityLow, copy1->priority());
« no previous file with comments | « Source/platform/network/ResourceRequest.cpp ('k') | public/platform/WebURLRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698