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

Unified Diff: third_party/WebKit/Source/core/fetch/ResourceTest.cpp

Issue 2061843002: CHECK that Resource request/response urls are equalIgnoringFragmentIdentifer, not equal (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove some cruft from the test Created 4 years, 6 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 | « third_party/WebKit/Source/core/fetch/Resource.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fetch/ResourceTest.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ResourceTest.cpp b/third_party/WebKit/Source/core/fetch/ResourceTest.cpp
index ce5620e3d70a1ce711c0fe3fb6e5b407fb91aa3e..2abde3ebfdf0ac9162225c74097c198fa35cca6b 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceTest.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceTest.cpp
@@ -112,4 +112,22 @@ TEST(ResourceTest, LockFailureNoCrash)
EXPECT_EQ(size_t(0), resource->encodedSize());
}
+TEST(ResourceTest, RevalidateWithFragment)
hiroshige 2016/06/13 20:17:04 Could you add a comment about what this is testing
yhirano 2016/06/13 20:17:14 Can you write some comments that we don't need ASS
Nate Chapin 2016/06/13 20:51:21 Done.
+{
+ KURL url(ParsedURLString, "http://127.0.0.1:8000/foo.html");
+ ResourceResponse response;
+ response.setURL(url);
+ response.setHTTPStatusCode(200);
+ Resource* resource = Resource::create(url, Resource::Raw);
+ resource->responseReceived(response, nullptr);
+ resource->finish();
+
+ url.setFragmentIdentifier("bar");
+ resource->setRevalidatingRequest(ResourceRequest(url));
+ ResourceResponse revalidatingResponse;
+ revalidatingResponse.setURL(url);
+ revalidatingResponse.setHTTPStatusCode(304);
+ resource->responseReceived(revalidatingResponse, nullptr);
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/fetch/Resource.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698