| 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 // This functionality currently works on Windows and on Linux when | 5 // This functionality currently works on Windows and on Linux when |
| 6 // toolkit_views is defined (i.e. for Chrome OS). It's not needed | 6 // toolkit_views is defined (i.e. for Chrome OS). It's not needed |
| 7 // on the Mac, and it's not yet implemented on Linux. | 7 // on the Mac, and it's not yet implemented on Linux. |
| 8 | 8 |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| 11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
| 12 #include "chrome/browser/ui/browser_window.h" | 12 #include "chrome/browser/ui/browser_window.h" |
| 13 #include "chrome/browser/ui/views/frame/browser_view.h" | 13 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 14 #include "chrome/browser/ui/views/toolbar_view.h" | 14 #include "chrome/browser/ui/views/toolbar_view.h" |
| 15 #include "chrome/common/chrome_notification_types.h" | 15 #include "chrome/common/chrome_notification_types.h" |
| 16 #include "chrome/test/base/interactive_test_utils.h" |
| 16 #include "chrome/test/base/in_process_browser_test.h" | 17 #include "chrome/test/base/in_process_browser_test.h" |
| 17 #include "chrome/test/base/ui_test_utils.h" | 18 #include "chrome/test/base/ui_test_utils.h" |
| 18 #include "ui/base/events/event_constants.h" | 19 #include "ui/base/events/event_constants.h" |
| 19 #include "ui/base/keycodes/keyboard_codes.h" | 20 #include "ui/base/keycodes/keyboard_codes.h" |
| 20 #include "ui/ui_controls/ui_controls.h" | 21 #include "ui/ui_controls/ui_controls.h" |
| 21 #include "ui/views/controls/menu/menu_listener.h" | 22 #include "ui/views/controls/menu/menu_listener.h" |
| 22 #include "ui/views/focus/focus_manager.h" | 23 #include "ui/views/focus/focus_manager.h" |
| 23 #include "ui/views/view.h" | 24 #include "ui/views/view.h" |
| 24 #include "ui/views/widget/widget.h" | 25 #include "ui/views/widget/widget.h" |
| 25 | 26 |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 browser(), url, NEW_FOREGROUND_TAB, | 256 browser(), url, NEW_FOREGROUND_TAB, |
| 256 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); | 257 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); |
| 257 ASSERT_EQ(2, browser()->active_index()); | 258 ASSERT_EQ(2, browser()->active_index()); |
| 258 | 259 |
| 259 ASSERT_TRUE(ui_test_utils::SendKeyPressSync( | 260 ASSERT_TRUE(ui_test_utils::SendKeyPressSync( |
| 260 browser(), ui::VKEY_W, true, false, false, false)); | 261 browser(), ui::VKEY_W, true, false, false, false)); |
| 261 ASSERT_EQ(0, browser()->active_index()); | 262 ASSERT_EQ(0, browser()->active_index()); |
| 262 } | 263 } |
| 263 | 264 |
| 264 } // namespace | 265 } // namespace |
| OLD | NEW |