| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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 #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 #if defined(OS_WIN) | 8 #if defined(OS_WIN) |
| 9 #include "base/win_util.h" | 9 #include "base/win_util.h" |
| 10 #endif | 10 #endif |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 | 193 |
| 194 // And make sure everything looks right. | 194 // And make sure everything looks right. |
| 195 ASSERT_TRUE(browser_proxy->GetTabCount(&tab_count)); | 195 ASSERT_TRUE(browser_proxy->GetTabCount(&tab_count)); |
| 196 EXPECT_EQ(starting_tab_count + 3, tab_count); | 196 EXPECT_EQ(starting_tab_count + 3, tab_count); |
| 197 EXPECT_EQ(closed_tab_index, GetActiveTabIndex()); | 197 EXPECT_EQ(closed_tab_index, GetActiveTabIndex()); |
| 198 EXPECT_EQ(url1_, GetActiveTabURL()); | 198 EXPECT_EQ(url1_, GetActiveTabURL()); |
| 199 } | 199 } |
| 200 | 200 |
| 201 // Close a tab, switch windows, then restore the tab. The tab should be in its | 201 // Close a tab, switch windows, then restore the tab. The tab should be in its |
| 202 // original window and position, and active. | 202 // original window and position, and active. |
| 203 // Disabled because flacky. See http://crbug.com/14132 | 203 // Disabled because flacky. See http://crbug.com/14132 and 11213. |
| 204 TEST_F(TabRestoreUITest, DISABLED_RestoreToDifferentWindow) { | 204 TEST_F(TabRestoreUITest, DISABLED_RestoreToDifferentWindow) { |
| 205 scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0)); | 205 scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0)); |
| 206 | 206 |
| 207 // This call is virtually guaranteed to pass, assuming that Chromium is the | 207 // This call is virtually guaranteed to pass, assuming that Chromium is the |
| 208 // active application, which will establish a baseline for later calls to | 208 // active application, which will establish a baseline for later calls to |
| 209 // CheckActiveWindow(). See comments in that function. | 209 // CheckActiveWindow(). See comments in that function. |
| 210 CheckActiveWindow(browser_proxy.get()); | 210 CheckActiveWindow(browser_proxy.get()); |
| 211 | 211 |
| 212 int starting_tab_count; | 212 int starting_tab_count; |
| 213 ASSERT_TRUE(browser_proxy->GetTabCount(&starting_tab_count)); | 213 ASSERT_TRUE(browser_proxy->GetTabCount(&starting_tab_count)); |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 GURL url; | 595 GURL url; |
| 596 ASSERT_TRUE(restored_tab_proxy->GetCurrentURL(&url)); | 596 ASSERT_TRUE(restored_tab_proxy->GetCurrentURL(&url)); |
| 597 EXPECT_TRUE(url == url1_); | 597 EXPECT_TRUE(url == url1_); |
| 598 | 598 |
| 599 restored_tab_proxy = browser_proxy->GetTab(initial_tab_count + 1); | 599 restored_tab_proxy = browser_proxy->GetTab(initial_tab_count + 1); |
| 600 ASSERT_TRUE(restored_tab_proxy.get()); | 600 ASSERT_TRUE(restored_tab_proxy.get()); |
| 601 ASSERT_TRUE(restored_tab_proxy->WaitForTabToBeRestored(action_timeout_ms())); | 601 ASSERT_TRUE(restored_tab_proxy->WaitForTabToBeRestored(action_timeout_ms())); |
| 602 ASSERT_TRUE(restored_tab_proxy->GetCurrentURL(&url)); | 602 ASSERT_TRUE(restored_tab_proxy->GetCurrentURL(&url)); |
| 603 EXPECT_TRUE(url == url2_); | 603 EXPECT_TRUE(url == url2_); |
| 604 } | 604 } |
| OLD | NEW |