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 IN_PROC_BROWSER_TEST_F(BrowserFocusTest, ClickingMovesFocus) { | 195 #if defined(OS_CHROMEOS) |
| 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) { |
196 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); | 202 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
197 #if defined(OS_POSIX) | 203 #if defined(OS_POSIX) |
198 // It seems we have to wait a little bit for the widgets to spin up before | 204 // It seems we have to wait a little bit for the widgets to spin up before |
199 // we can start clicking on them. | 205 // we can start clicking on them. |
200 MessageLoop::current()->PostDelayedTask(FROM_HERE, | 206 MessageLoop::current()->PostDelayedTask(FROM_HERE, |
201 new MessageLoop::QuitTask(), | 207 new MessageLoop::QuitTask(), |
202 kActionDelayMs); | 208 kActionDelayMs); |
203 ui_test_utils::RunMessageLoop(); | 209 ui_test_utils::RunMessageLoop(); |
204 #endif // defined(OS_POSIX) | 210 #endif // defined(OS_POSIX) |
205 | 211 |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 browser()->Reload(CURRENT_TAB); | 908 browser()->Reload(CURRENT_TAB); |
903 observer.Wait(); | 909 observer.Wait(); |
904 } | 910 } |
905 | 911 |
906 // Focus should now be on the tab contents. | 912 // Focus should now be on the tab contents. |
907 browser()->ShowDownloadsTab(); | 913 browser()->ShowDownloadsTab(); |
908 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW)); | 914 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW)); |
909 } | 915 } |
910 | 916 |
911 } // namespace | 917 } // namespace |
OLD | NEW |