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

Unified Diff: chrome/test/automation/automation_proxy_uitest.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/automation/automation_proxy.cc ('k') | chrome/test/memory_test/memory_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/automation/automation_proxy_uitest.cc
===================================================================
--- chrome/test/automation/automation_proxy_uitest.cc (revision 13127)
+++ chrome/test/automation/automation_proxy_uitest.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -295,7 +295,7 @@
1, &is_timeout);
ASSERT_TRUE(is_timeout);
- Sleep(10);
+ PlatformThread::Sleep(10);
}
// This test is disabled. See bug 794412.
@@ -320,7 +320,7 @@
10000, &is_timeout);
ASSERT_FALSE(is_timeout);
- Sleep(10);
+ PlatformThread::Sleep(10);
}
TEST_F(AutomationProxyTest, GoBackForward) {
@@ -500,7 +500,7 @@
std::wstring title;
int i;
for (i = 0; i < 10; ++i) {
- Sleep(sleep_timeout_ms());
+ PlatformThread::Sleep(sleep_timeout_ms());
ASSERT_TRUE(tab->GetTabTitle(&title));
if (title == L"Destinations" || title == L"New Tab")
break;
@@ -638,7 +638,7 @@
std::wstring title;
int i;
for (i = 0; i < 10; ++i) {
- Sleep(sleep_timeout_ms());
+ PlatformThread::Sleep(sleep_timeout_ms());
ASSERT_TRUE(tab->GetTabTitle(&title));
if (title == L"Destinations")
break;
@@ -841,7 +841,7 @@
bool WaitForNavigationComplete(int max_time_to_wait_ms) {
base::TimeTicks start(base::TimeTicks::Now());
while (!navigate_complete_) {
- Sleep(50);
+ PlatformThread::Sleep(50);
MessageLoop::current()->RunAllPending();
base::TimeTicks end(base::TimeTicks::Now());
base::TimeDelta delta = end - start;
@@ -894,7 +894,7 @@
tab->NavigateInExternalTab(GURL(L"http://www.google.com"));
EXPECT_EQ(true, ExternalTabHandler(external_tab_container, 1000));
// Since the tab goes away lazily, wait a bit
- Sleep(1000);
+ PlatformThread::Sleep(1000);
EXPECT_FALSE(tab->is_valid());
}
}
@@ -1107,7 +1107,7 @@
tab->NavigateToURL(net::FilePathToFileURL(filename));
// Allow some time for the popup to show up and close.
- Sleep(2000);
+ PlatformThread::Sleep(2000);
std::wstring expected(L"string");
std::wstring jscript = CreateJSString(L"\"" + expected + L"\"");
« no previous file with comments | « chrome/test/automation/automation_proxy.cc ('k') | chrome/test/memory_test/memory_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698