| 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 // Disabled right now as this won't work on BuildBots right now as this test | 5 // Disabled right now as this won't work on BuildBots right now as this test |
| 6 // require the box it runs on to be unlocked (and no screen-savers). | 6 // require the box it runs on to be unlocked (and no screen-savers). |
| 7 // The test actually simulates mouse and key events, so if the screen is locked, | 7 // The test actually simulates mouse and key events, so if the screen is locked, |
| 8 // the events don't go to the Chrome window. | 8 // the events don't go to the Chrome window. |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 136 |
| 137 // Flush the message loop to make Purify happy. | 137 // Flush the message loop to make Purify happy. |
| 138 message_loop()->RunAllPending(); | 138 message_loop()->RunAllPending(); |
| 139 } | 139 } |
| 140 | 140 |
| 141 FocusManager* GetFocusManager() { | 141 FocusManager* GetFocusManager() { |
| 142 #if defined(OS_WIN) | 142 #if defined(OS_WIN) |
| 143 return static_cast<WindowWin*>(window_)->GetFocusManager(); | 143 return static_cast<WindowWin*>(window_)->GetFocusManager(); |
| 144 #elif defined(OS_LINUX) | 144 #elif defined(OS_LINUX) |
| 145 return static_cast<WindowGtk*>(window_)->GetFocusManager(); | 145 return static_cast<WindowGtk*>(window_)->GetFocusManager(); |
| 146 #elif | 146 #else |
| 147 NOTIMPLEMENTED(); | 147 NOTIMPLEMENTED(); |
| 148 #endif | 148 #endif |
| 149 } | 149 } |
| 150 | 150 |
| 151 void FocusNativeView(gfx::NativeView native_view) { | 151 void FocusNativeView(gfx::NativeView native_view) { |
| 152 #if defined(OS_WIN) | 152 #if defined(OS_WIN) |
| 153 ::SendMessage(native_view, WM_SETFOCUS, NULL, NULL); | 153 ::SendMessage(native_view, WM_SETFOCUS, NULL, NULL); |
| 154 #else | 154 #else |
| 155 gint return_val; | 155 gint return_val; |
| 156 GdkEventFocus event; | 156 GdkEventFocus event; |
| (...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1359 focus_manager_indirect = | 1359 focus_manager_indirect = |
| 1360 views::FocusManager::GetFocusManagerForNativeView( | 1360 views::FocusManager::GetFocusManagerForNativeView( |
| 1361 window2.GetNativeView()); | 1361 window2.GetNativeView()); |
| 1362 EXPECT_EQ(focus_manager_indirect, focus_manager_member1); | 1362 EXPECT_EQ(focus_manager_indirect, focus_manager_member1); |
| 1363 | 1363 |
| 1364 DestroyWindow(hwnd); | 1364 DestroyWindow(hwnd); |
| 1365 } | 1365 } |
| 1366 #endif | 1366 #endif |
| 1367 | 1367 |
| 1368 } // namespace views | 1368 } // namespace views |
| OLD | NEW |