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

Side by Side Diff: ash/virtual_keyboard_controller_unittest.cc

Issue 1488303005: Replace multi-value keyboard flags with single value flag types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add new flags to histograms. Created 5 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/app/generated_resources.grd » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ash/virtual_keyboard_controller.h" 5 #include "ash/virtual_keyboard_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/system/chromeos/virtual_keyboard/virtual_keyboard_observer.h" 10 #include "ash/system/chromeos/virtual_keyboard/virtual_keyboard_observer.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 45
46 // Sets the event blocker on the maximized window controller. 46 // Sets the event blocker on the maximized window controller.
47 void SetEventBlocker( 47 void SetEventBlocker(
48 scoped_ptr<ScopedDisableInternalMouseAndKeyboard> blocker) { 48 scoped_ptr<ScopedDisableInternalMouseAndKeyboard> blocker) {
49 Shell::GetInstance()->maximize_mode_controller()->event_blocker_ = 49 Shell::GetInstance()->maximize_mode_controller()->event_blocker_ =
50 blocker.Pass(); 50 blocker.Pass();
51 } 51 }
52 52
53 void SetUp() override { 53 void SetUp() override {
54 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( 54 base::CommandLine::ForCurrentProcess()->AppendSwitch(
55 keyboard::switches::kSmartVirtualKeyboard, "disabled"); 55 keyboard::switches::kDisableSmartVirtualKeyboard);
56 AshTestBase::SetUp(); 56 AshTestBase::SetUp();
57 UpdateKeyboardDevices(std::vector<ui::KeyboardDevice>()); 57 UpdateKeyboardDevices(std::vector<ui::KeyboardDevice>());
58 UpdateTouchscreenDevices(std::vector<ui::TouchscreenDevice>()); 58 UpdateTouchscreenDevices(std::vector<ui::TouchscreenDevice>());
59 } 59 }
60 60
61 private: 61 private:
62 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardControllerTest); 62 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardControllerTest);
63 }; 63 };
64 64
65 TEST_F(VirtualKeyboardControllerTest, EnabledDuringMaximizeMode) { 65 TEST_F(VirtualKeyboardControllerTest, EnabledDuringMaximizeMode) {
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 UpdateTouchscreenDevices(screens); 339 UpdateTouchscreenDevices(screens);
340 std::vector<ui::KeyboardDevice> keyboards; 340 std::vector<ui::KeyboardDevice> keyboards;
341 keyboards.push_back(ui::KeyboardDevice( 341 keyboards.push_back(ui::KeyboardDevice(
342 1, ui::InputDeviceType::INPUT_DEVICE_EXTERNAL, "keyboard")); 342 1, ui::InputDeviceType::INPUT_DEVICE_EXTERNAL, "keyboard"));
343 UpdateKeyboardDevices(keyboards); 343 UpdateKeyboardDevices(keyboards);
344 ASSERT_TRUE(keyboard::IsKeyboardEnabled()); 344 ASSERT_TRUE(keyboard::IsKeyboardEnabled());
345 } 345 }
346 346
347 } // namespace test 347 } // namespace test
348 } // namespace ash 348 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | chrome/app/generated_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698