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

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

Issue 12832004: content: Move all listeners of NOTIFICATION_RENDER_VIEW_HOST_CREATED out of content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 9 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 int num_navigations, 87 int num_navigations,
88 HistoryNavigationDirection direction) { 88 HistoryNavigationDirection direction) {
89 content::TitleWatcher title_watcher( 89 content::TitleWatcher title_watcher(
90 browser()->tab_strip_model()->GetActiveWebContents(), 90 browser()->tab_strip_model()->GetActiveWebContents(),
91 ASCIIToUTF16(expected_title)); 91 ASCIIToUTF16(expected_title));
92 92
93 content::TestNavigationObserver test_navigation_observer( 93 content::TestNavigationObserver test_navigation_observer(
94 content::Source<NavigationController>( 94 content::Source<NavigationController>(
95 &browser()->tab_strip_model()->GetActiveWebContents()-> 95 &browser()->tab_strip_model()->GetActiveWebContents()->
96 GetController()), 96 GetController()),
97 NULL,
98 num_navigations); 97 num_navigations);
99 if (direction == HISTORY_NAVIGATE_BACK) { 98 if (direction == HISTORY_NAVIGATE_BACK) {
100 chrome::GoBack(browser(), CURRENT_TAB); 99 chrome::GoBack(browser(), CURRENT_TAB);
101 } else if (direction == HISTORY_NAVIGATE_FORWARD) { 100 } else if (direction == HISTORY_NAVIGATE_FORWARD) {
102 chrome::GoForward(browser(), CURRENT_TAB); 101 chrome::GoForward(browser(), CURRENT_TAB);
103 } else { 102 } else {
104 FAIL(); 103 FAIL();
105 } 104 }
106 test_navigation_observer.WaitForObservation( 105 test_navigation_observer.WaitForObservation(
107 base::Bind(&content::RunMessageLoop), 106 base::Bind(&content::RunMessageLoop),
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 } 237 }
239 238
240 // Checks that the Link Doctor is not loaded when we receive an actual 404 page. 239 // Checks that the Link Doctor is not loaded when we receive an actual 404 page.
241 IN_PROC_BROWSER_TEST_F(ErrorPageTest, Page404) { 240 IN_PROC_BROWSER_TEST_F(ErrorPageTest, Page404) {
242 NavigateToURLAndWaitForTitle( 241 NavigateToURLAndWaitForTitle(
243 content::URLRequestMockHTTPJob::GetMockUrl( 242 content::URLRequestMockHTTPJob::GetMockUrl(
244 base::FilePath(FILE_PATH_LITERAL("page404.html"))), 243 base::FilePath(FILE_PATH_LITERAL("page404.html"))),
245 "SUCCESS", 244 "SUCCESS",
246 1); 245 1);
247 } 246 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/extensions/app_process_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698