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

Side by Side Diff: chrome/test/automation/automation_proxy.cc

Issue 63113: Convert Windows Sleep to PlatformThread::Sleep... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 <sstream> 5 #include <sstream>
6 6
7 #include "chrome/test/automation/automation_proxy.h" 7 #include "chrome/test/automation/automation_proxy.h"
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/platform_thread.h" 11 #include "base/platform_thread.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 bool dialog_shown = false; 315 bool dialog_shown = false;
316 views::DialogDelegate::DialogButton button = 316 views::DialogDelegate::DialogButton button =
317 views::DialogDelegate::DIALOGBUTTON_NONE; 317 views::DialogDelegate::DIALOGBUTTON_NONE;
318 bool succeeded = GetShowingAppModalDialog(&dialog_shown, &button); 318 bool succeeded = GetShowingAppModalDialog(&dialog_shown, &button);
319 if (!succeeded) { 319 if (!succeeded) {
320 // Try again next round, but log it. 320 // Try again next round, but log it.
321 DLOG(ERROR) << "GetShowingAppModalDialog returned false"; 321 DLOG(ERROR) << "GetShowingAppModalDialog returned false";
322 } else if (dialog_shown) { 322 } else if (dialog_shown) {
323 return true; 323 return true;
324 } 324 }
325 Sleep(automation::kSleepTime); 325 PlatformThread::Sleep(automation::kSleepTime);
326 } 326 }
327 // Dialog never shown. 327 // Dialog never shown.
328 return false; 328 return false;
329 } 329 }
330 #endif // defined(OS_WIN) 330 #endif // defined(OS_WIN)
331 331
332 bool AutomationProxy::WaitForURLDisplayed(GURL url, int wait_timeout) { 332 bool AutomationProxy::WaitForURLDisplayed(GURL url, int wait_timeout) {
333 const TimeTicks start = TimeTicks::Now(); 333 const TimeTicks start = TimeTicks::Now();
334 const TimeDelta timeout = TimeDelta::FromMilliseconds(wait_timeout); 334 const TimeDelta timeout = TimeDelta::FromMilliseconds(wait_timeout);
335 while (TimeTicks::Now() - start < timeout) { 335 while (TimeTicks::Now() - start < timeout) {
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 &handle)); 485 &handle));
486 if (!succeeded) { 486 if (!succeeded) {
487 return NULL; 487 return NULL;
488 } 488 }
489 489
490 DCHECK(IsWindow(*external_tab_container)); 490 DCHECK(IsWindow(*external_tab_container));
491 491
492 return new TabProxy(this, tracker_.get(), handle); 492 return new TabProxy(this, tracker_.get(), handle);
493 } 493 }
494 #endif // defined(OS_WIN) 494 #endif // defined(OS_WIN)
OLDNEW
« no previous file with comments | « chrome/test/automation/autocomplete_edit_proxy.cc ('k') | chrome/test/automation/automation_proxy_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698