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

Side by Side Diff: ash/magnifier/magnification_controller_unittest.cc

Issue 1177503003: Remove the 2-level input method system & InputMethodBridge. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits. Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/options/passphrase_textfield.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/magnifier/magnification_controller.h" 5 #include "ash/magnifier/magnification_controller.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/test/ash_test_base.h" 8 #include "ash/test/ash_test_base.h"
9 #include "ash/test/display_manager_test_api.h" 9 #include "ash/test/display_manager_test_api.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 void FocusOnTextInputView() { 141 void FocusOnTextInputView() {
142 DCHECK(text_input_view_); 142 DCHECK(text_input_view_);
143 text_input_view_->FocusOnTextInput(); 143 text_input_view_->FocusOnTextInput();
144 } 144 }
145 145
146 private: 146 private:
147 TextInputView* text_input_view_; 147 TextInputView* text_input_view_;
148 148
149 ui::InputMethod* GetInputMethod() { 149 ui::InputMethod* GetInputMethod() {
150 DCHECK(text_input_view_); 150 DCHECK(text_input_view_);
151 return text_input_view_->GetWidget()->GetHostInputMethod(); 151 return text_input_view_->GetWidget()->GetInputMethod();
152 } 152 }
153 153
154 DISALLOW_COPY_AND_ASSIGN(MagnificationControllerTest); 154 DISALLOW_COPY_AND_ASSIGN(MagnificationControllerTest);
155 }; 155 };
156 156
157 TEST_F(MagnificationControllerTest, EnableAndDisable) { 157 TEST_F(MagnificationControllerTest, EnableAndDisable) {
158 // Confirms the magnifier is disabled. 158 // Confirms the magnifier is disabled.
159 EXPECT_TRUE(GetRootWindow()->layer()->transform().IsIdentity()); 159 EXPECT_TRUE(GetRootWindow()->layer()->transform().IsIdentity());
160 EXPECT_EQ(1.0f, GetMagnificationController()->GetScale()); 160 EXPECT_EQ(1.0f, GetMagnificationController()->GetScale());
161 EXPECT_EQ("0,0 800x600", GetViewport().ToString()); 161 EXPECT_EQ("0,0 800x600", GetViewport().ToString());
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 UpdateDisplay("500x500"); 693 UpdateDisplay("500x500");
694 EXPECT_EQ("0,0 500x500", screen->GetPrimaryDisplay().bounds().ToString()); 694 EXPECT_EQ("0,0 500x500", screen->GetPrimaryDisplay().bounds().ToString());
695 EXPECT_EQ(2.0f, GetMagnificationController()->GetScale()); 695 EXPECT_EQ(2.0f, GetMagnificationController()->GetScale());
696 696
697 GetMagnificationController()->SetEnabled(false); 697 GetMagnificationController()->SetEnabled(false);
698 EXPECT_EQ("0,0 500x500", screen->GetPrimaryDisplay().bounds().ToString()); 698 EXPECT_EQ("0,0 500x500", screen->GetPrimaryDisplay().bounds().ToString());
699 EXPECT_EQ(1.0f, GetMagnificationController()->GetScale()); 699 EXPECT_EQ(1.0f, GetMagnificationController()->GetScale());
700 } 700 }
701 701
702 } // namespace ash 702 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/options/passphrase_textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698