Index: chrome/browser/app_controller_mac_browsertest.mm |
diff --git a/chrome/browser/app_controller_mac_browsertest.mm b/chrome/browser/app_controller_mac_browsertest.mm |
index 1cd7d02865412075323492e482d00084681b51db..52ced35b3bf71e57ea06ff5b41e58e875d55a644 100644 |
--- a/chrome/browser/app_controller_mac_browsertest.mm |
+++ b/chrome/browser/app_controller_mac_browsertest.mm |
@@ -44,7 +44,6 @@ |
#include "components/bookmarks/test/bookmark_test_helpers.h" |
#include "components/prefs/pref_service.h" |
#include "components/signin/core/common/profile_management_switches.h" |
-#include "content/public/browser/navigation_controller.h" |
#include "content/public/browser/web_contents.h" |
#include "content/public/test/browser_test_utils.h" |
#include "content/public/test/test_navigation_observer.h" |
@@ -394,8 +393,7 @@ |
IN_PROC_BROWSER_TEST_F(AppControllerOpenShortcutBrowserTest, |
OpenShortcutOnStartup) { |
- // The two tabs expected are the Welcome page and the desired URL. |
- EXPECT_EQ(2, browser()->tab_strip_model()->count()); |
+ EXPECT_EQ(1, browser()->tab_strip_model()->count()); |
EXPECT_EQ(g_open_shortcut_url, |
browser()->tab_strip_model()->GetActiveWebContents() |
->GetLastCommittedURL()); |
@@ -422,15 +420,6 @@ |
// Ensure that there is exactly 1 tab showing, and the tab is the NTP. |
GURL ntp(chrome::kChromeUINewTabURL); |
EXPECT_EQ(1, browser()->tab_strip_model()->count()); |
- browser()->tab_strip_model()->GetActiveWebContents()->GetController().LoadURL( |
- GURL(chrome::kChromeUINewTabURL), content::Referrer(), |
- ui::PageTransition::PAGE_TRANSITION_LINK, std::string()); |
- |
- // Wait for one navigation on the active web contents. |
- content::TestNavigationObserver ntp_navigation_observer( |
- browser()->tab_strip_model()->GetActiveWebContents()); |
- ntp_navigation_observer.Wait(); |
- |
EXPECT_EQ(ntp, |
browser() |
->tab_strip_model() |
@@ -440,10 +429,11 @@ |
GURL simple(embedded_test_server()->GetURL("/simple.html")); |
SendAppleEventToOpenUrlToAppController(simple); |
+ // Wait for one navigation on the active web contents. |
EXPECT_EQ(1, browser()->tab_strip_model()->count()); |
- content::TestNavigationObserver event_navigation_observer( |
- browser()->tab_strip_model()->GetActiveWebContents()); |
- event_navigation_observer.Wait(); |
+ content::TestNavigationObserver obs( |
+ browser()->tab_strip_model()->GetActiveWebContents(), 1); |
+ obs.Wait(); |
EXPECT_EQ(simple, |
browser() |