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

Side by Side Diff: ash/wm/workspace/workspace_layout_manager_unittest.cc

Issue 2840043003: chromeos: Makes mushrome use simplified display management (Closed)
Patch Set: merge Created 3 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
« no previous file with comments | « ash/test/ash_test_helper.cc ('k') | chrome/app/mash/embedded_services.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/wm/workspace/workspace_layout_manager.h" 5 #include "ash/wm/workspace/workspace_layout_manager.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "ash/public/cpp/config.h" 10 #include "ash/public/cpp/config.h"
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 // Normal window bounds shouldn't be changed. 473 // Normal window bounds shouldn't be changed.
474 gfx::Size work_area( 474 gfx::Size work_area(
475 display::Screen::GetScreen()->GetPrimaryDisplay().work_area().size()); 475 display::Screen::GetScreen()->GetPrimaryDisplay().work_area().size());
476 const gfx::Rect window_bounds(100, 101, work_area.width() + 1, 476 const gfx::Rect window_bounds(100, 101, work_area.width() + 1,
477 work_area.height() + 2); 477 work_area.height() + 2);
478 std::unique_ptr<WindowOwner> window_owner(CreateTestWindow(window_bounds)); 478 std::unique_ptr<WindowOwner> window_owner(CreateTestWindow(window_bounds));
479 WmWindow* window = window_owner->window(); 479 WmWindow* window = window_owner->window();
480 // TODO: fix. This test verifies that when a window is added the bounds are 480 // TODO: fix. This test verifies that when a window is added the bounds are
481 // adjusted. CreateTestWindow() for mus adds, then sets the bounds (this comes 481 // adjusted. CreateTestWindow() for mus adds, then sets the bounds (this comes
482 // from NativeWidgetAura), which means this test now fails for aura-mus. 482 // from NativeWidgetAura), which means this test now fails for aura-mus.
483 if (Shell::GetAshConfig() != Config::MASH) { 483 if (Shell::GetAshConfig() == Config::CLASSIC) {
484 EXPECT_EQ(gfx::Rect(gfx::Point(100, 101), work_area).ToString(), 484 EXPECT_EQ(gfx::Rect(gfx::Point(100, 101), work_area).ToString(),
485 window->GetBounds().ToString()); 485 window->GetBounds().ToString());
486 } 486 }
487 487
488 // Directly setting the bounds triggers a slightly different code path. Verify 488 // Directly setting the bounds triggers a slightly different code path. Verify
489 // that too. 489 // that too.
490 window->SetBounds(window_bounds); 490 window->SetBounds(window_bounds);
491 EXPECT_EQ(gfx::Rect(gfx::Point(100, 101), work_area).ToString(), 491 EXPECT_EQ(gfx::Rect(gfx::Point(100, 101), work_area).ToString(),
492 window->GetBounds().ToString()); 492 window->GetBounds().ToString());
493 } 493 }
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 window->SetBounds(keyboard_bounds()); 1273 window->SetBounds(keyboard_bounds());
1274 window->GetWindowState()->set_ignore_keyboard_bounds_change(true); 1274 window->GetWindowState()->set_ignore_keyboard_bounds_change(true);
1275 window->Activate(); 1275 window->Activate();
1276 1276
1277 EXPECT_EQ(keyboard_bounds(), window->GetBounds()); 1277 EXPECT_EQ(keyboard_bounds(), window->GetBounds());
1278 ShowKeyboard(); 1278 ShowKeyboard();
1279 EXPECT_EQ(keyboard_bounds(), window->GetBounds()); 1279 EXPECT_EQ(keyboard_bounds(), window->GetBounds());
1280 } 1280 }
1281 1281
1282 } // namespace ash 1282 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/ash_test_helper.cc ('k') | chrome/app/mash/embedded_services.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698