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

Side by Side Diff: chrome/browser/chromeos/input_method/mode_indicator_browsertest.cc

Issue 1920263003: Rename gfx::Display/Screen to display::Display/Screen in chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 EXPECT_TRUE(observer.is_displayed()); 164 EXPECT_TRUE(observer.is_displayed());
165 } 165 }
166 166
167 EXPECT_EQ(cursor1_bounds.x() - cursor2_bounds.x(), 167 EXPECT_EQ(cursor1_bounds.x() - cursor2_bounds.x(),
168 mi1_bounds.x() - mi2_bounds.x()); 168 mi1_bounds.x() - mi2_bounds.x());
169 EXPECT_EQ(cursor1_bounds.y() - cursor2_bounds.y(), 169 EXPECT_EQ(cursor1_bounds.y() - cursor2_bounds.y(),
170 mi1_bounds.y() - mi2_bounds.y()); 170 mi1_bounds.y() - mi2_bounds.y());
171 EXPECT_EQ(mi1_bounds.width(), mi2_bounds.width()); 171 EXPECT_EQ(mi1_bounds.width(), mi2_bounds.width());
172 EXPECT_EQ(mi1_bounds.height(), mi2_bounds.height()); 172 EXPECT_EQ(mi1_bounds.height(), mi2_bounds.height());
173 173
174 const gfx::Rect screen_bounds = 174 const gfx::Rect screen_bounds = display::Screen::GetScreen()
175 gfx::Screen::GetScreen()->GetDisplayMatching(cursor1_bounds).work_area(); 175 ->GetDisplayMatching(cursor1_bounds)
176 .work_area();
176 177
177 // Check if the location of the mode indicator is concidered with 178 // Check if the location of the mode indicator is concidered with
178 // the screen size. 179 // the screen size.
179 const gfx::Rect cursor3_bounds(100, screen_bounds.bottom() - 25, 1, 20); 180 const gfx::Rect cursor3_bounds(100, screen_bounds.bottom() - 25, 1, 20);
180 gfx::Rect mi3_bounds; 181 gfx::Rect mi3_bounds;
181 { 182 {
182 ScopedModeIndicatorObserverForTesting observer; 183 ScopedModeIndicatorObserverForTesting observer;
183 candidate_window->SetCursorBounds(cursor3_bounds, cursor3_bounds); 184 candidate_window->SetCursorBounds(cursor3_bounds, cursor3_bounds);
184 imm->GetActiveIMEState()->SwitchToNextInputMethod(); 185 imm->GetActiveIMEState()->SwitchToNextInputMethod();
185 mi3_bounds = observer.last_bounds(); 186 mi3_bounds = observer.last_bounds();
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 // When a new mode indicator is displayed, the previous one should be 221 // When a new mode indicator is displayed, the previous one should be
221 // closed. 222 // closed.
222 content::RunAllPendingInMessageLoop(); 223 content::RunAllPendingInMessageLoop();
223 EXPECT_EQ(1UL, observer.widget_list_size()); 224 EXPECT_EQ(1UL, observer.widget_list_size());
224 const views::Widget* widget2 = observer.widget_list()[0]; 225 const views::Widget* widget2 = observer.widget_list()[0];
225 EXPECT_NE(widget1, widget2); 226 EXPECT_NE(widget1, widget2);
226 } 227 }
227 } 228 }
228 } // namespace input_method 229 } // namespace input_method
229 } // namespace chromeos 230 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/input_method/candidate_window_controller_impl.cc ('k') | chrome/browser/chromeos/login/helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698