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/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "chrome/app/chrome_dll_resource.h" | 8 #include "chrome/app/chrome_dll_resource.h" |
9 #include "chrome/common/chrome_paths.h" | 9 #include "chrome/common/chrome_paths.h" |
10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 | 201 |
202 // And make sure everything looks right. | 202 // And make sure everything looks right. |
203 ASSERT_TRUE(browser_proxy->GetTabCount(&tab_count)); | 203 ASSERT_TRUE(browser_proxy->GetTabCount(&tab_count)); |
204 EXPECT_EQ(starting_tab_count + 3, tab_count); | 204 EXPECT_EQ(starting_tab_count + 3, tab_count); |
205 EXPECT_EQ(closed_tab_index, GetActiveTabIndex()); | 205 EXPECT_EQ(closed_tab_index, GetActiveTabIndex()); |
206 EXPECT_EQ(url1_, GetActiveTabURL()); | 206 EXPECT_EQ(url1_, GetActiveTabURL()); |
207 } | 207 } |
208 | 208 |
209 // Close a tab, switch windows, then restore the tab. The tab should be in its | 209 // Close a tab, switch windows, then restore the tab. The tab should be in its |
210 // original window and position, and active. | 210 // original window and position, and active. |
211 // This test is flaky. See http://crbug.com/14132 and 11213. | 211 // This test is flaky. See http://crbug.com/54894 |
212 TEST_F(TabRestoreUITest, FLAKY_RestoreToDifferentWindow) { | 212 TEST_F(TabRestoreUITest, FLAKY_RestoreToDifferentWindow) { |
213 scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0)); | 213 scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0)); |
214 ASSERT_TRUE(browser_proxy.get()); | 214 ASSERT_TRUE(browser_proxy.get()); |
215 | 215 |
216 // This call is virtually guaranteed to pass, assuming that Chromium is the | 216 // This call is virtually guaranteed to pass, assuming that Chromium is the |
217 // active application, which will establish a baseline for later calls to | 217 // active application, which will establish a baseline for later calls to |
218 // CheckActiveWindow(). See comments in that function. | 218 // CheckActiveWindow(). See comments in that function. |
219 CheckActiveWindow(browser_proxy.get()); | 219 CheckActiveWindow(browser_proxy.get()); |
220 | 220 |
221 int starting_tab_count; | 221 int starting_tab_count; |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 ASSERT_TRUE(tab->WaitForTabToBeRestored(action_timeout_ms())); | 671 ASSERT_TRUE(tab->WaitForTabToBeRestored(action_timeout_ms())); |
672 GURL url; | 672 GURL url; |
673 ASSERT_TRUE(tab->GetCurrentURL(&url)); | 673 ASSERT_TRUE(tab->GetCurrentURL(&url)); |
674 ASSERT_EQ(http_url, url); | 674 ASSERT_EQ(http_url, url); |
675 | 675 |
676 // Go back, and see if content is as expected. | 676 // Go back, and see if content is as expected. |
677 ASSERT_TRUE(tab->GoBack()); | 677 ASSERT_TRUE(tab->GoBack()); |
678 EXPECT_TRUE(tab->FindInPage(std::wstring(L"webkit"), FWD, IGNORE_CASE, false, | 678 EXPECT_TRUE(tab->FindInPage(std::wstring(L"webkit"), FWD, IGNORE_CASE, false, |
679 NULL)); | 679 NULL)); |
680 } | 680 } |
OLD | NEW |