| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 content::WebContents* tab = browser()->tab_strip_model()->GetWebContentsAt(1); | 666 content::WebContents* tab = browser()->tab_strip_model()->GetWebContentsAt(1); |
| 667 EnsureTabFinishedRestoring(tab); | 667 EnsureTabFinishedRestoring(tab); |
| 668 | 668 |
| 669 // See if content is as expected. | 669 // See if content is as expected. |
| 670 EXPECT_GT( | 670 EXPECT_GT( |
| 671 ui_test_utils::FindInPage(tab, base::ASCIIToUTF16("webkit"), true, false, | 671 ui_test_utils::FindInPage(tab, base::ASCIIToUTF16("webkit"), true, false, |
| 672 NULL, NULL), | 672 NULL, NULL), |
| 673 0); | 673 0); |
| 674 } | 674 } |
| 675 | 675 |
| 676 // https://crbug.com/667932: Flakiness on linux_chromium_asan_rel_ng bot. |
| 677 #if defined(ADDRESS_SANITIZER) || defined(MEMORY_SANITIZER) |
| 678 #define MAYBE_RestoreTabWithSpecialURLOnBack DISABLED_RestoreTabWithSpecialURLOn
Back |
| 679 #else |
| 680 #define MAYBE_RestoreTabWithSpecialURLOnBack RestoreTabWithSpecialURLOnBack |
| 681 #endif |
| 682 |
| 676 // Restore tab with special URL in its navigation history, go back to that | 683 // Restore tab with special URL in its navigation history, go back to that |
| 677 // entry and see that it loads properly. See http://crbug.com/31905 | 684 // entry and see that it loads properly. See http://crbug.com/31905 |
| 678 IN_PROC_BROWSER_TEST_F(TabRestoreTest, RestoreTabWithSpecialURLOnBack) { | 685 IN_PROC_BROWSER_TEST_F(TabRestoreTest, MAYBE_RestoreTabWithSpecialURLOnBack) { |
| 679 ASSERT_TRUE(embedded_test_server()->Start()); | 686 ASSERT_TRUE(embedded_test_server()->Start()); |
| 680 | 687 |
| 681 const GURL http_url(embedded_test_server()->GetURL("/title1.html")); | 688 const GURL http_url(embedded_test_server()->GetURL("/title1.html")); |
| 682 | 689 |
| 683 // Navigate new tab to a special URL. | 690 // Navigate new tab to a special URL. |
| 684 ui_test_utils::NavigateToURLWithDisposition( | 691 ui_test_utils::NavigateToURLWithDisposition( |
| 685 browser(), GURL(chrome::kChromeUICreditsURL), | 692 browser(), GURL(chrome::kChromeUICreditsURL), |
| 686 WindowOpenDisposition::NEW_FOREGROUND_TAB, | 693 WindowOpenDisposition::NEW_FOREGROUND_TAB, |
| 687 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); | 694 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); |
| 688 | 695 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 observer.Wait(); | 752 observer.Wait(); |
| 746 | 753 |
| 747 SessionRestoreTestHelper helper; | 754 SessionRestoreTestHelper helper; |
| 748 // Restore browser (this is what Cmd-Shift-T does on Mac). | 755 // Restore browser (this is what Cmd-Shift-T does on Mac). |
| 749 chrome::OpenWindowWithRestoredTabs(profile); | 756 chrome::OpenWindowWithRestoredTabs(profile); |
| 750 if (SessionRestore::IsRestoring(profile)) | 757 if (SessionRestore::IsRestoring(profile)) |
| 751 helper.Wait(); | 758 helper.Wait(); |
| 752 Browser* browser = GetBrowser(0); | 759 Browser* browser = GetBrowser(0); |
| 753 EXPECT_EQ(4, browser->tab_strip_model()->count()); | 760 EXPECT_EQ(4, browser->tab_strip_model()->count()); |
| 754 } | 761 } |
| OLD | NEW |