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

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

Issue 2173603003: Revert of Cancel image loads if decoding failed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/core/fetch/ImageResourceTest.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp b/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp
index 14c0e14060083e2448ab32e8fe850ae5a505890b..7f531985ea47aeb3f0feaea7e0e54fb9f10eb47f 100644
--- a/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp
+++ b/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp
@@ -621,20 +621,4 @@
EXPECT_TRUE(client2->notifyFinishedCalled());
}
-TEST(ImageResourceTest, CancelOnDecodeError)
-{
- KURL testURL(ParsedURLString, "http://www.test.com/cancelTest.html");
- URLTestHelpers::registerMockedURLLoad(testURL, "cancelTest.html", "text/html");
-
- ResourceFetcher* fetcher = ResourceFetcher::create(ImageResourceTestMockFetchContext::create());
- FetchRequest request(testURL, FetchInitiatorInfo());
- ImageResource* cachedImage = ImageResource::fetch(request, fetcher);
- Platform::current()->getURLLoaderMockFactory()->unregisterURL(testURL);
-
- cachedImage->loader()->didReceiveResponse(nullptr, WrappedResourceResponse(ResourceResponse(testURL, "image/jpeg", 18, nullAtom, String())), nullptr);
- cachedImage->loader()->didReceiveData(nullptr, "notactuallyanimage", 18, 18, 18);
- EXPECT_EQ(Resource::DecodeError, cachedImage->getStatus());
- EXPECT_FALSE(cachedImage->isLoading());
-}
-
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ImageResource.cpp ('k') | third_party/WebKit/Source/core/fetch/Resource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698