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

Side by Side Diff: ash/system/chromeos/virtual_keyboard/tray_keyboard_lock_unittest.cc

Issue 834733004: Turns off smart deploy by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | ash/virtual_keyboard_controller.cc » ('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/system/chromeos/virtual_keyboard/tray_keyboard_lock.h" 5 #include "ash/system/chromeos/virtual_keyboard/tray_keyboard_lock.h"
6 6
7 #include "ash/accessibility_delegate.h" 7 #include "ash/accessibility_delegate.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/system/status_area_widget.h" 9 #include "ash/system/status_area_widget.h"
10 #include "ash/test/ash_test_base.h" 10 #include "ash/test/ash_test_base.h"
11 #include "ash/test/status_area_widget_test_helper.h" 11 #include "ash/test/status_area_widget_test_helper.h"
12 #include "ash/test/virtual_keyboard_test_helper.h" 12 #include "ash/test/virtual_keyboard_test_helper.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "ui/keyboard/keyboard_switches.h"
14 #include "ui/keyboard/keyboard_util.h" 15 #include "ui/keyboard/keyboard_util.h"
15 16
16 namespace ash { 17 namespace ash {
17 18
18 class TrayKeyboardLockTest : public test::AshTestBase { 19 class TrayKeyboardLockTest : public test::AshTestBase {
19 public: 20 public:
20 TrayKeyboardLockTest() {} 21 TrayKeyboardLockTest() {}
21 virtual ~TrayKeyboardLockTest() {} 22 virtual ~TrayKeyboardLockTest() {}
22 23
23 TrayKeyboardLock* tray() { return tray_.get(); } 24 TrayKeyboardLock* tray() { return tray_.get(); }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 Shell::GetInstance()->system_tray_notifier()->NotifyAccessibilityModeChanged( 63 Shell::GetInstance()->system_tray_notifier()->NotifyAccessibilityModeChanged(
63 notification); 64 notification);
64 } 65 }
65 66
66 void TrayKeyboardLockTest::TearDownViews() { 67 void TrayKeyboardLockTest::TearDownViews() {
67 default_view_.reset(); 68 default_view_.reset();
68 tray_.reset(); 69 tray_.reset();
69 } 70 }
70 71
71 void TrayKeyboardLockTest::SetUp() { 72 void TrayKeyboardLockTest::SetUp() {
73 base::CommandLine::ForCurrentProcess()->AppendSwitch(
74 keyboard::switches::kEnableAutoVirtualKeyboard);
72 test::AshTestBase::SetUp(); 75 test::AshTestBase::SetUp();
73 SetUpForStatusAreaWidget(StatusAreaWidgetTestHelper::GetStatusAreaWidget()); 76 SetUpForStatusAreaWidget(StatusAreaWidgetTestHelper::GetStatusAreaWidget());
74 } 77 }
75 78
76 void TrayKeyboardLockTest::TearDown() { 79 void TrayKeyboardLockTest::TearDown() {
77 SetAccessibilityKeyboardEnabled(false); 80 SetAccessibilityKeyboardEnabled(false);
78 TearDownViews(); 81 TearDownViews();
79 test::AshTestBase::TearDown(); 82 test::AshTestBase::TearDown();
80 } 83 }
81 84
(...skipping 27 matching lines...) Expand all
109 EXPECT_TRUE(default_view()->visible()); 112 EXPECT_TRUE(default_view()->visible());
110 113
111 tap = ui::GestureEvent( 114 tap = ui::GestureEvent(
112 0, 0, 0, base::TimeDelta(), ui::GestureEventDetails(ui::ET_GESTURE_TAP)); 115 0, 0, 0, base::TimeDelta(), ui::GestureEventDetails(ui::ET_GESTURE_TAP));
113 default_view()->OnGestureEvent(&tap); 116 default_view()->OnGestureEvent(&tap);
114 EXPECT_FALSE(keyboard::IsKeyboardEnabled()); 117 EXPECT_FALSE(keyboard::IsKeyboardEnabled());
115 EXPECT_TRUE(default_view()->visible()); 118 EXPECT_TRUE(default_view()->visible());
116 } 119 }
117 120
118 } // namespace ash 121 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/virtual_keyboard_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698