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 "chrome/browser/printing/background_printing_manager.h" | 5 #include "chrome/browser/printing/background_printing_manager.h" |
6 #include "chrome/browser/ui/browser_list.h" | 6 #include "chrome/browser/ui/browser_list.h" |
7 #if defined(TOUCH_UI) | 7 #if defined(TOUCH_UI) |
8 // TODO(alicet): clean up dependency on defaults when max tab count is removed. | 8 // TODO(alicet): clean up dependency on defaults when max tab count is removed. |
9 #include "chrome/browser/defaults.h" | 9 #include "chrome/browser/defaults.h" |
10 #endif | 10 #endif |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 EXPECT_EQ(browser3.get(), iterator.browser()); | 151 EXPECT_EQ(browser3.get(), iterator.browser()); |
152 else | 152 else |
153 EXPECT_TRUE(false); | 153 EXPECT_TRUE(false); |
154 } | 154 } |
155 | 155 |
156 // Close all remaining tabs to keep all the destructors happy. | 156 // Close all remaining tabs to keep all the destructors happy. |
157 browser2->CloseAllTabs(); | 157 browser2->CloseAllTabs(); |
158 browser3->CloseAllTabs(); | 158 browser3->CloseAllTabs(); |
159 } | 159 } |
160 | 160 |
161 #if 0 | |
162 // TODO(thestig) Fix or remove this test. http://crbug.com/100309 | |
163 TEST_F(BrowserListTest, TabContentsIteratorBackgroundPrinting) { | 161 TEST_F(BrowserListTest, TabContentsIteratorBackgroundPrinting) { |
164 // Make sure we have 1 window to start with. | 162 // Make sure we have 1 window to start with. |
165 EXPECT_EQ(1U, BrowserList::size()); | 163 EXPECT_EQ(1U, BrowserList::size()); |
166 | 164 |
167 // Create more browsers/windows. | 165 // Create more browsers/windows. |
168 scoped_ptr<Browser> browser2(new Browser(Browser::TYPE_TABBED, profile())); | 166 scoped_ptr<Browser> browser2(new Browser(Browser::TYPE_TABBED, profile())); |
169 scoped_ptr<Browser> browser3(new Browser(Browser::TYPE_TABBED, profile())); | 167 scoped_ptr<Browser> browser3(new Browser(Browser::TYPE_TABBED, profile())); |
170 | 168 |
171 scoped_ptr<TestBrowserWindow> window2(new TestBrowserWindow(browser2.get())); | 169 scoped_ptr<TestBrowserWindow> window2(new TestBrowserWindow(browser2.get())); |
172 scoped_ptr<TestBrowserWindow> window3(new TestBrowserWindow(browser3.get())); | 170 scoped_ptr<TestBrowserWindow> window3(new TestBrowserWindow(browser3.get())); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 EXPECT_EQ(6U, CountAllTabs()); | 231 EXPECT_EQ(6U, CountAllTabs()); |
234 | 232 |
235 // Delete all tabs to clean up. | 233 // Delete all tabs to clean up. |
236 for (std::vector<TabContentsWrapper*>::iterator it = owned_tabs.begin(); | 234 for (std::vector<TabContentsWrapper*>::iterator it = owned_tabs.begin(); |
237 it != owned_tabs.end(); ++it) { | 235 it != owned_tabs.end(); ++it) { |
238 delete *it; | 236 delete *it; |
239 } | 237 } |
240 | 238 |
241 EXPECT_EQ(0U, CountAllTabs()); | 239 EXPECT_EQ(0U, CountAllTabs()); |
242 } | 240 } |
243 #endif | |
OLD | NEW |