OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |