summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/printing/printing_layout_uitest.cc10
-rw-r--r--chrome/browser/unload_uitest.cc8
-rw-r--r--chrome/browser/views/constrained_window_impl_interactive_uitest.cc8
-rw-r--r--chrome/common/ipc_tests.cc4
-rw-r--r--chrome/common/logging_chrome_uitest.cc6
-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
10 files changed, 30 insertions, 32 deletions
diff --git a/chrome/browser/printing/printing_layout_uitest.cc b/chrome/browser/printing/printing_layout_uitest.cc
index c841309..3890df2 100644
--- a/chrome/browser/printing/printing_layout_uitest.cc
+++ b/chrome/browser/printing/printing_layout_uitest.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.
@@ -300,7 +300,7 @@ class PrintingLayoutTest : public PrintingTest<UITest> {
if (file_util::Delete(emf_path(), true)) {
break;
}
- Sleep(100);
+ PlatformThread::Sleep(100);
}
file_util::CreateDirectory(emf_path());
}
@@ -358,7 +358,7 @@ class PrintingLayoutTest : public PrintingTest<UITest> {
}
if (found_emf && found_prn)
break;
- Sleep(100);
+ PlatformThread::Sleep(100);
}
EXPECT_TRUE(found_emf) << ".PRN file is: " << prn_file;
EXPECT_TRUE(found_prn) << ".EMF file is: " << emf_file;
@@ -450,13 +450,13 @@ class DismissTheWindow : public base::DelegateSimpleThread::Delegate {
break;
}
}
- Sleep(10);
+ PlatformThread::Sleep(10);
}
// Now verify that it indeed closed itself.
while (IsWindow(dialog_window)) {
CloseDialogWindow(dialog_window);
- Sleep(10);
+ PlatformThread::Sleep(10);
}
}
diff --git a/chrome/browser/unload_uitest.cc b/chrome/browser/unload_uitest.cc
index d499411..61b8ec1 100644
--- a/chrome/browser/unload_uitest.cc
+++ b/chrome/browser/unload_uitest.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.
@@ -122,11 +122,9 @@ class UnloadTest : public UITest {
}
void NavigateToNolistenersFileTwice() {
- NavigateToURL(
- URLRequestMockHTTPJob::GetMockUrl(L"title2.html"));
+ NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(L"title2.html"));
CheckTitle(L"Title Of Awesomeness");
- NavigateToURL(
- URLRequestMockHTTPJob::GetMockUrl(L"title2.html"));
+ NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(L"title2.html"));
CheckTitle(L"Title Of Awesomeness");
}
diff --git a/chrome/browser/views/constrained_window_impl_interactive_uitest.cc b/chrome/browser/views/constrained_window_impl_interactive_uitest.cc
index 1ccb80f..9eef16c 100644
--- a/chrome/browser/views/constrained_window_impl_interactive_uitest.cc
+++ b/chrome/browser/views/constrained_window_impl_interactive_uitest.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.
@@ -87,7 +87,7 @@ TEST_F(InteractiveConstrainedWindowTest, TestOpenAndResizeTo) {
// No idea how to wait here other then sleeping. This timeout used to be
// lower, then we started hitting it before it was done. :(
- Sleep(5000);
+ PlatformThread::Sleep(5000);
// The actual content will be LESS than (200, 200) because resizeTo
// deals with a window's outer{Width,Height} instead of its
@@ -160,7 +160,7 @@ TEST_F(InteractiveConstrainedWindowTest, DontSpawnEndlessPopups) {
continuing = false;
} else {
// Nothing intereseting is going on wait it out.
- Sleep(automation::kSleepTime);
+ PlatformThread::Sleep(automation::kSleepTime);
times_slept++;
}
} else {
@@ -181,7 +181,7 @@ TEST_F(InteractiveConstrainedWindowTest, WindowOpenWindowClosePopup) {
ASSERT_TRUE(automation()->WaitForWindowCountToBecome(2, 5000));
- Sleep(1000);
+ PlatformThread::Sleep(1000);
// Make sure we have a blocked popup notification
scoped_ptr<BrowserProxy> popup_browser(automation()->GetBrowserWindow(1));
diff --git a/chrome/common/ipc_tests.cc b/chrome/common/ipc_tests.cc
index ae88659..4c44d44e 100644
--- a/chrome/common/ipc_tests.cc
+++ b/chrome/common/ipc_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.
@@ -436,7 +436,7 @@ TEST_F(IPCChannelTest, Performance) {
HANDLE process = SpawnChild(TEST_REFLECTOR, &chan);
ASSERT_TRUE(process);
- Sleep(1000);
+ PlatformThread::Sleep(1000);
PerfTimeLogger logger("IPC_Perf");
diff --git a/chrome/common/logging_chrome_uitest.cc b/chrome/common/logging_chrome_uitest.cc
index c03eb88..99fac8d 100644
--- a/chrome/common/logging_chrome_uitest.cc
+++ b/chrome/common/logging_chrome_uitest.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.
@@ -108,7 +108,7 @@ TEST_F(RendererCrashTest, Crash) {
expected_crashes_ = 0;
} else {
// Wait while the process is writing the crash dump.
- Sleep(5000);
+ PlatformThread::Sleep(5000);
expected_crashes_ = 1;
}
}
@@ -129,6 +129,6 @@ class BrowserCrashTest : public UITest {
// This test is disabled. See bug 1198934.
TEST_F(BrowserCrashTest, DISABLED_Crash) {
// Wait while the process is writing the crash dump.
- Sleep(5000);
+ PlatformThread::Sleep(5000);
expected_crashes_ = 1;
}
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;
}