Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: ash/accelerators/accelerator_controller_unittest.cc

Issue 2131733002: mash: Migrate [Keyboard]Brightness code to ash/common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ash/accelerators/accelerator_controller_unittest.cc
diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc
index e9e518796db0529806450049593a8bea38130de8..2d070c6f1e14a0d0578d82b2acd6539868c449d7 100644
--- a/ash/accelerators/accelerator_controller_unittest.cc
+++ b/ash/accelerators/accelerator_controller_unittest.cc
@@ -8,8 +8,10 @@
#include "ash/aura/wm_window_aura.h"
#include "ash/common/accessibility_delegate.h"
#include "ash/common/accessibility_types.h"
-#include "ash/common/ash_switches.h"
+#include "ash/common/session/session_state_delegate.h"
#include "ash/common/shell_window_ids.h"
+#include "ash/common/system/brightness_control_delegate.h"
+#include "ash/common/system/keyboard_brightness_control_delegate.h"
#include "ash/common/system/tray/system_tray_delegate.h"
#include "ash/common/system/volume_control_delegate.h"
#include "ash/common/wm/panels/panel_layout_manager.h"
@@ -19,21 +21,16 @@
#include "ash/common/wm_shell.h"
#include "ash/display/display_manager.h"
#include "ash/ime_control_delegate.h"
-#include "ash/screen_util.h"
#include "ash/shell.h"
-#include "ash/system/brightness_control_delegate.h"
-#include "ash/system/keyboard_brightness/keyboard_brightness_control_delegate.h"
#include "ash/test/ash_test_base.h"
#include "ash/test/display_manager_test_api.h"
#include "ash/test/test_screenshot_delegate.h"
#include "ash/test/test_session_state_animator.h"
#include "ash/test/test_shelf_delegate.h"
-#include "ash/test/test_shell_delegate.h"
#include "ash/test/test_volume_control_delegate.h"
#include "ash/wm/lock_state_controller.h"
#include "ash/wm/window_state_aura.h"
#include "ash/wm/window_util.h"
-#include "base/command_line.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/test/test_windows.h"
@@ -859,7 +856,7 @@ TEST_F(AcceleratorControllerTest, GlobalAccelerators) {
{
DummyBrightnessControlDelegate* delegate =
new DummyBrightnessControlDelegate;
- GetController()->SetBrightnessControlDelegate(
+ WmShell::Get()->SetBrightnessControlDelegate(
msw 2016/07/08 01:40:48 If we want to get really minimal, I could remove t
James Cook 2016/07/08 16:29:34 Yeah, I like that idea.
msw 2016/07/08 17:18:58 I made AcceleratorControllerTest a friend class wi
std::unique_ptr<BrightnessControlDelegate>(delegate));
EXPECT_EQ(0, delegate->handle_brightness_down_count());
EXPECT_TRUE(ProcessInController(brightness_down));
@@ -881,7 +878,7 @@ TEST_F(AcceleratorControllerTest, GlobalAccelerators) {
EXPECT_TRUE(ProcessInController(alt_brightness_up));
DummyKeyboardBrightnessControlDelegate* delegate =
new DummyKeyboardBrightnessControlDelegate;
- GetController()->SetKeyboardBrightnessControlDelegate(
+ WmShell::Get()->SetKeyboardBrightnessControlDelegate(
std::unique_ptr<KeyboardBrightnessControlDelegate>(delegate));
EXPECT_EQ(0, delegate->handle_keyboard_brightness_down_count());
EXPECT_TRUE(ProcessInController(alt_brightness_down));
@@ -1237,7 +1234,7 @@ TEST_F(AcceleratorControllerTest, DisallowedAtModalWindow) {
{
DummyBrightnessControlDelegate* delegate =
new DummyBrightnessControlDelegate;
- GetController()->SetBrightnessControlDelegate(
+ WmShell::Get()->SetBrightnessControlDelegate(
std::unique_ptr<BrightnessControlDelegate>(delegate));
EXPECT_EQ(0, delegate->handle_brightness_down_count());
EXPECT_TRUE(ProcessInController(brightness_down));
« no previous file with comments | « ash/accelerators/accelerator_controller.cc ('k') | ash/ash.gyp » ('j') | ash/common/wm_shell.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698