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

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

Issue 12212048: Linux/ChromeOS Chromium style checker cleanup, chrome/browser edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/bind.h" 5 #include "base/bind.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "chrome/browser/net/url_request_mock_util.h" 7 #include "chrome/browser/net/url_request_mock_util.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_commands.h" 9 #include "chrome/browser/ui/browser_commands.h"
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" 10 #include "chrome/browser/ui/tabs/tab_strip_model.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // Navigates forward in the history and waits for |num_navigations| to occur, 62 // Navigates forward in the history and waits for |num_navigations| to occur,
63 // and the title to change to |expected_title|. 63 // and the title to change to |expected_title|.
64 void GoForwardAndWaitForTitle(const std::string& expected_title, 64 void GoForwardAndWaitForTitle(const std::string& expected_title,
65 int num_navigations) { 65 int num_navigations) {
66 NavigateHistoryAndWaitForTitle(expected_title, 66 NavigateHistoryAndWaitForTitle(expected_title,
67 num_navigations, 67 num_navigations,
68 HISTORY_NAVIGATE_FORWARD); 68 HISTORY_NAVIGATE_FORWARD);
69 } 69 }
70 70
71 protected: 71 protected:
72 void SetUpOnMainThread() OVERRIDE { 72 virtual void SetUpOnMainThread() OVERRIDE {
73 BrowserThread::PostTask( 73 BrowserThread::PostTask(
74 BrowserThread::IO, FROM_HERE, 74 BrowserThread::IO, FROM_HERE,
75 base::Bind(&chrome_browser_net::SetUrlRequestMocksEnabled, true)); 75 base::Bind(&chrome_browser_net::SetUrlRequestMocksEnabled, true));
76 } 76 }
77 77
78 // Returns a GURL that results in a DNS error. 78 // Returns a GURL that results in a DNS error.
79 GURL GetDnsErrorURL() const { 79 GURL GetDnsErrorURL() const {
80 return URLRequestFailedJob::GetMockHttpUrl(net::ERR_NAME_NOT_RESOLVED); 80 return URLRequestFailedJob::GetMockHttpUrl(net::ERR_NAME_NOT_RESOLVED);
81 } 81 }
82 82
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 } 238 }
239 239
240 // Checks that the Link Doctor is not loaded when we receive an actual 404 page. 240 // Checks that the Link Doctor is not loaded when we receive an actual 404 page.
241 IN_PROC_BROWSER_TEST_F(ErrorPageTest, Page404) { 241 IN_PROC_BROWSER_TEST_F(ErrorPageTest, Page404) {
242 NavigateToURLAndWaitForTitle( 242 NavigateToURLAndWaitForTitle(
243 content::URLRequestMockHTTPJob::GetMockUrl( 243 content::URLRequestMockHTTPJob::GetMockUrl(
244 FilePath(FILE_PATH_LITERAL("page404.html"))), 244 FilePath(FILE_PATH_LITERAL("page404.html"))),
245 "SUCCESS", 245 "SUCCESS",
246 1); 246 1);
247 } 247 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698