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

Side by Side Diff: chrome/browser/ui/browser_browsertest.cc

Issue 1260033003: Partially componentize //chrome/browser/search/search.{h,cc} (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on iOS Created 5 years, 4 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
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_instant_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 } 594 }
595 } 595 }
596 596
597 // Test that a browser-initiated navigation to an aborted URL load leaves around 597 // Test that a browser-initiated navigation to an aborted URL load leaves around
598 // a pending entry if we start from the NTP but not from a normal page. 598 // a pending entry if we start from the NTP but not from a normal page.
599 // See http://crbug.com/355537. 599 // See http://crbug.com/355537.
600 IN_PROC_BROWSER_TEST_F(BrowserTest, ClearPendingOnFailUnlessNTP) { 600 IN_PROC_BROWSER_TEST_F(BrowserTest, ClearPendingOnFailUnlessNTP) {
601 ASSERT_TRUE(test_server()->Start()); 601 ASSERT_TRUE(test_server()->Start());
602 WebContents* web_contents = 602 WebContents* web_contents =
603 browser()->tab_strip_model()->GetActiveWebContents(); 603 browser()->tab_strip_model()->GetActiveWebContents();
604 GURL ntp_url(chrome::GetNewTabPageURL(browser()->profile())); 604 GURL ntp_url(search::GetNewTabPageURL(browser()->profile()));
605 ui_test_utils::NavigateToURL(browser(), ntp_url); 605 ui_test_utils::NavigateToURL(browser(), ntp_url);
606 606
607 // Navigate to a 204 URL (aborts with no content) on the NTP and make sure it 607 // Navigate to a 204 URL (aborts with no content) on the NTP and make sure it
608 // sticks around so that the user can edit it. 608 // sticks around so that the user can edit it.
609 GURL abort_url(test_server()->GetURL("nocontent")); 609 GURL abort_url(test_server()->GetURL("nocontent"));
610 { 610 {
611 content::WindowedNotificationObserver stop_observer( 611 content::WindowedNotificationObserver stop_observer(
612 content::NOTIFICATION_LOAD_STOP, 612 content::NOTIFICATION_LOAD_STOP,
613 content::Source<NavigationController>( 613 content::Source<NavigationController>(
614 &web_contents->GetController())); 614 &web_contents->GetController()));
(...skipping 2436 matching lines...) Expand 10 before | Expand all | Expand 10 after
3051 content::NOTIFICATION_LOAD_STOP, 3051 content::NOTIFICATION_LOAD_STOP,
3052 content::Source<NavigationController>(&web_contents->GetController())); 3052 content::Source<NavigationController>(&web_contents->GetController()));
3053 chrome::GoBack(browser(), CURRENT_TAB); 3053 chrome::GoBack(browser(), CURRENT_TAB);
3054 back_nav_load_observer.Wait(); 3054 back_nav_load_observer.Wait();
3055 3055
3056 EXPECT_EQ(content::SECURITY_STYLE_AUTHENTICATED, 3056 EXPECT_EQ(content::SECURITY_STYLE_AUTHENTICATED,
3057 observer.latest_security_style()); 3057 observer.latest_security_style());
3058 EXPECT_EQ(0u, observer.latest_explanations().warning_explanations.size()); 3058 EXPECT_EQ(0u, observer.latest_explanations().warning_explanations.size());
3059 EXPECT_EQ(0u, observer.latest_explanations().broken_explanations.size()); 3059 EXPECT_EQ(0u, observer.latest_explanations().broken_explanations.size());
3060 } 3060 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698