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

Side by Side Diff: ui/base/touch/selection_bound_unittest.cc

Issue 823133004: Cleanup: Update the path to gfx rect headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rect_f.h Created 5 years, 11 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 | « ui/base/touch/selection_bound.cc ('k') | ui/chromeos/ime/mode_indicator_view.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/base/touch/selection_bound.h" 5 #include "ui/base/touch/selection_bound.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "ui/gfx/rect.h" 8 #include "ui/gfx/geometry/rect.h"
9 9
10 namespace ui { 10 namespace ui {
11 11
12 TEST(SelectionBoundTest, RectBetweenSelectionBounds) { 12 TEST(SelectionBoundTest, RectBetweenSelectionBounds) {
13 SelectionBound b1, b2; 13 SelectionBound b1, b2;
14 // Simple case of aligned vertical bounds of equal height 14 // Simple case of aligned vertical bounds of equal height
15 b1.SetEdge(gfx::Point(0, 20), gfx::Point(0, 25)); 15 b1.SetEdge(gfx::Point(0, 20), gfx::Point(0, 25));
16 b2.SetEdge(gfx::Point(110, 20), gfx::Point(110, 25)); 16 b2.SetEdge(gfx::Point(110, 20), gfx::Point(110, 25));
17 gfx::Rect expected_rect( 17 gfx::Rect expected_rect(
18 b1.edge_top_rounded().x(), 18 b1.edge_top_rounded().x(),
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 expected_rect = gfx::Rect( 81 expected_rect = gfx::Rect(
82 b1.edge_bottom_rounded().x(), 82 b1.edge_bottom_rounded().x(),
83 b1.edge_top_rounded().y(), 83 b1.edge_top_rounded().y(),
84 b2.edge_bottom_rounded().x() - b1.edge_bottom_rounded().x(), 84 b2.edge_bottom_rounded().x() - b1.edge_bottom_rounded().x(),
85 b2.edge_bottom_rounded().y() - b2.edge_top_rounded().y()); 85 b2.edge_bottom_rounded().y() - b2.edge_top_rounded().y());
86 EXPECT_EQ(expected_rect, RectBetweenSelectionBounds(b1, b2)); 86 EXPECT_EQ(expected_rect, RectBetweenSelectionBounds(b1, b2));
87 EXPECT_EQ(expected_rect, RectBetweenSelectionBounds(b2, b1)); 87 EXPECT_EQ(expected_rect, RectBetweenSelectionBounds(b2, b1));
88 } 88 }
89 89
90 } // namespace ui 90 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/touch/selection_bound.cc ('k') | ui/chromeos/ime/mode_indicator_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698