| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/memory/memory_pressure_listener.h" | 10 #include "base/memory/memory_pressure_listener.h" |
| (...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 ASSERT_EQ(url1_, | 958 ASSERT_EQ(url1_, |
| 959 new_browser->tab_strip_model()->GetActiveWebContents()->GetURL()); | 959 new_browser->tab_strip_model()->GetActiveWebContents()->GetURL()); |
| 960 } | 960 } |
| 961 | 961 |
| 962 // Tests that the SiteInstances used for entries in a restored tab's history | 962 // Tests that the SiteInstances used for entries in a restored tab's history |
| 963 // are given appropriate max page IDs, so that going back to a restored | 963 // are given appropriate max page IDs, so that going back to a restored |
| 964 // cross-site page and then forward again works. (Bug 1204135) | 964 // cross-site page and then forward again works. (Bug 1204135) |
| 965 // This test fails. See http://crbug.com/237497. | 965 // This test fails. See http://crbug.com/237497. |
| 966 IN_PROC_BROWSER_TEST_F(SessionRestoreTest, | 966 IN_PROC_BROWSER_TEST_F(SessionRestoreTest, |
| 967 DISABLED_RestoresCrossSiteForwardAndBackwardNavs) { | 967 DISABLED_RestoresCrossSiteForwardAndBackwardNavs) { |
| 968 ASSERT_TRUE(test_server()->Start()); | 968 ASSERT_TRUE(embedded_test_server()->Start()); |
| 969 | 969 |
| 970 GURL cross_site_url(test_server()->GetURL("files/title2.html")); | 970 GURL cross_site_url(embedded_test_server()->GetURL("/title2.html")); |
| 971 | 971 |
| 972 // Visit URLs on different sites. | 972 // Visit URLs on different sites. |
| 973 ui_test_utils::NavigateToURL(browser(), url1_); | 973 ui_test_utils::NavigateToURL(browser(), url1_); |
| 974 ui_test_utils::NavigateToURL(browser(), cross_site_url); | 974 ui_test_utils::NavigateToURL(browser(), cross_site_url); |
| 975 ui_test_utils::NavigateToURL(browser(), url2_); | 975 ui_test_utils::NavigateToURL(browser(), url2_); |
| 976 | 976 |
| 977 GoBack(browser()); | 977 GoBack(browser()); |
| 978 Browser* new_browser = QuitBrowserAndRestore(browser(), 1); | 978 Browser* new_browser = QuitBrowserAndRestore(browser(), 1); |
| 979 ASSERT_EQ(1u, active_browser_list_->size()); | 979 ASSERT_EQ(1u, active_browser_list_->size()); |
| 980 ASSERT_EQ(1, new_browser->tab_strip_model()->count()); | 980 ASSERT_EQ(1, new_browser->tab_strip_model()->count()); |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1525 // automatically at the start of the test. | 1525 // automatically at the start of the test. |
| 1526 for (size_t i = 1; i < web_contents().size(); i++) { | 1526 for (size_t i = 1; i < web_contents().size(); i++) { |
| 1527 GURL expected_url = GURL(kUrls[activation_order[kExpectedNumTabs - i]]); | 1527 GURL expected_url = GURL(kUrls[activation_order[kExpectedNumTabs - i]]); |
| 1528 ASSERT_EQ(expected_url, web_contents()[i]->GetLastCommittedURL()); | 1528 ASSERT_EQ(expected_url, web_contents()[i]->GetLastCommittedURL()); |
| 1529 if (i > 0) { | 1529 if (i > 0) { |
| 1530 ASSERT_GT(web_contents()[i - 1]->GetLastActiveTime(), | 1530 ASSERT_GT(web_contents()[i - 1]->GetLastActiveTime(), |
| 1531 web_contents()[i]->GetLastActiveTime()); | 1531 web_contents()[i]->GetLastActiveTime()); |
| 1532 } | 1532 } |
| 1533 } | 1533 } |
| 1534 } | 1534 } |
| OLD | NEW |