OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 | 6 |
7 #include "chrome/browser/cocoa/browser_test_helper.h" | 7 #include "chrome/browser/cocoa/browser_test_helper.h" |
8 #import "chrome/browser/cocoa/cocoa_test_helper.h" | 8 #import "chrome/browser/cocoa/cocoa_test_helper.h" |
9 #import "chrome/browser/cocoa/tab_strip_controller.h" | 9 #import "chrome/browser/cocoa/tab_strip_controller.h" |
10 #include "chrome/browser/tab_contents/tab_contents.h" | 10 #include "chrome/browser/tab_contents/tab_contents.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 } | 89 } |
90 | 90 |
91 CocoaTestHelper cocoa_helper_; | 91 CocoaTestHelper cocoa_helper_; |
92 BrowserTestHelper browser_helper_; | 92 BrowserTestHelper browser_helper_; |
93 scoped_ptr<TestTabStripDelegate> delegate_; | 93 scoped_ptr<TestTabStripDelegate> delegate_; |
94 scoped_ptr<TabStripModel> model_; | 94 scoped_ptr<TabStripModel> model_; |
95 scoped_nsobject<TabStripController> controller_; | 95 scoped_nsobject<TabStripController> controller_; |
96 scoped_nsobject<NSView> tab_strip_; | 96 scoped_nsobject<NSView> tab_strip_; |
97 }; | 97 }; |
98 | 98 |
99 TEST_F(TabStripControllerTest, GrowBox) { | |
100 // TODO(pinkerton): Creating a TabContents crashes an unrelated test, even | |
101 // if you don't do anything with it. http://crbug.com/10899 | |
102 } | |
103 | |
104 // Test adding and removing tabs and making sure that views get added to | 99 // Test adding and removing tabs and making sure that views get added to |
105 // the tab strip. | 100 // the tab strip. |
106 TEST_F(TabStripControllerTest, AddRemoveTabs) { | 101 TEST_F(TabStripControllerTest, AddRemoveTabs) { |
107 EXPECT_TRUE(model_->empty()); | 102 EXPECT_TRUE(model_->empty()); |
108 #if 0 | 103 #if 0 |
109 // TODO(pinkerton): Creating a TabContents crashes an unrelated test, even | 104 // TODO(pinkerton): Creating a TabContents crashes an unrelated test, even |
110 // if you don't do anything with it. http://crbug.com/10899 | 105 // if you don't do anything with it. http://crbug.com/10899 |
111 SiteInstance* instance = | 106 SiteInstance* instance = |
112 SiteInstance::CreateSiteInstance(browser_helper_.profile()); | 107 SiteInstance::CreateSiteInstance(browser_helper_.profile()); |
113 TabContents* tab_contents = | 108 TabContents* tab_contents = |
114 new TabContents(browser_helper_.profile(), instance); | 109 new TabContents(browser_helper_.profile(), instance); |
115 model_->AppendTabContents(tab_contents, true); | 110 model_->AppendTabContents(tab_contents, true); |
116 EXPECT_EQ(model_->count(), 1); | 111 EXPECT_EQ(model_->count(), 1); |
117 #endif | 112 #endif |
118 } | 113 } |
119 | 114 |
120 TEST_F(TabStripControllerTest, SelectTab) { | 115 TEST_F(TabStripControllerTest, SelectTab) { |
121 // TODO(pinkerton): Creating a TabContents crashes an unrelated test, even | 116 // TODO(pinkerton): Creating a TabContents crashes an unrelated test, even |
122 // if you don't do anything with it. http://crbug.com/10899 | 117 // if you don't do anything with it. http://crbug.com/10899 |
123 } | 118 } |
124 | 119 |
125 TEST_F(TabStripControllerTest, RearrangeTabs) { | 120 TEST_F(TabStripControllerTest, RearrangeTabs) { |
126 // TODO(pinkerton): Creating a TabContents crashes an unrelated test, even | 121 // TODO(pinkerton): Creating a TabContents crashes an unrelated test, even |
127 // if you don't do anything with it. http://crbug.com/10899 | 122 // if you don't do anything with it. http://crbug.com/10899 |
128 } | 123 } |
129 | 124 |
130 // Test that changing the number of tabs broadcasts a | 125 // Test that changing the number of tabs broadcasts a |
131 // kTabStripNumberOfTabsChanged notifiction. | 126 // kTabStripNumberOfTabsChanged notifiction. |
132 TEST_F(TabStripControllerTest, Notifications) { | 127 TEST_F(TabStripControllerTest, Notifications) { |
133 // TODO(pinkerton): Creating a TabContents crashes an unrelated test, even | 128 // TODO(pinkerton): Creating a TabContents crashes an unrelated test, even |
134 // if you don't do anything with it. http://crbug.com/10899 | 129 // if you don't do anything with it. http://crbug.com/10899 |
135 } | 130 } |
136 | 131 |
137 } // namespace | 132 } // namespace |
OLD | NEW |