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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/format_macros.h" | 8 #include "base/format_macros.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 NotificationService::current()->Notify( | 185 NotificationService::current()->Notify( |
186 content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE, | 186 content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE, |
187 Source<TabContents>(tab()), | 187 Source<TabContents>(tab()), |
188 Details<const bool>(&is_editable_node)); | 188 Details<const bool>(&is_editable_node)); |
189 } | 189 } |
190 | 190 |
191 private: | 191 private: |
192 std::string html_contents_; | 192 std::string html_contents_; |
193 }; | 193 }; |
194 | 194 |
195 #if defined(OS_CHROMEOS) | 195 IN_PROC_BROWSER_TEST_F(BrowserFocusTest, ClickingMovesFocus) { |
196 #define MAYBE_ClickingMovesFocus DISABLED_ClickingMovesFocus | |
197 #else | |
198 #define MAYBE_ClickingMovesFocus ClickingMovesFocus | |
199 #endif | |
200 | |
201 IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_ClickingMovesFocus) { | |
202 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); | 196 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
203 #if defined(OS_POSIX) | 197 #if defined(OS_POSIX) |
204 // It seems we have to wait a little bit for the widgets to spin up before | 198 // It seems we have to wait a little bit for the widgets to spin up before |
205 // we can start clicking on them. | 199 // we can start clicking on them. |
206 MessageLoop::current()->PostDelayedTask(FROM_HERE, | 200 MessageLoop::current()->PostDelayedTask(FROM_HERE, |
207 new MessageLoop::QuitTask(), | 201 new MessageLoop::QuitTask(), |
208 kActionDelayMs); | 202 kActionDelayMs); |
209 ui_test_utils::RunMessageLoop(); | 203 ui_test_utils::RunMessageLoop(); |
210 #endif // defined(OS_POSIX) | 204 #endif // defined(OS_POSIX) |
211 | 205 |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
908 browser()->Reload(CURRENT_TAB); | 902 browser()->Reload(CURRENT_TAB); |
909 observer.Wait(); | 903 observer.Wait(); |
910 } | 904 } |
911 | 905 |
912 // Focus should now be on the tab contents. | 906 // Focus should now be on the tab contents. |
913 browser()->ShowDownloadsTab(); | 907 browser()->ShowDownloadsTab(); |
914 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW)); | 908 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW)); |
915 } | 909 } |
916 | 910 |
917 } // namespace | 911 } // namespace |
OLD | NEW |