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

Side by Side Diff: views/controls/single_split_view_unittest.cc

Issue 6452011: Rework tree APIs to reflect Google style and more const-correctness.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/logging.h" 5 #include "base/logging.h"
6 #include "testing/gmock/include/gmock/gmock.h" 6 #include "testing/gmock/include/gmock/gmock.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "views/controls/single_split_view.h" 8 #include "views/controls/single_split_view.h"
9 9
10 using ::testing::_; 10 using ::testing::_;
11 using ::testing::Return; 11 using ::testing::Return;
12 12
13 namespace { 13 namespace {
14 14
15 static void VerifySplitViewLayout(const views::SingleSplitView& split) { 15 static void VerifySplitViewLayout(const views::SingleSplitView& split) {
16 ASSERT_EQ(2, split.GetChildViewCount()); 16 ASSERT_EQ(2, split.child_count());
17 17
18 views::View* leading = split.GetChildViewAt(0); 18 const views::View* leading = split.GetChildViewAt(0);
19 views::View* trailing = split.GetChildViewAt(1); 19 const views::View* trailing = split.GetChildViewAt(1);
20 20
21 if (split.bounds().IsEmpty()) { 21 if (split.bounds().IsEmpty()) {
22 EXPECT_TRUE(leading->bounds().IsEmpty()); 22 EXPECT_TRUE(leading->bounds().IsEmpty());
23 EXPECT_TRUE(trailing->bounds().IsEmpty()); 23 EXPECT_TRUE(trailing->bounds().IsEmpty());
24 return; 24 return;
25 } 25 }
26 26
27 EXPECT_FALSE(leading->bounds().IsEmpty()); 27 EXPECT_FALSE(leading->bounds().IsEmpty());
28 EXPECT_FALSE(trailing->bounds().IsEmpty()); 28 EXPECT_FALSE(trailing->bounds().IsEmpty());
29 EXPECT_FALSE(leading->bounds().Intersects(trailing->bounds())); 29 EXPECT_FALSE(leading->bounds().Intersects(trailing->bounds()));
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 165
166 MouseEvent mouse_released( 166 MouseEvent mouse_released(
167 Event::ET_MOUSE_RELEASED, 7, 167 Event::ET_MOUSE_RELEASED, 7,
168 kInitialDividerOffset + kMouseOffset + kMouseMoveDelta * 2, 0); 168 kInitialDividerOffset + kMouseOffset + kMouseMoveDelta * 2, 0);
169 split.OnMouseReleased(mouse_released, false); 169 split.OnMouseReleased(mouse_released, false);
170 EXPECT_EQ(kInitialDividerOffset + kMouseMoveDelta * 2, 170 EXPECT_EQ(kInitialDividerOffset + kMouseMoveDelta * 2,
171 split.divider_offset()); 171 split.divider_offset());
172 } 172 }
173 173
174 } // namespace views 174 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/single_split_view.cc ('k') | views/controls/tabbed_pane/native_tabbed_pane_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698