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 "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 "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 1284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1295 content::NotificationService::AllSources()); | 1295 content::NotificationService::AllSources()); |
1296 chrome::ShowSettings(browser()); | 1296 chrome::ShowSettings(browser()); |
1297 observer.Wait(); | 1297 observer.Wait(); |
1298 } | 1298 } |
1299 | 1299 |
1300 EXPECT_TRUE(browser()->tab_strip_model()->CloseWebContentsAt( | 1300 EXPECT_TRUE(browser()->tab_strip_model()->CloseWebContentsAt( |
1301 2, TabStripModel::CLOSE_USER_GESTURE)); | 1301 2, TabStripModel::CLOSE_USER_GESTURE)); |
1302 EXPECT_EQ(0, browser()->tab_strip_model()->active_index()); | 1302 EXPECT_EQ(0, browser()->tab_strip_model()->active_index()); |
1303 } | 1303 } |
1304 | 1304 |
1305 // TODO(csilv): Update this for uber page. http://crbug.com/111579. | |
1306 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, | 1305 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, |
1307 DISABLED_NavigateFromDefaultToHistoryInSameTab) { | 1306 NavigateFromDefaultToHistoryInSameTab) { |
1308 { | 1307 { |
1309 content::WindowedNotificationObserver observer( | 1308 content::WindowedNotificationObserver observer( |
1310 content::NOTIFICATION_LOAD_STOP, | 1309 content::NOTIFICATION_LOAD_STOP, |
1311 content::NotificationService::AllSources()); | 1310 content::NotificationService::AllSources()); |
1312 chrome::ShowHistory(browser()); | 1311 chrome::ShowHistory(browser()); |
1313 observer.Wait(); | 1312 observer.Wait(); |
1314 } | 1313 } |
1315 EXPECT_EQ(1, browser()->tab_strip_model()->count()); | 1314 EXPECT_EQ(1, browser()->tab_strip_model()->count()); |
1316 EXPECT_EQ(GURL(chrome::kChromeUIHistoryFrameURL), | 1315 EXPECT_EQ(GURL(chrome::kChromeUIHistoryURL), |
1317 browser()->tab_strip_model()->GetActiveWebContents()->GetURL()); | 1316 browser()->tab_strip_model()->GetActiveWebContents()->GetURL()); |
1318 } | 1317 } |
1319 | 1318 |
1320 // TODO(linux_aura) http://crbug.com/163931 | 1319 // TODO(linux_aura) http://crbug.com/163931 |
1321 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_AURA) | 1320 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_AURA) |
1322 #define MAYBE_NavigateFromDefaultToBookmarksInSameTab \ | 1321 #define MAYBE_NavigateFromDefaultToBookmarksInSameTab \ |
1323 DISABLED_NavigateFromDefaultToBookmarksInSameTab | 1322 DISABLED_NavigateFromDefaultToBookmarksInSameTab |
1324 #else | 1323 #else |
1325 #define MAYBE_NavigateFromDefaultToBookmarksInSameTab \ | 1324 #define MAYBE_NavigateFromDefaultToBookmarksInSameTab \ |
1326 NavigateFromDefaultToBookmarksInSameTab | 1325 NavigateFromDefaultToBookmarksInSameTab |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1499 content::TestNavigationObserver back_load_observer(popup); | 1498 content::TestNavigationObserver back_load_observer(popup); |
1500 controller->GoBack(); | 1499 controller->GoBack(); |
1501 back_load_observer.Wait(); | 1500 back_load_observer.Wait(); |
1502 EXPECT_EQ(webui_rvh, popup->GetRenderViewHost()); | 1501 EXPECT_EQ(webui_rvh, popup->GetRenderViewHost()); |
1503 EXPECT_TRUE(webui_rvh->IsRenderViewLive()); | 1502 EXPECT_TRUE(webui_rvh->IsRenderViewLive()); |
1504 EXPECT_EQ(content::BINDINGS_POLICY_WEB_UI, | 1503 EXPECT_EQ(content::BINDINGS_POLICY_WEB_UI, |
1505 webui_rvh->GetMainFrame()->GetEnabledBindings()); | 1504 webui_rvh->GetMainFrame()->GetEnabledBindings()); |
1506 } | 1505 } |
1507 | 1506 |
1508 } // namespace | 1507 } // namespace |
OLD | NEW |