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

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

Issue 10797046: (Views only): Allow choosing between NativeTabbedPaneView and NativeTabbedPaneWin on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "Fix file header *sigh*" Created 8 years, 4 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/tabbed_pane/tabbed_pane.cc ('k') | ui/views/focus/focus_manager_unittest.cc » ('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) 2012 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"
(...skipping 22 matching lines...) Expand all
33 public WidgetDelegate { 33 public WidgetDelegate {
34 public: 34 public:
35 TabbedPaneTest() {} 35 TabbedPaneTest() {}
36 36
37 TabbedPane* tabbed_pane_; 37 TabbedPane* tabbed_pane_;
38 38
39 private: 39 private:
40 virtual void SetUp() OVERRIDE { 40 virtual void SetUp() OVERRIDE {
41 ViewsTestBase::SetUp(); 41 ViewsTestBase::SetUp();
42 tabbed_pane_ = new TabbedPane(); 42 tabbed_pane_ = new TabbedPane();
43 tabbed_pane_->set_use_native_win_control(true);
43 window_ = Widget::CreateWindowWithBounds(this, gfx::Rect(0, 0, 100, 100)); 44 window_ = Widget::CreateWindowWithBounds(this, gfx::Rect(0, 0, 100, 100));
44 window_->Show(); 45 window_->Show();
45 } 46 }
46 47
47 virtual void TearDown() OVERRIDE { 48 virtual void TearDown() OVERRIDE {
48 window_->Close(); 49 window_->Close();
49 ViewsTestBase::TearDown(); 50 ViewsTestBase::TearDown();
50 } 51 }
51 52
52 virtual views::View* GetContentsView() OVERRIDE { 53 virtual views::View* GetContentsView() OVERRIDE {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // Now change the selected tab. 128 // Now change the selected tab.
128 tabbed_pane_->SelectTabAt(1); 129 tabbed_pane_->SelectTabAt(1);
129 EXPECT_EQ(1, tabbed_pane_->GetSelectedTabIndex()); 130 EXPECT_EQ(1, tabbed_pane_->GetSelectedTabIndex());
130 131
131 // Remove the first one. 132 // Remove the first one.
132 delete tabbed_pane_->RemoveTabAtIndex(0); 133 delete tabbed_pane_->RemoveTabAtIndex(0);
133 EXPECT_EQ(0, tabbed_pane_->GetSelectedTabIndex()); 134 EXPECT_EQ(0, tabbed_pane_->GetSelectedTabIndex());
134 } 135 }
135 136
136 } // namespace views 137 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/tabbed_pane/tabbed_pane.cc ('k') | ui/views/focus/focus_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698