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

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

Issue 12546016: Remove the Extensions URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 7 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/menu_manager_unittest.cc
diff --git a/chrome/browser/extensions/menu_manager_unittest.cc b/chrome/browser/extensions/menu_manager_unittest.cc
index 5b402be62fab697bc399490aabcbf0dff7f10a12..c179a9f4e09382e05c2dd3a8c64efe3301561251 100644
--- a/chrome/browser/extensions/menu_manager_unittest.cc
+++ b/chrome/browser/extensions/menu_manager_unittest.cc
@@ -10,6 +10,7 @@
#include "base/message_loop/message_loop.h"
#include "base/path_service.h"
#include "base/prefs/pref_service.h"
+#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/browser/chrome_notification_types.h"
@@ -24,9 +25,10 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/test/base/testing_profile.h"
+#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
#include "content/public/common/context_menu_params.h"
-#include "content/public/test/test_browser_thread.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -44,15 +46,13 @@ namespace extensions {
class MenuManagerTest : public testing::Test {
public:
MenuManagerTest()
- : ui_thread_(BrowserThread::UI, &message_loop_),
- file_thread_(BrowserThread::FILE, &message_loop_),
- manager_(&profile_),
- prefs_(message_loop_.message_loop_proxy().get()),
+ : manager_(&profile_),
+ prefs_(base::MessageLoopForUI::current()->message_loop_proxy().get()),
next_id_(1) {}
virtual void TearDown() OVERRIDE {
prefs_.pref_service()->CommitPendingWrite();
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
// Returns a test item.
@@ -83,10 +83,8 @@ class MenuManagerTest : public testing::Test {
}
protected:
+ content::TestBrowserThreadBundle thread_bundle_;
TestingProfile profile_;
- base::MessageLoopForUI message_loop_;
- content::TestBrowserThread ui_thread_;
- content::TestBrowserThread file_thread_;
MenuManager manager_;
ExtensionList extensions_;

Powered by Google App Engine
This is Rietveld 408576698