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

Side by Side Diff: ash/wm/drag_window_resizer_unittest.cc

Issue 2225083003: mash: Add WmShell::SetDisplayWorkAreaInsets for ShelfLayoutManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits; fix bad argument. Created 4 years, 4 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/shell.h ('k') | no next file » | 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/drag_window_resizer.h" 5 #include "ash/wm/drag_window_resizer.h"
6 6
7 #include "ash/aura/wm_window_aura.h" 7 #include "ash/aura/wm_window_aura.h"
8 #include "ash/common/material_design/material_design_controller.h" 8 #include "ash/common/material_design/material_design_controller.h"
9 #include "ash/common/shell_window_ids.h" 9 #include "ash/common/shell_window_ids.h"
10 #include "ash/common/wm/window_positioning_utils.h" 10 #include "ash/common/wm/window_positioning_utils.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 void SetUp() override { 72 void SetUp() override {
73 AshMDTestBase::SetUp(); 73 AshMDTestBase::SetUp();
74 74
75 UpdateDisplay(base::StringPrintf("800x%d", kRootHeight)); 75 UpdateDisplay(base::StringPrintf("800x%d", kRootHeight));
76 76
77 aura::Window* root = Shell::GetPrimaryRootWindow(); 77 aura::Window* root = Shell::GetPrimaryRootWindow();
78 gfx::Rect root_bounds(root->bounds()); 78 gfx::Rect root_bounds(root->bounds());
79 EXPECT_EQ(kRootHeight, root_bounds.height()); 79 EXPECT_EQ(kRootHeight, root_bounds.height());
80 EXPECT_EQ(800, root_bounds.width()); 80 EXPECT_EQ(800, root_bounds.width());
81 Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets());
82 window_.reset(new aura::Window(&delegate_)); 81 window_.reset(new aura::Window(&delegate_));
83 window_->SetType(ui::wm::WINDOW_TYPE_NORMAL); 82 window_->SetType(ui::wm::WINDOW_TYPE_NORMAL);
84 window_->Init(ui::LAYER_NOT_DRAWN); 83 window_->Init(ui::LAYER_NOT_DRAWN);
85 ParentWindowInPrimaryRootWindow(window_.get()); 84 ParentWindowInPrimaryRootWindow(window_.get());
86 window_->set_id(1); 85 window_->set_id(1);
87 86
88 always_on_top_window_.reset(new aura::Window(&delegate2_)); 87 always_on_top_window_.reset(new aura::Window(&delegate2_));
89 always_on_top_window_->SetType(ui::wm::WINDOW_TYPE_NORMAL); 88 always_on_top_window_->SetType(ui::wm::WINDOW_TYPE_NORMAL);
90 always_on_top_window_->SetProperty(aura::client::kAlwaysOnTopKey, true); 89 always_on_top_window_->SetProperty(aura::client::kAlwaysOnTopKey, true);
91 always_on_top_window_->Init(ui::LAYER_NOT_DRAWN); 90 always_on_top_window_->Init(ui::LAYER_NOT_DRAWN);
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 ASSERT_TRUE(resizer.get()); 780 ASSERT_TRUE(resizer.get());
782 resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0); 781 resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0);
783 EXPECT_TRUE(TestIfMouseWarpsAt(gfx::Point(399, 200))); 782 EXPECT_TRUE(TestIfMouseWarpsAt(gfx::Point(399, 200)));
784 EXPECT_EQ("401,200", 783 EXPECT_EQ("401,200",
785 aura::Env::GetInstance()->last_mouse_location().ToString()); 784 aura::Env::GetInstance()->last_mouse_location().ToString());
786 resizer->CompleteDrag(); 785 resizer->CompleteDrag();
787 } 786 }
788 } 787 }
789 788
790 } // namespace ash 789 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698