OLD | NEW |
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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/extensions/extension_browsertest.h" | 9 #include "chrome/browser/extensions/extension_browsertest.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 | 638 |
639 // The profile which normally opens the home page displays the new tab page. | 639 // The profile which normally opens the home page displays the new tab page. |
640 Browser* new_browser = NULL; | 640 Browser* new_browser = NULL; |
641 ASSERT_EQ(1u, browser::GetBrowserCount(profile_home)); | 641 ASSERT_EQ(1u, browser::GetBrowserCount(profile_home)); |
642 new_browser = FindOneOtherBrowserForProfile(profile_home, NULL); | 642 new_browser = FindOneOtherBrowserForProfile(profile_home, NULL); |
643 ASSERT_TRUE(new_browser); | 643 ASSERT_TRUE(new_browser); |
644 ASSERT_EQ(1, new_browser->tab_count()); | 644 ASSERT_EQ(1, new_browser->tab_count()); |
645 EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), | 645 EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), |
646 chrome::GetWebContentsAt(new_browser, 0)->GetURL()); | 646 chrome::GetWebContentsAt(new_browser, 0)->GetURL()); |
647 EXPECT_EQ(1U, chrome::GetTabContentsAt(new_browser, 0)->infobar_tab_helper()-> | 647 EXPECT_EQ(1U, chrome::GetTabContentsAt(new_browser, 0)->infobar_tab_helper()-> |
648 infobar_count()); | 648 GetInfoBarCount()); |
649 | 649 |
650 // The profile which normally opens last open pages displays the new tab page. | 650 // The profile which normally opens last open pages displays the new tab page. |
651 ASSERT_EQ(1u, browser::GetBrowserCount(profile_last)); | 651 ASSERT_EQ(1u, browser::GetBrowserCount(profile_last)); |
652 new_browser = FindOneOtherBrowserForProfile(profile_last, NULL); | 652 new_browser = FindOneOtherBrowserForProfile(profile_last, NULL); |
653 ASSERT_TRUE(new_browser); | 653 ASSERT_TRUE(new_browser); |
654 ASSERT_EQ(1, new_browser->tab_count()); | 654 ASSERT_EQ(1, new_browser->tab_count()); |
655 EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), | 655 EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), |
656 chrome::GetWebContentsAt(new_browser, 0)->GetURL()); | 656 chrome::GetWebContentsAt(new_browser, 0)->GetURL()); |
657 EXPECT_EQ(1U, chrome::GetTabContentsAt(new_browser, 0)->infobar_tab_helper()-> | 657 EXPECT_EQ(1U, chrome::GetTabContentsAt(new_browser, 0)->infobar_tab_helper()-> |
658 infobar_count()); | 658 GetInfoBarCount()); |
659 | 659 |
660 // The profile which normally opens URLs displays the new tab page. | 660 // The profile which normally opens URLs displays the new tab page. |
661 ASSERT_EQ(1u, browser::GetBrowserCount(profile_urls)); | 661 ASSERT_EQ(1u, browser::GetBrowserCount(profile_urls)); |
662 new_browser = FindOneOtherBrowserForProfile(profile_urls, NULL); | 662 new_browser = FindOneOtherBrowserForProfile(profile_urls, NULL); |
663 ASSERT_TRUE(new_browser); | 663 ASSERT_TRUE(new_browser); |
664 ASSERT_EQ(1, new_browser->tab_count()); | 664 ASSERT_EQ(1, new_browser->tab_count()); |
665 EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), | 665 EXPECT_EQ(GURL(chrome::kChromeUINewTabURL), |
666 chrome::GetWebContentsAt(new_browser, 0)->GetURL()); | 666 chrome::GetWebContentsAt(new_browser, 0)->GetURL()); |
667 EXPECT_EQ(1U, chrome::GetTabContentsAt(new_browser, 0)->infobar_tab_helper()-> | 667 EXPECT_EQ(1U, chrome::GetTabContentsAt(new_browser, 0)->infobar_tab_helper()-> |
668 infobar_count()); | 668 GetInfoBarCount()); |
669 } | 669 } |
670 #endif // !OS_CHROMEOS | 670 #endif // !OS_CHROMEOS |
OLD | NEW |