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/files/file_util.h" | 6 #include "base/files/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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 #endif | 64 #endif |
65 | 65 |
66 const char kSimplePage[] = "/focus/page_with_focus.html"; | 66 const char kSimplePage[] = "/focus/page_with_focus.html"; |
67 const char kStealFocusPage[] = "/focus/page_steals_focus.html"; | 67 const char kStealFocusPage[] = "/focus/page_steals_focus.html"; |
68 const char kTypicalPage[] = "/focus/typical_page.html"; | 68 const char kTypicalPage[] = "/focus/typical_page.html"; |
69 | 69 |
70 class BrowserFocusTest : public InProcessBrowserTest { | 70 class BrowserFocusTest : public InProcessBrowserTest { |
71 public: | 71 public: |
72 // InProcessBrowserTest overrides: | 72 // InProcessBrowserTest overrides: |
73 void SetUpOnMainThread() override { | 73 void SetUpOnMainThread() override { |
74 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 74 ASSERT_TRUE(embedded_test_server()->Start()); |
75 } | 75 } |
76 | 76 |
77 bool IsViewFocused(ViewID vid) { | 77 bool IsViewFocused(ViewID vid) { |
78 return ui_test_utils::IsViewFocused(browser(), vid); | 78 return ui_test_utils::IsViewFocused(browser(), vid); |
79 } | 79 } |
80 | 80 |
81 void ClickOnView(ViewID vid) { | 81 void ClickOnView(ViewID vid) { |
82 ui_test_utils::ClickOnView(browser(), vid); | 82 ui_test_utils::ClickOnView(browser(), vid); |
83 } | 83 } |
84 | 84 |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
708 content::NOTIFICATION_NAV_ENTRY_COMMITTED, | 708 content::NOTIFICATION_NAV_ENTRY_COMMITTED, |
709 content::NotificationService::AllSources()); | 709 content::NotificationService::AllSources()); |
710 chrome::GoForward(browser(), CURRENT_TAB); | 710 chrome::GoForward(browser(), CURRENT_TAB); |
711 forward_nav_observer.Wait(); | 711 forward_nav_observer.Wait(); |
712 } | 712 } |
713 | 713 |
714 EXPECT_FALSE(IsViewFocused(VIEW_ID_OMNIBOX)); | 714 EXPECT_FALSE(IsViewFocused(VIEW_ID_OMNIBOX)); |
715 } | 715 } |
716 | 716 |
717 } // namespace | 717 } // namespace |
OLD | NEW |