| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/message_loop.h" | 5 #include "base/message_loop.h" |
| 6 #include "base/ref_counted.h" | 6 #include "base/ref_counted.h" |
| 7 #include "chrome/browser/automation/ui_controls.h" | 7 #include "chrome/browser/automation/ui_controls.h" |
| 8 #include "chrome/browser/browser.h" | 8 #include "chrome/browser/browser.h" |
| 9 #include "chrome/browser/renderer_host/render_widget_host_view.h" | 9 #include "chrome/browser/renderer_host/render_widget_host_view.h" |
| 10 #include "chrome/browser/tab_contents/interstitial_page.h" | 10 #include "chrome/browser/tab_contents/interstitial_page.h" |
| (...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 | 623 |
| 624 // Open the new tab, focus should be on the location bar. | 624 // Open the new tab, focus should be on the location bar. |
| 625 browser()->NewTab(); | 625 browser()->NewTab(); |
| 626 EXPECT_EQ(browser_view->GetLocationBarView(), | 626 EXPECT_EQ(browser_view->GetLocationBarView(), |
| 627 focus_manager->GetFocusedView()); | 627 focus_manager->GetFocusedView()); |
| 628 | 628 |
| 629 // Open the download tab, focus should be on the tab contents. | 629 // Open the download tab, focus should be on the tab contents. |
| 630 browser()->ShowDownloadsTab(); | 630 browser()->ShowDownloadsTab(); |
| 631 EXPECT_EQ(browser_view->GetTabContentsContainerView(), | 631 EXPECT_EQ(browser_view->GetTabContentsContainerView(), |
| 632 focus_manager->GetFocusedView()); | 632 focus_manager->GetFocusedView()); |
| 633 |
| 634 // Open about:blank, focus should be on the location bar. |
| 635 browser()->AddTabWithURL(GURL("about:blank"), GURL(), PageTransition::LINK, |
| 636 true, -1, false, NULL); |
| 637 EXPECT_EQ(browser_view->GetLocationBarView(), |
| 638 focus_manager->GetFocusedView()); |
| 633 } | 639 } |
| OLD | NEW |