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

Side by Side Diff: ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc

Issue 10358013: views: Mark single-argument constructors as explicit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | « ui/views/controls/scrollbar/scroll_bar.h ('k') | ui/views/controls/throbber.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 (c) 2011 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "ui/views/controls/tabbed_pane/tabbed_pane.h" 8 #include "ui/views/controls/tabbed_pane/tabbed_pane.h"
9 #include "ui/views/test/views_test_base.h" 9 #include "ui/views/test/views_test_base.h"
10 #include "ui/views/widget/widget.h" 10 #include "ui/views/widget/widget.h"
11 #include "ui/views/widget/widget_delegate.h" 11 #include "ui/views/widget/widget_delegate.h"
12 12
13 namespace views { 13 namespace views {
14 14
15 // A view for testing that takes a fixed preferred size upon construction. 15 // A view for testing that takes a fixed preferred size upon construction.
16 class FixedSizeView : public View { 16 class FixedSizeView : public View {
17 public: 17 public:
18 FixedSizeView(const gfx::Size& size) 18 explicit FixedSizeView(const gfx::Size& size)
19 : size_(size) {} 19 : size_(size) {}
20 20
21 virtual gfx::Size GetPreferredSize() { 21 // Overridden from View:
22 virtual gfx::Size GetPreferredSize() OVERRIDE {
22 return size_; 23 return size_;
23 } 24 }
24 25
25 private: 26 private:
26 const gfx::Size size_; 27 const gfx::Size size_;
27 28
28 DISALLOW_COPY_AND_ASSIGN(FixedSizeView); 29 DISALLOW_COPY_AND_ASSIGN(FixedSizeView);
29 }; 30 };
30 31
31 class TabbedPaneTest : public ViewsTestBase, 32 class TabbedPaneTest : public ViewsTestBase,
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // Now change the selected tab. 127 // Now change the selected tab.
127 tabbed_pane_->SelectTabAt(1); 128 tabbed_pane_->SelectTabAt(1);
128 EXPECT_EQ(1, tabbed_pane_->GetSelectedTabIndex()); 129 EXPECT_EQ(1, tabbed_pane_->GetSelectedTabIndex());
129 130
130 // Remove the first one. 131 // Remove the first one.
131 delete tabbed_pane_->RemoveTabAtIndex(0); 132 delete tabbed_pane_->RemoveTabAtIndex(0);
132 EXPECT_EQ(0, tabbed_pane_->GetSelectedTabIndex()); 133 EXPECT_EQ(0, tabbed_pane_->GetSelectedTabIndex());
133 } 134 }
134 135
135 } // namespace views 136 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/scrollbar/scroll_bar.h ('k') | ui/views/controls/throbber.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698