diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-28 00:11:27 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-28 00:11:27 +0000 |
commit | ec7690fc03aef949ea4eece3c17b3f78b265006e (patch) | |
tree | 8ccd3f4cce7dceb5dcf7782c68d5619f90f2f61f /chrome/browser | |
parent | 2bf52ed344c1036c5b35100e18c23b0698b750fc (diff) | |
download | chromium_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/browser')
-rw-r--r-- | chrome/browser/printing/printing_layout_uitest.cc | 10 | ||||
-rw-r--r-- | chrome/browser/unload_uitest.cc | 8 | ||||
-rw-r--r-- | chrome/browser/views/constrained_window_impl_interactive_uitest.cc | 8 |
3 files changed, 12 insertions, 14 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)); |