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

Unified Diff: third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp

Issue 2766583002: Set the same headers for data URLs in WebURLLoaderImpl and ResourceFetcher (Closed)
Patch Set: reflect comments Created 3 years, 9 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
Index: third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp
diff --git a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp
index cf04620d18e1290cb799ca5b9862da88226f0cfa..f280618bc319f8763e8612def82819baea68564d 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp
+++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp
@@ -661,4 +661,16 @@ TEST_F(ResourceFetcherTest, LinkPreloadResourceMultipleFetchersAndMove) {
Platform::current()->getURLLoaderMockFactory()->serveAsynchronousRequests();
}
+TEST_F(ResourceFetcherTest, ContentTypeDataURL) {
+ ResourceFetcher* fetcher = ResourceFetcher::create(context());
+ FetchRequest fetchRequest =
+ FetchRequest(KURL(ParsedURLString, "data:text/testmimetype,foo"),
+ FetchInitiatorInfo());
+ Resource* resource = MockResource::fetch(fetchRequest, fetcher);
+ ASSERT_TRUE(resource);
+ EXPECT_EQ(ResourceStatus::Cached, resource->getStatus());
+ EXPECT_EQ("text/testmimetype", resource->response().mimeType());
+ EXPECT_EQ("text/testmimetype", resource->response().httpContentType());
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp ('k') | third_party/WebKit/Source/platform/network/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698