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/bind.h" | 5 #include "base/bind.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/format_macros.h" | 7 #include "base/format_macros.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 browser()->tab_strip_model()->GetActiveWebContents())); | 512 browser()->tab_strip_model()->GetActiveWebContents())); |
513 EXPECT_TRUE(IsViewFocused(VIEW_ID_OMNIBOX)); | 513 EXPECT_TRUE(IsViewFocused(VIEW_ID_OMNIBOX)); |
514 | 514 |
515 // Open the download tab, focus should be on the tab contents. | 515 // Open the download tab, focus should be on the tab contents. |
516 chrome::ShowDownloads(browser()); | 516 chrome::ShowDownloads(browser()); |
517 ASSERT_NO_FATAL_FAILURE(content::WaitForLoadStop( | 517 ASSERT_NO_FATAL_FAILURE(content::WaitForLoadStop( |
518 browser()->tab_strip_model()->GetActiveWebContents())); | 518 browser()->tab_strip_model()->GetActiveWebContents())); |
519 EXPECT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); | 519 EXPECT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); |
520 | 520 |
521 // Open about:blank, focus should be on the location bar. | 521 // Open about:blank, focus should be on the location bar. |
522 chrome::AddSelectedTabWithURL(browser(), GURL(content::kAboutBlankURL), | 522 chrome::AddSelectedTabWithURL( |
523 content::PAGE_TRANSITION_LINK); | 523 browser(), GURL(url::kAboutBlankURL), content::PAGE_TRANSITION_LINK); |
524 ASSERT_NO_FATAL_FAILURE(content::WaitForLoadStop( | 524 ASSERT_NO_FATAL_FAILURE(content::WaitForLoadStop( |
525 browser()->tab_strip_model()->GetActiveWebContents())); | 525 browser()->tab_strip_model()->GetActiveWebContents())); |
526 EXPECT_TRUE(IsViewFocused(VIEW_ID_OMNIBOX)); | 526 EXPECT_TRUE(IsViewFocused(VIEW_ID_OMNIBOX)); |
527 } | 527 } |
528 | 528 |
529 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_AURA) | 529 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_AURA) |
530 // TODO(erg): http://crbug.com/163931 | 530 // TODO(erg): http://crbug.com/163931 |
531 #define MAYBE_FocusOnReload DISABLED_FocusOnReload | 531 #define MAYBE_FocusOnReload DISABLED_FocusOnReload |
532 #else | 532 #else |
533 #define MAYBE_FocusOnReload FocusOnReload | 533 #define MAYBE_FocusOnReload FocusOnReload |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 content::NOTIFICATION_NAV_ENTRY_COMMITTED, | 690 content::NOTIFICATION_NAV_ENTRY_COMMITTED, |
691 content::NotificationService::AllSources()); | 691 content::NotificationService::AllSources()); |
692 chrome::GoForward(browser(), CURRENT_TAB); | 692 chrome::GoForward(browser(), CURRENT_TAB); |
693 forward_nav_observer.Wait(); | 693 forward_nav_observer.Wait(); |
694 } | 694 } |
695 | 695 |
696 EXPECT_FALSE(IsViewFocused(VIEW_ID_OMNIBOX)); | 696 EXPECT_FALSE(IsViewFocused(VIEW_ID_OMNIBOX)); |
697 } | 697 } |
698 | 698 |
699 } // namespace | 699 } // namespace |
OLD | NEW |