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

Side by Side Diff: chrome/test/base/view_event_test_base.cc

Issue 10027014: Update uses of TimeDelta in chrome/test/base. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/test/base/view_event_test_base.h" 5 #include "chrome/test/base/view_event_test_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 } 159 }
160 160
161 void ViewEventTestBase::ScheduleMouseMoveInBackground(int x, int y) { 161 void ViewEventTestBase::ScheduleMouseMoveInBackground(int x, int y) {
162 if (!dnd_thread_.get()) { 162 if (!dnd_thread_.get()) {
163 dnd_thread_.reset(new base::Thread("mouse-move-thread")); 163 dnd_thread_.reset(new base::Thread("mouse-move-thread"));
164 dnd_thread_->Start(); 164 dnd_thread_->Start();
165 } 165 }
166 dnd_thread_->message_loop()->PostDelayedTask( 166 dnd_thread_->message_loop()->PostDelayedTask(
167 FROM_HERE, 167 FROM_HERE,
168 base::Bind(base::IgnoreResult(&ui_controls::SendMouseMove), x, y), 168 base::Bind(base::IgnoreResult(&ui_controls::SendMouseMove), x, y),
169 kMouseMoveDelayMS); 169 base::TimeDelta::FromMilliseconds(kMouseMoveDelayMS));
170 } 170 }
171 171
172 void ViewEventTestBase::StopBackgroundThread() { 172 void ViewEventTestBase::StopBackgroundThread() {
173 dnd_thread_.reset(NULL); 173 dnd_thread_.reset(NULL);
174 } 174 }
175 175
176 void ViewEventTestBase::RunTestMethod(const base::Closure& task) { 176 void ViewEventTestBase::RunTestMethod(const base::Closure& task) {
177 StopBackgroundThread(); 177 StopBackgroundThread();
178 178
179 task.Run(); 179 task.Run();
180 if (HasFatalFailure()) 180 if (HasFatalFailure())
181 Done(); 181 Done();
182 } 182 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698