OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/test/test_timeouts.h" | 8 #include "base/test/test_timeouts.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 | 205 |
206 // And make sure everything looks right. | 206 // And make sure everything looks right. |
207 EXPECT_EQ(starting_tab_count + 3, browser()->tab_count()); | 207 EXPECT_EQ(starting_tab_count + 3, browser()->tab_count()); |
208 EXPECT_EQ(closed_tab_index, browser()->active_index()); | 208 EXPECT_EQ(closed_tab_index, browser()->active_index()); |
209 EXPECT_EQ(url1_, chrome::GetActiveWebContents(browser())->GetURL()); | 209 EXPECT_EQ(url1_, chrome::GetActiveWebContents(browser())->GetURL()); |
210 } | 210 } |
211 | 211 |
212 // Close a tab, open a new window, close the first window, then restore the | 212 // Close a tab, open a new window, close the first window, then restore the |
213 // tab. It should be in a new window. | 213 // tab. It should be in a new window. |
214 // If this becomes flaky, use http://crbug.com/14774 | 214 // If this becomes flaky, use http://crbug.com/14774 |
215 IN_PROC_BROWSER_TEST_F(TabRestoreTest, FLAKY_BasicRestoreFromClosedWindow) { | 215 IN_PROC_BROWSER_TEST_F(TabRestoreTest, DISABLED_BasicRestoreFromClosedWindow) { |
216 // Navigate to url1 then url2. | 216 // Navigate to url1 then url2. |
217 ui_test_utils::NavigateToURL(browser(), url1_); | 217 ui_test_utils::NavigateToURL(browser(), url1_); |
218 ui_test_utils::NavigateToURL(browser(), url2_); | 218 ui_test_utils::NavigateToURL(browser(), url2_); |
219 | 219 |
220 // Create a new browser. | 220 // Create a new browser. |
221 ui_test_utils::NavigateToURLWithDisposition( | 221 ui_test_utils::NavigateToURLWithDisposition( |
222 browser(), GURL(chrome::kChromeUINewTabURL), NEW_WINDOW, | 222 browser(), GURL(chrome::kChromeUINewTabURL), NEW_WINDOW, |
223 ui_test_utils::BROWSER_TEST_WAIT_FOR_BROWSER); | 223 ui_test_utils::BROWSER_TEST_WAIT_FOR_BROWSER); |
224 EXPECT_EQ(2u, BrowserList::size()); | 224 EXPECT_EQ(2u, BrowserList::size()); |
225 | 225 |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 EnsureTabFinishedRestoring(tab); | 537 EnsureTabFinishedRestoring(tab); |
538 ASSERT_EQ(http_url, tab->GetURL()); | 538 ASSERT_EQ(http_url, tab->GetURL()); |
539 | 539 |
540 // Go back, and see if content is as expected. | 540 // Go back, and see if content is as expected. |
541 GoBack(browser()); | 541 GoBack(browser()); |
542 EXPECT_GT( | 542 EXPECT_GT( |
543 ui_test_utils::FindInPage(tab, ASCIIToUTF16("webkit"), true, false, NULL, | 543 ui_test_utils::FindInPage(tab, ASCIIToUTF16("webkit"), true, false, NULL, |
544 NULL), | 544 NULL), |
545 0); | 545 0); |
546 } | 546 } |
OLD | NEW |