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

Side by Side Diff: ash/display/display_manager_unittest.cc

Issue 17704003: Create RootWindowTransformer after root window's bounds and scale factor are updated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ash/display/display_controller_unittest.cc ('k') | ash/display/root_window_transformers.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/display/display_manager.h" 5 #include "ash/display/display_manager.h"
6 6
7 #include "ash/display/display_controller.h" 7 #include "ash/display/display_controller.h"
8 #include "ash/screen_ash.h" 8 #include "ash/screen_ash.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/test/ash_test_base.h" 10 #include "ash/test/ash_test_base.h"
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 EXPECT_EQ(1u, changed().size()); 367 EXPECT_EQ(1u, changed().size());
368 EXPECT_EQ(display2_id, changed()[0].id()); 368 EXPECT_EQ(display2_id, changed()[0].id());
369 369
370 reset(); 370 reset();
371 display_manager()->SetOverscanInsets(display2_id, gfx::Insets(0, 0, 0, 0)); 371 display_manager()->SetOverscanInsets(display2_id, gfx::Insets(0, 0, 0, 0));
372 EXPECT_EQ(1u, changed().size()); 372 EXPECT_EQ(1u, changed().size());
373 EXPECT_EQ(display2_id, changed()[0].id()); 373 EXPECT_EQ(display2_id, changed()[0].id());
374 } 374 }
375 375
376 TEST_F(DisplayManagerTest, TestDeviceScaleOnlyChange) { 376 TEST_F(DisplayManagerTest, TestDeviceScaleOnlyChange) {
377 if (!SupportsHostWindowResize())
378 return;
379
377 UpdateDisplay("1000x600"); 380 UpdateDisplay("1000x600");
378 EXPECT_EQ(1, 381 EXPECT_EQ(1,
379 Shell::GetPrimaryRootWindow()->compositor()->device_scale_factor()); 382 Shell::GetPrimaryRootWindow()->compositor()->device_scale_factor());
380 EXPECT_EQ("1000x600", 383 EXPECT_EQ("1000x600",
381 Shell::GetPrimaryRootWindow()->bounds().size().ToString()); 384 Shell::GetPrimaryRootWindow()->bounds().size().ToString());
382 UpdateDisplay("1000x600*2"); 385 UpdateDisplay("1000x600*2");
383 EXPECT_EQ(2, 386 EXPECT_EQ(2,
384 Shell::GetPrimaryRootWindow()->compositor()->device_scale_factor()); 387 Shell::GetPrimaryRootWindow()->compositor()->device_scale_factor());
385 EXPECT_EQ("500x300", 388 EXPECT_EQ("500x300",
386 Shell::GetPrimaryRootWindow()->bounds().size().ToString()); 389 Shell::GetPrimaryRootWindow()->bounds().size().ToString());
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 UpdateDisplay("400x600/o,600x800/o"); 998 UpdateDisplay("400x600/o,600x800/o");
996 EXPECT_FALSE(display_observer.changed_and_reset()); 999 EXPECT_FALSE(display_observer.changed_and_reset());
997 EXPECT_EQ("400x600", test_api.GetRootWindow()->bounds().size().ToString()); 1000 EXPECT_EQ("400x600", test_api.GetRootWindow()->bounds().size().ToString());
998 EXPECT_EQ("600x800", GetMirroredDisplay().size().ToString()); 1001 EXPECT_EQ("600x800", GetMirroredDisplay().size().ToString());
999 1002
1000 Shell::GetScreen()->RemoveObserver(&display_observer); 1003 Shell::GetScreen()->RemoveObserver(&display_observer);
1001 } 1004 }
1002 1005
1003 } // namespace internal 1006 } // namespace internal
1004 } // namespace ash 1007 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/display_controller_unittest.cc ('k') | ash/display/root_window_transformers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698