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

Side by Side Diff: third_party/WebKit/Source/platform/testing/FetchTestingPlatformSupport.cpp

Issue 2718943003: mv FetchTestingPlatformSupport to platform/loader/testing (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/testing/FetchTestingPlatformSupport.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/loader/fetch/FetchTestingPlatformSupport.h" 5 #include "platform/testing/FetchTestingPlatformSupport.h"
6 6
7 #include <memory>
7 #include "platform/loader/fetch/MockFetchContext.h" 8 #include "platform/loader/fetch/MockFetchContext.h"
kinuko 2017/02/27 02:41:08 This Platform class has a public getter for MockFe
kouhei (in TOK) 2017/02/27 03:31:37 Done.
8 #include "platform/network/ResourceError.h" 9 #include "platform/network/ResourceError.h"
9 #include "platform/testing/weburl_loader_mock_factory_impl.h" 10 #include "platform/testing/weburl_loader_mock_factory_impl.h"
10 #include "public/platform/Platform.h" 11 #include "public/platform/Platform.h"
11 #include "public/platform/WebURL.h" 12 #include "public/platform/WebURL.h"
12 #include "public/platform/WebURLLoader.h" 13 #include "public/platform/WebURLLoader.h"
13 #include "public/platform/WebURLLoaderMockFactory.h" 14 #include "public/platform/WebURLLoaderMockFactory.h"
14 #include <memory>
15 15
16 namespace blink { 16 namespace blink {
17 17
18 FetchTestingPlatformSupport::FetchTestingPlatformSupport() 18 FetchTestingPlatformSupport::FetchTestingPlatformSupport()
19 : m_urlLoaderMockFactory(new WebURLLoaderMockFactoryImpl(this)) {} 19 : m_urlLoaderMockFactory(new WebURLLoaderMockFactoryImpl(this)) {}
20 20
21 FetchTestingPlatformSupport::~FetchTestingPlatformSupport() { 21 FetchTestingPlatformSupport::~FetchTestingPlatformSupport() {
22 // Shutdowns WebURLLoaderMockFactory gracefully, serving all pending requests 22 // Shutdowns WebURLLoaderMockFactory gracefully, serving all pending requests
23 // first, then flushing all registered URLs. 23 // first, then flushing all registered URLs.
24 m_urlLoaderMockFactory->serveAsynchronousRequests(); 24 m_urlLoaderMockFactory->serveAsynchronousRequests();
(...skipping 18 matching lines...) Expand all
43 WebURLLoaderMockFactory* 43 WebURLLoaderMockFactory*
44 FetchTestingPlatformSupport::getURLLoaderMockFactory() { 44 FetchTestingPlatformSupport::getURLLoaderMockFactory() {
45 return m_urlLoaderMockFactory.get(); 45 return m_urlLoaderMockFactory.get();
46 } 46 }
47 47
48 WebURLLoader* FetchTestingPlatformSupport::createURLLoader() { 48 WebURLLoader* FetchTestingPlatformSupport::createURLLoader() {
49 return m_urlLoaderMockFactory->createURLLoader(nullptr); 49 return m_urlLoaderMockFactory->createURLLoader(nullptr);
50 } 50 }
51 51
52 } // namespace blink 52 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/testing/FetchTestingPlatformSupport.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698