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

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

Issue 2657793002: Make WebURLLoaderMockFactoryImpl::createURLLoader accept nullptr (Closed)
Patch Set: cl format Created 3 years, 11 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 | « no previous file | third_party/WebKit/Source/platform/testing/weburl_loader_mock.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/loader/fetch/FetchTestingPlatformSupport.cpp
diff --git a/third_party/WebKit/Source/platform/loader/fetch/FetchTestingPlatformSupport.cpp b/third_party/WebKit/Source/platform/loader/fetch/FetchTestingPlatformSupport.cpp
index 5a59f775fd1e6710cb5410c7745c2b0233b72620..5193aef759cbdc9ae6c7a9ba34a23c5107766674 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/FetchTestingPlatformSupport.cpp
+++ b/third_party/WebKit/Source/platform/loader/fetch/FetchTestingPlatformSupport.cpp
@@ -15,35 +15,6 @@
namespace blink {
-namespace {
-
-// WebURLLoader that does nothing. This instance should be passed as a default
-// WebURLLoader to create a WebURLLoader through WebURLLoaderMockFactory.
-class AssertWebURLLoader : public WebURLLoader {
- public:
- ~AssertWebURLLoader() override {}
-
- // WebURLLoader:
- void loadSynchronously(const WebURLRequest&,
- WebURLResponse&,
- WebURLError&,
- WebData&,
- int64_t& encodedDataLength,
- int64_t& encodedBodyLength) override {
- NOTREACHED();
- }
- void loadAsynchronously(const WebURLRequest&, WebURLLoaderClient*) override {
- NOTREACHED();
- }
- void cancel() override { NOTREACHED(); }
- void setDefersLoading(bool defer) override { NOTREACHED(); }
- void setLoadingTaskRunner(base::SingleThreadTaskRunner*) override {
- NOTREACHED();
- }
-};
-
-} // namespace
-
FetchTestingPlatformSupport::FetchTestingPlatformSupport()
: m_urlLoaderMockFactory(new WebURLLoaderMockFactoryImpl(this)) {}
@@ -75,7 +46,7 @@ FetchTestingPlatformSupport::getURLLoaderMockFactory() {
}
WebURLLoader* FetchTestingPlatformSupport::createURLLoader() {
- return m_urlLoaderMockFactory->createURLLoader(new AssertWebURLLoader);
+ return m_urlLoaderMockFactory->createURLLoader(nullptr);
}
} // namespace blink
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/testing/weburl_loader_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698