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

Side by Side Diff: ash/system/web_notification/ash_popup_alignment_delegate_unittest.cc

Issue 2270553002: Move ash::DisplayInfo to ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 3 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 | « ash/system/chromeos/tray_display.cc ('k') | ash/test/ash_test_helper.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/common/system/web_notification/ash_popup_alignment_delegate.h" 5 #include "ash/common/system/web_notification/ash_popup_alignment_delegate.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/common/shelf/shelf_types.h" 10 #include "ash/common/shelf/shelf_types.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 const gfx::Rect toast_size(0, 0, 10, 10); 217 const gfx::Rect toast_size(0, 0, 10, 10);
218 UpdateDisplay("600x600"); 218 UpdateDisplay("600x600");
219 int origin_x = alignment_delegate()->GetToastOriginX(toast_size); 219 int origin_x = alignment_delegate()->GetToastOriginX(toast_size);
220 int baseline = alignment_delegate()->GetBaseLine(); 220 int baseline = alignment_delegate()->GetBaseLine();
221 221
222 // Emulate the docked mode; enter to an extended mode, then invoke 222 // Emulate the docked mode; enter to an extended mode, then invoke
223 // OnNativeDisplaysChanged() with the info for the secondary display only. 223 // OnNativeDisplaysChanged() with the info for the secondary display only.
224 UpdateDisplay("600x600,800x800"); 224 UpdateDisplay("600x600,800x800");
225 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); 225 DisplayManager* display_manager = Shell::GetInstance()->display_manager();
226 226
227 std::vector<DisplayInfo> new_info; 227 std::vector<display::ManagedDisplayInfo> new_info;
228 new_info.push_back( 228 new_info.push_back(
229 display_manager->GetDisplayInfo(display_manager->GetDisplayAt(1u).id())); 229 display_manager->GetDisplayInfo(display_manager->GetDisplayAt(1u).id()));
230 display_manager->OnNativeDisplaysChanged(new_info); 230 display_manager->OnNativeDisplaysChanged(new_info);
231 231
232 EXPECT_LT(origin_x, alignment_delegate()->GetToastOriginX(toast_size)); 232 EXPECT_LT(origin_x, alignment_delegate()->GetToastOriginX(toast_size));
233 EXPECT_LT(baseline, alignment_delegate()->GetBaseLine()); 233 EXPECT_LT(baseline, alignment_delegate()->GetBaseLine());
234 } 234 }
235 235
236 TEST_F(AshPopupAlignmentDelegateTest, TrayHeight) { 236 TEST_F(AshPopupAlignmentDelegateTest, TrayHeight) {
237 const gfx::Rect toast_size(0, 0, 10, 10); 237 const gfx::Rect toast_size(0, 0, 10, 10);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 shelf->SetVirtualKeyboardBoundsForTesting(keyboard_bounds); 307 shelf->SetVirtualKeyboardBoundsForTesting(keyboard_bounds);
308 int keyboard_baseline = alignment_delegate()->GetBaseLine(); 308 int keyboard_baseline = alignment_delegate()->GetBaseLine();
309 EXPECT_NE(baseline, keyboard_baseline); 309 EXPECT_NE(baseline, keyboard_baseline);
310 EXPECT_GT(keyboard_bounds.y(), keyboard_baseline); 310 EXPECT_GT(keyboard_bounds.y(), keyboard_baseline);
311 311
312 shelf->SetVirtualKeyboardBoundsForTesting(gfx::Rect()); 312 shelf->SetVirtualKeyboardBoundsForTesting(gfx::Rect());
313 EXPECT_EQ(baseline, alignment_delegate()->GetBaseLine()); 313 EXPECT_EQ(baseline, alignment_delegate()->GetBaseLine());
314 } 314 }
315 315
316 } // namespace ash 316 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/chromeos/tray_display.cc ('k') | ash/test/ash_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698