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

Unified Diff: chrome/browser/browser_about_handler_unittest.cc

Issue 1086733002: Ensure tests have an active task runner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 8 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/browser_about_handler_unittest.cc
diff --git a/chrome/browser/browser_about_handler_unittest.cc b/chrome/browser/browser_about_handler_unittest.cc
index 2448653ab24c3e07bfe12580c0d6957945ee5a92..b90428780eef17f442266a9e1d31c6859dd31cbc 100644
--- a/chrome/browser/browser_about_handler_unittest.cc
+++ b/chrome/browser/browser_about_handler_unittest.cc
@@ -12,6 +12,7 @@
#include "content/public/browser/navigation_entry.h"
#include "content/public/common/referrer.h"
#include "content/public/test/test_browser_thread.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
@@ -20,7 +21,9 @@ using content::NavigationController;
using content::NavigationEntry;
using content::Referrer;
-typedef testing::Test BrowserAboutHandlerTest;
+class BrowserAboutHandlerTest : public testing::Test {
+ content::TestBrowserThreadBundle thread_bundle_;
+};
TEST_F(BrowserAboutHandlerTest, WillHandleBrowserAboutURL) {
std::string chrome_prefix(content::kChromeUIScheme);
@@ -70,8 +73,6 @@ TEST_F(BrowserAboutHandlerTest, WillHandleBrowserAboutURL) {
GURL(chrome_prefix + "host/path?query#ref"),
}
};
- base::MessageLoopForUI message_loop;
- content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop);
TestingProfile profile;
for (size_t i = 0; i < arraysize(test_data); ++i) {

Powered by Google App Engine
This is Rietveld 408576698