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

Side by Side Diff: ash/common/system/chromeos/ime_menu/ime_menu_tray_unittest.cc

Issue 2499453002: Add ink drop ripple to overview mode button (Closed)
Patch Set: Fixed crash when there is no window Created 4 years, 1 month 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/common/system/chromeos/ime_menu/ime_menu_tray.h" 5 #include "ash/common/system/chromeos/ime_menu/ime_menu_tray.h"
6 6
7 #include "ash/common/accelerators/accelerator_controller.h" 7 #include "ash/common/accelerators/accelerator_controller.h"
8 #include "ash/common/accessibility_delegate.h" 8 #include "ash/common/accessibility_delegate.h"
9 #include "ash/common/system/chromeos/ime_menu/ime_list_view.h" 9 #include "ash/common/system/chromeos/ime_menu/ime_list_view.h"
10 #include "ash/common/system/status_area_widget.h" 10 #include "ash/common/system/status_area_widget.h"
(...skipping 22 matching lines...) Expand all
33 ~ImeMenuTrayTest() override {} 33 ~ImeMenuTrayTest() override {}
34 34
35 protected: 35 protected:
36 // Returns true if the IME menu tray is visible. 36 // Returns true if the IME menu tray is visible.
37 bool IsVisible() { return GetTray()->visible(); } 37 bool IsVisible() { return GetTray()->visible(); }
38 38
39 // Returns the label text of the tray. 39 // Returns the label text of the tray.
40 const base::string16& GetTrayText() { return GetTray()->label_->text(); } 40 const base::string16& GetTrayText() { return GetTray()->label_->text(); }
41 41
42 // Returns true if the background color of the tray is active. 42 // Returns true if the background color of the tray is active.
43 bool IsTrayBackgroundActive() { 43 bool IsTrayBackgroundActive() { return GetTray()->is_active(); }
44 return GetTray()->draw_background_as_active();
45 }
46 44
47 // Returns true if the IME menu bubble has been shown. 45 // Returns true if the IME menu bubble has been shown.
48 bool IsBubbleShown() { return GetTray()->IsImeMenuBubbleShown(); } 46 bool IsBubbleShown() { return GetTray()->IsImeMenuBubbleShown(); }
49 47
50 // Returns true if the IME menu list has been updated with the right IME list. 48 // Returns true if the IME menu list has been updated with the right IME list.
51 bool IsTrayImeListValid(const std::vector<IMEInfo>& expected_imes, 49 bool IsTrayImeListValid(const std::vector<IMEInfo>& expected_imes,
52 const IMEInfo& expected_current_ime) { 50 const IMEInfo& expected_current_ime) {
53 std::map<views::View*, std::string> ime_map = 51 std::map<views::View*, std::string> ime_map =
54 GetTray()->ime_list_view_->ime_map_; 52 GetTray()->ime_list_view_->ime_map_;
55 if (ime_map.size() != expected_imes.size()) 53 if (ime_map.size() != expected_imes.size())
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 // The virtual keyboard should be enabled. 275 // The virtual keyboard should be enabled.
278 EXPECT_TRUE(accessibility_delegate->IsVirtualKeyboardEnabled()); 276 EXPECT_TRUE(accessibility_delegate->IsVirtualKeyboardEnabled());
279 277
280 // Hides the keyboard. 278 // Hides the keyboard.
281 GetTray()->OnKeyboardHidden(); 279 GetTray()->OnKeyboardHidden();
282 // The keyboard should still be disabled. 280 // The keyboard should still be disabled.
283 EXPECT_FALSE(accessibility_delegate->IsVirtualKeyboardEnabled()); 281 EXPECT_FALSE(accessibility_delegate->IsVirtualKeyboardEnabled());
284 } 282 }
285 283
286 } // namespace ash 284 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698