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

Unified Diff: chrome/test/base/chrome_test_launcher.cc

Issue 15808008: GTTF: Remove message loop hooks from TestLauncherDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 7 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
« no previous file with comments | « no previous file | content/public/test/test_launcher.h » ('j') | content/public/test/test_utils.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/chrome_test_launcher.cc
===================================================================
--- chrome/test/base/chrome_test_launcher.cc (revision 202993)
+++ chrome/test/base/chrome_test_launcher.cc (working copy)
@@ -22,6 +22,7 @@
#include "chrome/test/base/chrome_test_suite.h"
#include "content/public/app/content_main.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/test/test_utils.h"
#if defined(OS_MACOSX)
#include "chrome/browser/chrome_browser_application_mac.h"
@@ -53,6 +54,12 @@
}
virtual int RunTestSuite(int argc, char** argv) OVERRIDE {
+ content::AddPreRunMessageLoopHook(base::Bind(
+ &ChromeTestLauncherDelegate::PreRunMessageLoop,
+ base::Unretained(this)));
+ content::AddPostRunMessageLoopHook(base::Bind(
+ &ChromeTestLauncherDelegate::PostRunMessageLoop,
+ base::Unretained(this)));
return ChromeTestSuite(argc, argv).Run();
}
@@ -78,7 +85,9 @@
return true;
}
- virtual void PreRunMessageLoop(base::RunLoop* run_loop) OVERRIDE {
+ void PreRunMessageLoop(base::RunLoop* run_loop) {
+ // TODO(phajdan.jr): Remove message loop hooks after switch to Aura.
+ // This includes removing content::Add{Pre,Post}RunMessageLoopHook.
#if !defined(USE_AURA) && defined(TOOLKIT_VIEWS)
if (content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)) {
linked_ptr<views::AcceleratorHandler> handler(
@@ -89,7 +98,9 @@
#endif
}
- virtual void PostRunMessageLoop() OVERRIDE {
+ void PostRunMessageLoop(base::RunLoop* run_loop) {
+ // TODO(phajdan.jr): Remove message loop hooks after switch to Aura.
+ // This includes removing content::Add{Pre,Post}RunMessageLoopHook.
#if !defined(USE_AURA) && defined(TOOLKIT_VIEWS)
if (content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)) {
DCHECK_EQ(handlers_.empty(), false);
@@ -98,6 +109,7 @@
#endif
}
+
protected:
virtual content::ContentMainDelegate* CreateContentMainDelegate() OVERRIDE {
#if defined(OS_WIN) || defined (OS_LINUX)
« no previous file with comments | « no previous file | content/public/test/test_launcher.h » ('j') | content/public/test/test_utils.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698