OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/ui/browser_navigator_browsertest.h" | 5 #include "chrome/browser/ui/browser_navigator_browsertest.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/tabs/tab_strip_model.h" | 9 #include "chrome/browser/tabs/tab_strip_model.h" |
10 #include "chrome/browser/ui/browser_list.h" | 10 #include "chrome/browser/ui/browser_list.h" |
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 p.url = singleton_url; | 879 p.url = singleton_url; |
880 p.window_action = browser::NavigateParams::SHOW_WINDOW; | 880 p.window_action = browser::NavigateParams::SHOW_WINDOW; |
881 p.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; | 881 p.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; |
882 browser::Navigate(&p); | 882 browser::Navigate(&p); |
883 ui_test_utils::WaitForNavigationInCurrentTab(browser()); | 883 ui_test_utils::WaitForNavigationInCurrentTab(browser()); |
884 | 884 |
885 // The tab should not be sad anymore. | 885 // The tab should not be sad anymore. |
886 EXPECT_FALSE(tab_contents->is_crashed()); | 886 EXPECT_FALSE(tab_contents->is_crashed()); |
887 } | 887 } |
888 | 888 |
| 889 |
889 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, | 890 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, |
890 NavigateFromDefaultToOptionsInSameTab) { | 891 NavigateFromDefaultToOptionsInSameTab) { |
891 browser()->OpenOptionsDialog(); | 892 browser()->OpenOptionsDialog(); |
892 ui_test_utils::WaitForNavigationInCurrentTab(browser()); | 893 ui_test_utils::WaitForNavigationInCurrentTab(browser()); |
893 EXPECT_EQ(1, browser()->tab_count()); | 894 EXPECT_EQ(1, browser()->tab_count()); |
894 EXPECT_EQ(GURL("chrome://settings/browser"), | 895 EXPECT_EQ(GURL("chrome://settings/browser"), |
895 browser()->GetSelectedTabContents()->GetURL()); | 896 browser()->GetSelectedTabContents()->GetURL()); |
896 } | 897 } |
897 | 898 |
898 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, | 899 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
982 ui_test_utils::WaitForNavigationInCurrentTab(browser()); | 983 ui_test_utils::WaitForNavigationInCurrentTab(browser()); |
983 | 984 |
984 browser()->OpenOptionsDialog(); | 985 browser()->OpenOptionsDialog(); |
985 ui_test_utils::WaitForNavigationInCurrentTab(browser()); | 986 ui_test_utils::WaitForNavigationInCurrentTab(browser()); |
986 EXPECT_EQ(2, browser()->tab_count()); | 987 EXPECT_EQ(2, browser()->tab_count()); |
987 EXPECT_EQ(GURL("chrome://settings/browser"), | 988 EXPECT_EQ(GURL("chrome://settings/browser"), |
988 browser()->GetSelectedTabContents()->GetURL()); | 989 browser()->GetSelectedTabContents()->GetURL()); |
989 } | 990 } |
990 | 991 |
991 } // namespace | 992 } // namespace |
OLD | NEW |