| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/chromeos/events/event_rewriter.h" | 5 #include "chrome/browser/chromeos/events/event_rewriter.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/sticky_keys/sticky_keys_controller.h" | 10 #include "ash/sticky_keys/sticky_keys_controller.h" |
| 11 #include "ash/sticky_keys/sticky_keys_overlay.h" | 11 #include "ash/sticky_keys/sticky_keys_overlay.h" |
| 12 #include "ash/test/ash_test_base.h" | 12 #include "ash/test/ash_test_base.h" |
| 13 #include "ash/wm/window_state.h" | 13 #include "ash/wm/window_state.h" |
| 14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
| 15 #include "base/command_line.h" | 15 #include "base/command_line.h" |
| 16 #include "base/prefs/pref_member.h" | 16 #include "base/prefs/pref_member.h" |
| 17 #include "base/strings/stringprintf.h" | 17 #include "base/strings/stringprintf.h" |
| 18 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" | 18 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" |
| 19 #include "chrome/browser/chromeos/input_method/mock_input_method_manager.h" | 19 #include "chrome/browser/chromeos/input_method/mock_input_method_manager.h" |
| 20 #include "chrome/browser/chromeos/login/users/fake_user_manager.h" | 20 #include "chrome/browser/chromeos/login/users/fake_user_manager.h" |
| 21 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" | 21 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" |
| 22 #include "chrome/browser/chromeos/preferences.h" | 22 #include "chrome/browser/chromeos/preferences.h" |
| 23 #include "chrome/common/pref_names.h" | 23 #include "chrome/common/pref_names.h" |
| 24 #include "chrome/test/base/testing_pref_service_syncable.h" | 24 #include "chrome/test/base/testing_pref_service_syncable.h" |
| 25 #include "chromeos/chromeos_switches.h" | 25 #include "chromeos/chromeos_switches.h" |
| 26 #include "chromeos/ime/fake_ime_keyboard.h" | |
| 27 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
| 28 #include "ui/aura/window.h" | 27 #include "ui/aura/window.h" |
| 29 #include "ui/aura/window_tree_host.h" | 28 #include "ui/aura/window_tree_host.h" |
| 29 #include "ui/base/ime/chromeos/fake_ime_keyboard.h" |
| 30 #include "ui/events/event.h" | 30 #include "ui/events/event.h" |
| 31 #include "ui/events/event_rewriter.h" | 31 #include "ui/events/event_rewriter.h" |
| 32 #include "ui/events/test/events_test_utils.h" | 32 #include "ui/events/test/events_test_utils.h" |
| 33 #include "ui/events/test/test_event_processor.h" | 33 #include "ui/events/test/test_event_processor.h" |
| 34 | 34 |
| 35 #if defined(USE_X11) | 35 #if defined(USE_X11) |
| 36 #include <X11/keysym.h> | 36 #include <X11/keysym.h> |
| 37 | 37 |
| 38 #include "ui/events/devices/x11/touch_factory_x11.h" | 38 #include "ui/events/devices/x11/touch_factory_x11.h" |
| 39 #include "ui/events/event_utils.h" | 39 #include "ui/events/event_utils.h" |
| (...skipping 2447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2487 EXPECT_FALSE(overlay_->GetModifierVisible(ui::EF_ALTGR_DOWN)); | 2487 EXPECT_FALSE(overlay_->GetModifierVisible(ui::EF_ALTGR_DOWN)); |
| 2488 EXPECT_TRUE(overlay_->GetModifierVisible(ui::EF_MOD3_DOWN)); | 2488 EXPECT_TRUE(overlay_->GetModifierVisible(ui::EF_MOD3_DOWN)); |
| 2489 | 2489 |
| 2490 // Turn off AltGr and Mod3. | 2490 // Turn off AltGr and Mod3. |
| 2491 sticky_keys_controller_->SetModifiersEnabled(false, false); | 2491 sticky_keys_controller_->SetModifiersEnabled(false, false); |
| 2492 EXPECT_FALSE(overlay_->GetModifierVisible(ui::EF_ALTGR_DOWN)); | 2492 EXPECT_FALSE(overlay_->GetModifierVisible(ui::EF_ALTGR_DOWN)); |
| 2493 EXPECT_FALSE(overlay_->GetModifierVisible(ui::EF_MOD3_DOWN)); | 2493 EXPECT_FALSE(overlay_->GetModifierVisible(ui::EF_MOD3_DOWN)); |
| 2494 } | 2494 } |
| 2495 | 2495 |
| 2496 } // namespace chromeos | 2496 } // namespace chromeos |
| OLD | NEW |