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

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

Issue 2734653002: chromeos: Move files in //ash/common to //ash (Closed)
Patch Set: fix a11y tests, fix docs Created 3 years, 9 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
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/common/wm/workspace/magnetism_matcher.h" 5 #include "ash/wm/workspace/magnetism_matcher.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace ash { 9 namespace ash {
10 10
11 // Trivial test case verifying assertions on left edge. 11 // Trivial test case verifying assertions on left edge.
12 TEST(MagnetismMatcherTest, TrivialLeft) { 12 TEST(MagnetismMatcherTest, TrivialLeft) {
13 const int distance = MagnetismMatcher::kMagneticDistance; 13 const int distance = MagnetismMatcher::kMagneticDistance;
14 const gfx::Rect initial_bounds(20, 10, 50, 60); 14 const gfx::Rect initial_bounds(20, 10, 50, 60);
15 MagnetismMatcher matcher(initial_bounds, kAllMagnetismEdges); 15 MagnetismMatcher matcher(initial_bounds, kAllMagnetismEdges);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 EXPECT_FALSE(matcher.ShouldAttach( 150 EXPECT_FALSE(matcher.ShouldAttach(
151 gfx::Rect(initial_bounds.x() - 4, 160, 3, 20), &edge)); 151 gfx::Rect(initial_bounds.x() - 4, 160, 3, 20), &edge));
152 // Should match the following which extends into non-overlapping region. 152 // Should match the following which extends into non-overlapping region.
153 EXPECT_TRUE(matcher.ShouldAttach( 153 EXPECT_TRUE(matcher.ShouldAttach(
154 gfx::Rect(initial_bounds.x() - 4, 140, 3, 20), &edge)); 154 gfx::Rect(initial_bounds.x() - 4, 140, 3, 20), &edge));
155 EXPECT_EQ(MAGNETISM_EDGE_LEFT, edge.primary_edge); 155 EXPECT_EQ(MAGNETISM_EDGE_LEFT, edge.primary_edge);
156 EXPECT_EQ(SECONDARY_MAGNETISM_EDGE_NONE, edge.secondary_edge); 156 EXPECT_EQ(SECONDARY_MAGNETISM_EDGE_NONE, edge.secondary_edge);
157 } 157 }
158 158
159 } // namespace ash 159 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace/magnetism_matcher.cc ('k') | ash/wm/workspace/multi_window_resize_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698