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

Unified Diff: chrome/test/base/view_event_test_base.h

Issue 8212006: base::Bind: Cleanup in automation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mac build fix. Created 9 years, 2 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 | « chrome/test/base/ui_test_utils_win.cc ('k') | chrome/test/base/view_event_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/view_event_test_base.h
diff --git a/chrome/test/base/view_event_test_base.h b/chrome/test/base/view_event_test_base.h
index 86610ad1253ec9a3b08429bcc1d59800b75260eb..b4b0027fa2feeb142b00ec8b7f0f0542bf6882a6 100644
--- a/chrome/test/base/view_event_test_base.h
+++ b/chrome/test/base/view_event_test_base.h
@@ -11,14 +11,13 @@
// This way if a test hangs the test launcher can reliably terminate it.
#if defined(HAS_OUT_OF_PROC_TEST_RUNNER)
+#include "base/bind.h"
+#include "base/callback.h"
#include "base/message_loop.h"
-#include "base/task.h"
#include "base/threading/thread.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "views/widget/widget_delegate.h"
-class Task;
-
namespace gfx {
class Size;
}
@@ -81,7 +80,7 @@ class ViewEventTestBase : public views::WidgetDelegate,
virtual const views::Widget* GetWidget() const OVERRIDE;
virtual views::Widget* GetWidget() OVERRIDE;
- // Overriden to do nothing so that this class can be used in runnable tasks.
+ // Overridden to do nothing so that this class can be used in runnable tasks.
void AddRef() {}
void Release() {}
static bool ImplementsThreadSafeReferenceCounting() { return false; }
@@ -108,9 +107,9 @@ class ViewEventTestBase : public views::WidgetDelegate,
// method is called in such a way that if there are any test failures
// Done is invoked.
template <class T, class Method>
- Task* CreateEventTask(T* target, Method method) {
- return NewRunnableMethod(this, &ViewEventTestBase::RunTestMethod,
- NewRunnableMethod(target, method));
+ base::Closure CreateEventTask(T* target, Method method) {
+ return base::Bind(&ViewEventTestBase::RunTestMethod, this,
+ base::Bind(method, target));
}
// Spawns a new thread posts a MouseMove in the background.
@@ -124,7 +123,7 @@ class ViewEventTestBase : public views::WidgetDelegate,
// Callback from CreateEventTask. Stops the background thread, runs the
// supplied task and if there are failures invokes Done.
- void RunTestMethod(Task* task);
+ void RunTestMethod(const base::Closure& task);
// The content of the Window.
views::View* content_view_;
« no previous file with comments | « chrome/test/base/ui_test_utils_win.cc ('k') | chrome/test/base/view_event_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698