| OLD | NEW |
| 1 // Copyright (c) 2011 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 "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/test/views_test_base.h" | 8 #include "ui/views/test/views_test_base.h" |
| 9 #include "ui/views/widget/widget.h" | |
| 10 #include "ui/views/widget/widget_delegate.h" | |
| 11 #include "views/controls/tabbed_pane/tabbed_pane.h" | 9 #include "views/controls/tabbed_pane/tabbed_pane.h" |
| 10 #include "views/widget/widget.h" |
| 11 #include "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 FixedSizeView(const gfx::Size& size) |
| 19 : size_(size) {} | 19 : size_(size) {} |
| 20 | 20 |
| 21 virtual gfx::Size GetPreferredSize() { | 21 virtual gfx::Size GetPreferredSize() { |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 // Now change the selected tab. | 126 // Now change the selected tab. |
| 127 tabbed_pane_->SelectTabAt(1); | 127 tabbed_pane_->SelectTabAt(1); |
| 128 EXPECT_EQ(1, tabbed_pane_->GetSelectedTabIndex()); | 128 EXPECT_EQ(1, tabbed_pane_->GetSelectedTabIndex()); |
| 129 | 129 |
| 130 // Remove the first one. | 130 // Remove the first one. |
| 131 delete tabbed_pane_->RemoveTabAtIndex(0); | 131 delete tabbed_pane_->RemoveTabAtIndex(0); |
| 132 EXPECT_EQ(0, tabbed_pane_->GetSelectedTabIndex()); | 132 EXPECT_EQ(0, tabbed_pane_->GetSelectedTabIndex()); |
| 133 } | 133 } |
| 134 | 134 |
| 135 } // namespace views | 135 } // namespace views |
| OLD | NEW |