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

Unified Diff: chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc

Issue 2890853002: Downloads: replace BrowserThread::FILE with task scheduler. (Closed)
Patch Set: Revert ScopedCOMInitializer invocations. Created 3 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: chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc
diff --git a/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc b/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc
index 00258b02fbfe901abc0b6bce62c7866371937e6f..c65ef3e29a17a112c5d44296dc51c6f6a97f6436 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc
@@ -48,6 +48,7 @@
#include "content/public/common/content_features.h"
#include "content/public/test/download_test_observer.h"
#include "content/public/test/test_download_request_handler.h"
+#include "content/public/test/test_utils.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/notification_types.h"
#include "net/base/data_url.h"
@@ -1002,8 +1003,8 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
// be able to query the file icon.
download_item->Cancel(true);
ASSERT_FALSE(download_item->GetTargetFilePath().empty());
- // Let cleanup complete on the FILE thread.
- content::RunAllPendingInMessageLoop(BrowserThread::FILE);
+ // Let cleanup complete on blocking threads.
+ content::RunAllBlockingPoolTasksUntilIdle();
// Check the path passed to the icon extractor post-cancellation.
EXPECT_TRUE(RunFunctionAndReturnString(MockedGetFileIconFunction(
download_item->GetTargetFilePath(), IconLoader::NORMAL, "foo"),

Powered by Google App Engine
This is Rietveld 408576698