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

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: Fixed. Created 6 years, 3 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 a125a8b56080815d8427209d929a00e434330431..a6989b7edbf40963f84ac6a789e2ce6f25ac1036 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"
@@ -93,8 +92,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)
@@ -231,8 +229,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);
@@ -285,8 +282,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