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

Unified Diff: chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc

Issue 62117: linux: pass a bunch more ui tests. (Closed)
Patch Set: more tests 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/browser/errorpage_uitest.cc ('k') | chrome/browser/tab_contents/view_source_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc b/chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc
index 682336a5b3bb8751223cb93f8a203397aec414a5..d6946a924c3635185e64e92c067022344a8dde83 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc
+++ b/chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc
@@ -29,7 +29,7 @@ class ResourceDispatcherTest : public UITest {
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, DoNotSniffHTMLFromImageGIF) {
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,7 +210,8 @@ TEST_F(ResourceDispatcherTest, CrossSiteAfterCrash) {
// 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.
@@ -268,7 +269,7 @@ TEST_F(ResourceDispatcherTest, CrossSiteNavigationErrorPage) {
// 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;
@@ -289,10 +290,11 @@ TEST_F(ResourceDispatcherTest, CrossSiteNavigationErrorPage) {
// the onunload handler, and the navigation would fail.
// (Test by redirecting to javascript:window.location='someURL'.)
GURL test_url(server->TestServerPageW(L"files/title2.html"));
- std::wstring redirect_url = L"javascript:window.location='" +
- ASCIIToWide(test_url.possibly_invalid_spec()) + L"'";
+ std::string redirect_url = "javascript:window.location='" +
+ test_url.possibly_invalid_spec() + "'";
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);
}
« no previous file with comments | « chrome/browser/errorpage_uitest.cc ('k') | chrome/browser/tab_contents/view_source_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698