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

Side by Side Diff: webkit/tools/test_shell/layout_test_controller.cc

Issue 9582043: Convert uses of int ms to TimeDelta in webkit/glue and webkit/tools. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 9 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 | « webkit/glue/webthread_impl.cc ('k') | webkit/tools/test_shell/webwidget_host.cc » ('j') | 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 // This file contains the definition for LayoutTestController. 5 // This file contains the definition for LayoutTestController.
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "webkit/tools/test_shell/layout_test_controller.h" 9 #include "webkit/tools/test_shell/layout_test_controller.h"
10 10
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 is_debugger_present = ::IsDebuggerPresent(); 153 is_debugger_present = ::IsDebuggerPresent();
154 #endif 154 #endif
155 155
156 if (!is_debugger_present) { 156 if (!is_debugger_present) {
157 // TODO(ojan): Use base::OneShotTimer. For some reason, using OneShotTimer 157 // TODO(ojan): Use base::OneShotTimer. For some reason, using OneShotTimer
158 // seems to cause layout test failures on the try bots. 158 // seems to cause layout test failures on the try bots.
159 MessageLoop::current()->PostDelayedTask( 159 MessageLoop::current()->PostDelayedTask(
160 FROM_HERE, 160 FROM_HERE,
161 base::Bind(&LayoutTestController::notifyDoneTimedOut, 161 base::Bind(&LayoutTestController::notifyDoneTimedOut,
162 weak_factory_.GetWeakPtr()), 162 weak_factory_.GetWeakPtr()),
163 shell_->GetLayoutTestTimeout()); 163 base::TimeDelta::FromMilliseconds(shell_->GetLayoutTestTimeout()));
164 } 164 }
165 165
166 wait_until_done_ = true; 166 wait_until_done_ = true;
167 result->SetNull(); 167 result->SetNull();
168 } 168 }
169 169
170 void LayoutTestController::notifyDone( 170 void LayoutTestController::notifyDone(
171 const CppArgumentList& args, CppVariant* result) { 171 const CppArgumentList& args, CppVariant* result) {
172 // Test didn't timeout. Kill the timeout timer. 172 // Test didn't timeout. Kill the timeout timer.
173 weak_factory_.InvalidateWeakPtrs(); 173 weak_factory_.InvalidateWeakPtrs();
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 } 276 }
277 result->SetNull(); 277 result->SetNull();
278 } 278 }
279 279
280 void LayoutTestController::LogErrorToConsole(const std::string& text) { 280 void LayoutTestController::LogErrorToConsole(const std::string& text) {
281 shell_->delegate()->didAddMessageToConsole( 281 shell_->delegate()->didAddMessageToConsole(
282 WebConsoleMessage(WebConsoleMessage::LevelError, 282 WebConsoleMessage(WebConsoleMessage::LevelError,
283 WebString::fromUTF8(text)), 283 WebString::fromUTF8(text)),
284 WebString(), 0); 284 WebString(), 0);
285 } 285 }
OLDNEW
« no previous file with comments | « webkit/glue/webthread_impl.cc ('k') | webkit/tools/test_shell/webwidget_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698