OLD | NEW |
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/message_loop.h" | 5 #include "base/message_loop.h" |
6 #include "testing/gtest/include/gtest/gtest.h" | 6 #include "testing/gtest/include/gtest/gtest.h" |
7 #include "views/controls/tabbed_pane/tabbed_pane.h" | 7 #include "views/controls/tabbed_pane/tabbed_pane.h" |
8 #include "views/window/window.h" | 8 #include "views/window/window.h" |
9 #include "views/window/window_delegate.h" | 9 #include "views/window/window_delegate.h" |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 } | 37 } |
38 | 38 |
39 private: | 39 private: |
40 virtual void SetUp() { | 40 virtual void SetUp() { |
41 tabbed_pane_ = new TabbedPane(); | 41 tabbed_pane_ = new TabbedPane(); |
42 window_ = Window::CreateChromeWindow(NULL, gfx::Rect(0, 0, 100, 100), this); | 42 window_ = Window::CreateChromeWindow(NULL, gfx::Rect(0, 0, 100, 100), this); |
43 window_->Show(); | 43 window_->Show(); |
44 } | 44 } |
45 | 45 |
46 virtual void TearDown() { | 46 virtual void TearDown() { |
47 window_->CloseWindow(); | 47 window_->Close(); |
48 message_loop_.RunAllPending(); | 48 message_loop_.RunAllPending(); |
49 } | 49 } |
50 | 50 |
51 virtual views::View* GetContentsView() { | 51 virtual views::View* GetContentsView() { |
52 return tabbed_pane_; | 52 return tabbed_pane_; |
53 } | 53 } |
54 | 54 |
55 MessageLoopForUI message_loop_; | 55 MessageLoopForUI message_loop_; |
56 Window* window_; | 56 Window* window_; |
57 | 57 |
(...skipping 21 matching lines...) Expand all Loading... |
79 EXPECT_LT(bounds.width(), 100); | 79 EXPECT_LT(bounds.width(), 100); |
80 EXPECT_GT(bounds.height(), 0); | 80 EXPECT_GT(bounds.height(), 0); |
81 EXPECT_LT(bounds.height(), 200); | 81 EXPECT_LT(bounds.height(), 200); |
82 | 82 |
83 // If we switch to the other tab, it should get assigned the same bounds. | 83 // If we switch to the other tab, it should get assigned the same bounds. |
84 tabbed_pane_->SelectTabAt(1); | 84 tabbed_pane_->SelectTabAt(1); |
85 EXPECT_EQ(bounds, child2->bounds()); | 85 EXPECT_EQ(bounds, child2->bounds()); |
86 } | 86 } |
87 | 87 |
88 } // namespace views | 88 } // namespace views |
OLD | NEW |