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

Side by Side Diff: views/layout/grid_layout_unittest.cc

Issue 6382009: views: Move grid_layout files into layout directory. Final Part. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « views/layout/grid_layout.cc ('k') | views/views.gyp » ('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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 #include "views/grid_layout.h" 6 #include "views/layout/grid_layout.h"
7 #include "views/view.h" 7 #include "views/view.h"
8 8
9 using views::ColumnSet; 9 using views::ColumnSet;
10 using views::GridLayout; 10 using views::GridLayout;
11 using views::View; 11 using views::View;
12 12
13 static void ExpectViewBoundsEquals(int x, int y, int w, int h, 13 static void ExpectViewBoundsEquals(int x, int y, int w, int h,
14 const View* view) { 14 const View* view) {
15 EXPECT_EQ(x, view->x()); 15 EXPECT_EQ(x, view->x());
16 EXPECT_EQ(y, view->y()); 16 EXPECT_EQ(y, view->y());
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 // ordering doesn't influence sizing behaviour. 599 // ordering doesn't influence sizing behaviour.
600 layout->StartRow(0, 2); 600 layout->StartRow(0, 2);
601 View* view3 = new FlexibleView(40); 601 View* view3 = new FlexibleView(40);
602 layout->AddView(view3, 1, 1, GridLayout::FILL, GridLayout::LEADING); 602 layout->AddView(view3, 1, 1, GridLayout::FILL, GridLayout::LEADING);
603 603
604 // We expect a height of 50: 30 from the variable width view in the first row 604 // We expect a height of 50: 30 from the variable width view in the first row
605 // plus 20 from the statically sized view in the second row. The flexible 605 // plus 20 from the statically sized view in the second row. The flexible
606 // view in the third row should contribute no height. 606 // view in the third row should contribute no height.
607 EXPECT_EQ(gfx::Size(20, 50), layout->GetPreferredSize(&host)); 607 EXPECT_EQ(gfx::Size(20, 50), layout->GetPreferredSize(&host));
608 } 608 }
OLDNEW
« no previous file with comments | « views/layout/grid_layout.cc ('k') | views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698