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

Side by Side Diff: components/mus/view_coordinate_conversions_unittest.cc

Issue 1340983002: Mandoline UI Process: Update namespaces and file names (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 3 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 | « components/mus/view_coordinate_conversions.cc ('k') | components/mus/view_locator.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 "components/mus/view_coordinate_conversions.h" 5 #include "components/mus/view_coordinate_conversions.h"
6 6
7 #include "components/mus/server_view.h" 7 #include "components/mus/server_view.h"
8 #include "components/mus/server_view_delegate.h" 8 #include "components/mus/server_view_delegate.h"
9 #include "components/mus/test_server_view_delegate.h" 9 #include "components/mus/test_server_view_delegate.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 #include "ui/gfx/geometry/point_f.h" 11 #include "ui/gfx/geometry/point_f.h"
12 #include "ui/gfx/geometry/rect.h" 12 #include "ui/gfx/geometry/rect.h"
13 13
14 namespace view_manager { 14 namespace mus {
15 15
16 using ViewCoordinateConversionsTest = testing::Test; 16 using ViewCoordinateConversionsTest = testing::Test;
17 17
18 TEST_F(ViewCoordinateConversionsTest, ConvertRectBetweenViews) { 18 TEST_F(ViewCoordinateConversionsTest, ConvertRectBetweenViews) {
19 TestServerViewDelegate d1, d2, d3; 19 TestServerViewDelegate d1, d2, d3;
20 ServerView v1(&d1, ViewId()), v2(&d2, ViewId()), v3(&d3, ViewId()); 20 ServerView v1(&d1, ViewId()), v2(&d2, ViewId()), v3(&d3, ViewId());
21 v1.SetBounds(gfx::Rect(1, 2, 100, 100)); 21 v1.SetBounds(gfx::Rect(1, 2, 100, 100));
22 v2.SetBounds(gfx::Rect(3, 4, 100, 100)); 22 v2.SetBounds(gfx::Rect(3, 4, 100, 100));
23 v3.SetBounds(gfx::Rect(5, 6, 100, 100)); 23 v3.SetBounds(gfx::Rect(5, 6, 100, 100));
24 v1.Add(&v2); 24 v1.Add(&v2);
(...skipping 23 matching lines...) Expand all
48 } 48 }
49 49
50 { 50 {
51 const gfx::PointF result( 51 const gfx::PointF result(
52 ConvertPointFBetweenViews(&v3, &v1, gfx::PointF(10.2f, 11.4f))); 52 ConvertPointFBetweenViews(&v3, &v1, gfx::PointF(10.2f, 11.4f)));
53 EXPECT_FLOAT_EQ(18.2f, result.x()); 53 EXPECT_FLOAT_EQ(18.2f, result.x());
54 EXPECT_FLOAT_EQ(21.4f, result.y()); 54 EXPECT_FLOAT_EQ(21.4f, result.y());
55 } 55 }
56 } 56 }
57 57
58 } // namespace view_manager 58 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/view_coordinate_conversions.cc ('k') | components/mus/view_locator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698