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

Side by Side Diff: chrome/browser/errorpage_uitest.cc

Issue 7149013: Remove most of the remaining test dependencies (other than chrome/test). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/string_util.h" 5 #include "base/string_util.h"
6 #include "base/test/test_timeouts.h" 6 #include "base/test/test_timeouts.h"
7 #include "base/threading/platform_thread.h" 7 #include "base/threading/platform_thread.h"
8 #include "chrome/test/automation/tab_proxy.h" 8 #include "chrome/test/automation/tab_proxy.h"
9 #include "chrome/test/ui/ui_test.h" 9 #include "chrome/test/ui/ui_test.h"
10 #include "chrome/browser/net/url_request_failed_dns_job.h" 10 #include "content/browser/net/url_request_failed_dns_job.h"
11 #include "chrome/browser/net/url_request_mock_http_job.h" 11 #include "content/browser/net/url_request_mock_http_job.h"
12 #include "net/test/test_server.h" 12 #include "net/test/test_server.h"
13 13
14 class ErrorPageTest : public UITest { 14 class ErrorPageTest : public UITest {
15 protected: 15 protected:
16 bool WaitForTitleMatching(const std::wstring& title) { 16 bool WaitForTitleMatching(const std::wstring& title) {
17 for (int i = 0; i < 10; ++i) { 17 for (int i = 0; i < 10; ++i) {
18 if (GetActiveTabTitle() == title) 18 if (GetActiveTabTitle() == title)
19 return true; 19 return true;
20 base::PlatformThread::Sleep(TestTimeouts::action_timeout_ms()); 20 base::PlatformThread::Sleep(TestTimeouts::action_timeout_ms());
21 } 21 }
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 EXPECT_TRUE(WaitForTitleMatching(L"Blah")); 183 EXPECT_TRUE(WaitForTitleMatching(L"Blah"));
184 } 184 }
185 185
186 // Checks that the Link Doctor is not loaded when we receive an actual 404 page. 186 // Checks that the Link Doctor is not loaded when we receive an actual 404 page.
187 TEST_F(ErrorPageTest, Page404) { 187 TEST_F(ErrorPageTest, Page404) {
188 NavigateToURL(URLRequestMockHTTPJob::GetMockUrl( 188 NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(
189 FilePath(FILE_PATH_LITERAL("page404.html")))); 189 FilePath(FILE_PATH_LITERAL("page404.html"))));
190 190
191 EXPECT_TRUE(WaitForTitleMatching(L"SUCCESS")); 191 EXPECT_TRUE(WaitForTitleMatching(L"SUCCESS"));
192 } 192 }
OLDNEW
« no previous file with comments | « chrome/browser/download/save_page_uitest.cc ('k') | chrome/browser/net/url_request_failed_dns_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698