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

Unified Diff: chrome/browser/extensions/extension_disabled_ui_browsertest.cc

Issue 409743003: Use content::RunBlockingPoolTask() in tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased + reverted changes to content/browser/media/webrtc_identity_store_unittest.cc. Created 6 years, 4 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/extension_disabled_ui_browsertest.cc
diff --git a/chrome/browser/extensions/extension_disabled_ui_browsertest.cc b/chrome/browser/extensions/extension_disabled_ui_browsertest.cc
index 4a523e7faeffe21464979f6aa660eafeba24cdf7..78bf9d0671054bd7a94613f296b45ada36e55d61 100644
--- a/chrome/browser/extensions/extension_disabled_ui_browsertest.cc
+++ b/chrome/browser/extensions/extension_disabled_ui_browsertest.cc
@@ -4,7 +4,6 @@
#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
-#include "base/run_loop.h"
#include "base/threading/sequenced_worker_pool.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/extensions/extension_browsertest.h"
@@ -92,8 +91,7 @@ class ExtensionDisabledGlobalErrorTest : public ExtensionBrowserTest {
size_t size_before = registry_->enabled_extensions().size();
if (UpdateExtension(extension->id(), crx_path, expected_change))
return NULL;
- content::BrowserThread::GetBlockingPool()->FlushForTesting();
- base::RunLoop().RunUntilIdle();
+ content::RunAllBlockingPoolTasksUntilIdle();
EXPECT_EQ(size_before + expected_change,
registry_->enabled_extensions().size());
if (registry_->disabled_extensions().size() != 1u)
@@ -227,8 +225,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionDisabledGlobalErrorTest,
EXPECT_FALSE(sync_service->ProcessExtensionSyncData(sync_data));
WaitForExtensionInstall();
- content::BrowserThread::GetBlockingPool()->FlushForTesting();
- base::RunLoop().RunUntilIdle();
+ content::RunAllBlockingPoolTasksUntilIdle();
extension = service_->GetExtensionById(extension_id, true);
ASSERT_TRUE(extension);
@@ -278,8 +275,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionDisabledGlobalErrorTest, RemoteInstall) {
extensions::ExtensionSyncData(sync_data)));
WaitForExtensionInstall();
- content::BrowserThread::GetBlockingPool()->FlushForTesting();
- base::RunLoop().RunUntilIdle();
+ content::RunAllBlockingPoolTasksUntilIdle();
const Extension* extension = service_->GetExtensionById(extension_id, true);
ASSERT_TRUE(extension);

Powered by Google App Engine
This is Rietveld 408576698