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

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

Issue 2657583004: ResourceFetcherTest: cleanup finalization (Closed)
Patch Set: review #9 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/loader/fetch/ResourceFetcherTest.cpp » ('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 5f310469b16d744f48cf3f586509ef242cd48a84..5a59f775fd1e6710cb5410c7745c2b0233b72620 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/FetchTestingPlatformSupport.cpp
+++ b/third_party/WebKit/Source/platform/loader/fetch/FetchTestingPlatformSupport.cpp
@@ -47,7 +47,12 @@ class AssertWebURLLoader : public WebURLLoader {
FetchTestingPlatformSupport::FetchTestingPlatformSupport()
: m_urlLoaderMockFactory(new WebURLLoaderMockFactoryImpl(this)) {}
-FetchTestingPlatformSupport::~FetchTestingPlatformSupport() = default;
+FetchTestingPlatformSupport::~FetchTestingPlatformSupport() {
+ // Shutdowns WebURLLoaderMockFactory gracefully, serving all pending requests
+ // first, then flushing all registered URLs.
+ m_urlLoaderMockFactory->serveAsynchronousRequests();
+ m_urlLoaderMockFactory->unregisterAllURLs();
+}
MockFetchContext* FetchTestingPlatformSupport::context() {
if (!m_context) {
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698