| Index: chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc
|
| ===================================================================
|
| --- chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc (revision 13127)
|
| +++ chrome/browser/renderer_host/resource_dispatcher_host_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.
|
|
|
| @@ -29,7 +29,7 @@
|
| int max_wait_time = 5000;
|
| while (max_wait_time > 0) {
|
| max_wait_time -= kCheckDelayMs;
|
| - Sleep(kCheckDelayMs);
|
| + PlatformThread::Sleep(kCheckDelayMs);
|
| if (expected_title == GetActiveTabTitle())
|
| break;
|
| }
|
| @@ -65,7 +65,7 @@
|
| TEST_F(ResourceDispatcherTest, SniffNoContentTypeNoData) {
|
| CheckTitleTest(L"content-sniffer-test3.html",
|
| L"Content Sniffer Test 3");
|
| - Sleep(sleep_timeout_ms() * 2);
|
| + PlatformThread::Sleep(sleep_timeout_ms() * 2);
|
| EXPECT_EQ(1, GetTabCount());
|
|
|
| // Make sure the download shelf is not showing.
|
| @@ -210,8 +210,10 @@
|
| // Cause the renderer to crash.
|
| expected_crashes_ = 1;
|
| tab->NavigateToURLAsync(GURL("about:crash"));
|
| - Sleep(sleep_timeout_ms()); // Wait for browser to notice the renderer crash.
|
|
|
| + // Wait for browser to notice the renderer crash.
|
| + PlatformThread::Sleep(sleep_timeout_ms());
|
| +
|
| // Navigate to a new cross-site page. The browser should not wait around for
|
| // the old renderer's on{before}unload handlers to run.
|
| CheckTitleTest(L"content-sniffer-test0.html",
|
| @@ -268,7 +270,7 @@
|
| // reason as ErrorPageTest::DNSError. See bug 1199491.
|
| tab->NavigateToURL(GURL(URLRequestFailedDnsJob::kTestUrl));
|
| for (int i = 0; i < 10; ++i) {
|
| - Sleep(sleep_timeout_ms());
|
| + PlatformThread::Sleep(sleep_timeout_ms());
|
| if (GetActiveTabTitle() != L"set cookie on unload") {
|
| // Success, bail out.
|
| break;
|
| @@ -292,7 +294,9 @@
|
| std::wstring redirect_url = L"javascript:window.location='" +
|
| ASCIIToWide(test_url.possibly_invalid_spec()) + L"'";
|
| tab->NavigateToURLAsync(GURL(redirect_url));
|
| - Sleep(sleep_timeout_ms()); // Wait for JavaScript redirect to happen.
|
| +
|
| + // Wait for JavaScript redirect to happen.
|
| + PlatformThread::Sleep(sleep_timeout_ms());
|
| EXPECT_TRUE(tab->GetTabTitle(&tab_title));
|
| EXPECT_EQ(L"Title Of Awesomeness", tab_title);
|
| }
|
|
|