summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-28 00:11:27 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-28 00:11:27 +0000
commitec7690fc03aef949ea4eece3c17b3f78b265006e (patch)
tree8ccd3f4cce7dceb5dcf7782c68d5619f90f2f61f /chrome/test
parent2bf52ed344c1036c5b35100e18c23b0698b750fc (diff)
downloadchromium_src-ec7690fc03aef949ea4eece3c17b3f78b265006e.zip
chromium_src-ec7690fc03aef949ea4eece3c17b3f78b265006e.tar.gz
chromium_src-ec7690fc03aef949ea4eece3c17b3f78b265006e.tar.bz2
Convert Windows Sleep to PlatformThread::Sleep
First stage to make tests/others cross-platform. BUG=None TEST=Ran tests successfully (windows) Review URL: http://codereview.chromium.org/63113 Patch from Mohamed Mansour <m0.interactive@gmail.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14688 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/automated_ui_tests/automated_ui_tests.cc4
-rw-r--r--chrome/test/automation/autocomplete_edit_proxy.cc4
-rw-r--r--chrome/test/memory_test/memory_test.cc6
-rw-r--r--chrome/test/reliability/page_load_test.cc6
-rw-r--r--chrome/test/ui/ui_test.cc6
5 files changed, 13 insertions, 13 deletions
diff --git a/chrome/test/automated_ui_tests/automated_ui_tests.cc b/chrome/test/automated_ui_tests/automated_ui_tests.cc
index f566364..2867c23 100644
--- a/chrome/test/automated_ui_tests/automated_ui_tests.cc
+++ b/chrome/test/automated_ui_tests/automated_ui_tests.cc
@@ -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.
@@ -346,7 +346,7 @@ bool AutomatedUITest::DoAction(const std::string & action) {
did_complete_action = true;
} else if (LowerCaseEqualsASCII(action, "sleep")) {
// This is for debugging, it probably shouldn't be used real tests.
- Sleep(kDebuggingTimeoutMsec);
+ PlatformThread::Sleep(kDebuggingTimeoutMsec);
did_complete_action = true;
} else if (LowerCaseEqualsASCII(action, "star")) {
did_complete_action = StarPage();
diff --git a/chrome/test/automation/autocomplete_edit_proxy.cc b/chrome/test/automation/autocomplete_edit_proxy.cc
index f7f23f2e..59c64ba 100644
--- a/chrome/test/automation/autocomplete_edit_proxy.cc
+++ b/chrome/test/automation/autocomplete_edit_proxy.cc
@@ -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.
@@ -65,7 +65,7 @@ bool AutocompleteEditProxy::WaitForQuery(int wait_timeout_ms) const {
while (TimeTicks::Now() - start < timeout) {
if (IsQueryInProgress(&query_in_progress) && !query_in_progress)
return true;
- Sleep(automation::kSleepTime);
+ PlatformThread::Sleep(automation::kSleepTime);
}
// If we get here the query is still in progress.
return false;
diff --git a/chrome/test/memory_test/memory_test.cc b/chrome/test/memory_test/memory_test.cc
index b1c213a..ce66ad1 100644
--- a/chrome/test/memory_test/memory_test.cc
+++ b/chrome/test/memory_test/memory_test.cc
@@ -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.
@@ -220,7 +220,7 @@ class MemoryTest : public UITest {
std::string url = urls[counter];
if (url == "<PAUSE>") { // Special command to delay on this page
- Sleep(2000);
+ PlatformThread::Sleep(2000);
continue;
}
@@ -251,7 +251,7 @@ class MemoryTest : public UITest {
// TODO(mbelshe): Bug 2953
// The automation crashes periodically if we cycle too quickly.
// To make these tests more reliable, slowing them down a bit.
- Sleep(100);
+ PlatformThread::Sleep(100);
}
size_t stop_size = GetSystemCommitCharge();
diff --git a/chrome/test/reliability/page_load_test.cc b/chrome/test/reliability/page_load_test.cc
index bce2fb7..6134c81 100644
--- a/chrome/test/reliability/page_load_test.cc
+++ b/chrome/test/reliability/page_load_test.cc
@@ -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.
//
@@ -182,9 +182,9 @@ class PageLoadTest : public UITest {
&activation_timeout);
if (!activation_timeout) {
window->SimulateOSKeyPress(VK_NEXT, 0);
- Sleep(sleep_timeout_ms());
+ PlatformThread::Sleep(sleep_timeout_ms());
window->SimulateOSKeyPress(VK_NEXT, 0);
- Sleep(sleep_timeout_ms());
+ PlatformThread::Sleep(sleep_timeout_ms());
}
}
}
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index 01eb35a..0ee888b 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -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.
@@ -528,7 +528,7 @@ bool UITest::WaitForFindWindowVisibilityChange(BrowserProxy* browser,
return true; // Find window visibility change complete.
// Give it a chance to catch up.
- Sleep(sleep_timeout_ms() / kCycles);
+ PlatformThread::Sleep(sleep_timeout_ms() / kCycles);
}
return false;
}
@@ -545,7 +545,7 @@ bool UITest::WaitForBookmarkBarVisibilityChange(BrowserProxy* browser,
return true; // Bookmark bar visibility change complete.
// Give it a chance to catch up.
- Sleep(sleep_timeout_ms() / kCycles);
+ PlatformThread::Sleep(sleep_timeout_ms() / kCycles);
}
return false;
}