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

Side by Side Diff: mash/wm/frame/move_loop_unittest.cc

Issue 1459653002: Gets mustash frames looking like that of ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update test Created 5 years, 1 month 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 | « mash/wm/frame/move_loop.cc ('k') | mash/wm/frame/non_client_frame_view_mash.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "mash/wm/move_loop.h" 5 #include "mash/wm/frame/move_loop.h"
6 6
7 #include "components/mus/public/cpp/tests/test_window.h" 7 #include "components/mus/public/cpp/tests/test_window.h"
8 #include "mojo/converters/input_events/input_events_type_converters.h" 8 #include "mojo/converters/input_events/input_events_type_converters.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "ui/events/event.h" 10 #include "ui/events/event.h"
11 #include "ui/gfx/geometry/point.h" 11 #include "ui/gfx/geometry/point.h"
12 #include "ui/gfx/geometry/rect.h" 12 #include "ui/gfx/geometry/rect.h"
13 13
14 using MoveLoopTest = testing::Test; 14 using MoveLoopTest = testing::Test;
15 15
16 namespace mash {
17 namespace wm {
18
16 namespace { 19 namespace {
17 20
18 // Sets the client area for |window|. Padding is provided on the top so that 21 // Sets the client area for |window|. Padding is provided on the top so that
19 // there is a movable region. All other edges are sized to 22 // there is a movable region. All other edges are sized to
20 // |MoveLoop::kResizeSize|. 23 // |MoveLoop::kResizeSize|.
21 void SetClientArea(mus::Window* window) { 24 void SetClientArea(mus::Window* window) {
22 if (window->bounds().IsEmpty()) 25 if (window->bounds().IsEmpty())
23 window->SetBounds(gfx::Rect(100, 200, 300, 400)); 26 window->SetBounds(gfx::Rect(100, 200, 300, 400));
24 27
25 window->SetClientArea( 28 window->SetClientArea(
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 ASSERT_TRUE(move_loop.get()) << i; 173 ASSERT_TRUE(move_loop.get()) << i;
171 for (int j = 0; j < data[i].delta_count; ++j) { 174 for (int j = 0; j < data[i].delta_count; ++j) {
172 pointer_location.Offset(data[i].delta_x[j], data[i].delta_y[j]); 175 pointer_location.Offset(data[i].delta_x[j], data[i].delta_y[j]);
173 ASSERT_EQ(MoveLoop::MoveResult::CONTINUE, 176 ASSERT_EQ(MoveLoop::MoveResult::CONTINUE,
174 move_loop->Move(*CreatePointerMove(pointer_location))) 177 move_loop->Move(*CreatePointerMove(pointer_location)))
175 << i << " " << j; 178 << i << " " << j;
176 } 179 }
177 ASSERT_EQ(data[i].expected_bounds, window.bounds()); 180 ASSERT_EQ(data[i].expected_bounds, window.bounds());
178 } 181 }
179 } 182 }
183
184 } // namespace wm
185 } // namespace mash
OLDNEW
« no previous file with comments | « mash/wm/frame/move_loop.cc ('k') | mash/wm/frame/non_client_frame_view_mash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698