OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
7 #include "base/scoped_ptr.h" | 7 #include "base/scoped_ptr.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "chrome/app/chrome_dll_resource.h" | 9 #include "chrome/app/chrome_dll_resource.h" |
10 #include "chrome/browser/defaults.h" | 10 #include "chrome/browser/defaults.h" |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 ASSERT_TRUE(GetActiveTabURL() == url2_); | 138 ASSERT_TRUE(GetActiveTabURL() == url2_); |
139 ASSERT_TRUE(tab_proxy->GoBack()); | 139 ASSERT_TRUE(tab_proxy->GoBack()); |
140 ASSERT_TRUE(GetActiveTabURL() == url1_); | 140 ASSERT_TRUE(GetActiveTabURL() == url1_); |
141 } | 141 } |
142 | 142 |
143 // Tests that the SiteInstances used for entries in a restored tab's history | 143 // Tests that the SiteInstances used for entries in a restored tab's history |
144 // are given appropriate max page IDs, so that going back to a restored | 144 // are given appropriate max page IDs, so that going back to a restored |
145 // cross-site page and then forward again works. (Bug 1204135) | 145 // cross-site page and then forward again works. (Bug 1204135) |
146 TEST_F(SessionRestoreUITest, RestoresCrossSiteForwardAndBackwardNavs) { | 146 TEST_F(SessionRestoreUITest, RestoresCrossSiteForwardAndBackwardNavs) { |
147 const wchar_t kDocRoot[] = L"chrome/test/data"; | 147 const wchar_t kDocRoot[] = L"chrome/test/data"; |
148 scoped_refptr<HTTPTestServer> server = | 148 scoped_refptr<HTTPTestServer> server(HTTPTestServer::CreateServer(kDocRoot)); |
149 HTTPTestServer::CreateServer(kDocRoot, NULL); | |
150 ASSERT_TRUE(NULL != server.get()); | 149 ASSERT_TRUE(NULL != server.get()); |
151 GURL cross_site_url(server->TestServerPage("files/title2.html")); | 150 GURL cross_site_url(server->TestServerPage("files/title2.html")); |
152 | 151 |
153 // Visit URLs on different sites. | 152 // Visit URLs on different sites. |
154 NavigateToURL(url1_); | 153 NavigateToURL(url1_); |
155 NavigateToURL(cross_site_url); | 154 NavigateToURL(cross_site_url); |
156 NavigateToURL(url2_); | 155 NavigateToURL(url2_); |
157 | 156 |
158 scoped_refptr<TabProxy> active_tab(GetActiveTab()); | 157 scoped_refptr<TabProxy> active_tab(GetActiveTab()); |
159 ASSERT_TRUE(active_tab.get()); | 158 ASSERT_TRUE(active_tab.get()); |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 ASSERT_TRUE(tab_proxy.get() != NULL); | 480 ASSERT_TRUE(tab_proxy.get() != NULL); |
482 ASSERT_TRUE(tab_proxy->WaitForTabToBeRestored(action_max_timeout_ms())); | 481 ASSERT_TRUE(tab_proxy->WaitForTabToBeRestored(action_max_timeout_ms())); |
483 tab_proxy = browser_proxy->GetTab(tab_count - 1); | 482 tab_proxy = browser_proxy->GetTab(tab_count - 1); |
484 ASSERT_TRUE(tab_proxy.get() != NULL); | 483 ASSERT_TRUE(tab_proxy.get() != NULL); |
485 ASSERT_TRUE(tab_proxy->WaitForTabToBeRestored(action_max_timeout_ms())); | 484 ASSERT_TRUE(tab_proxy->WaitForTabToBeRestored(action_max_timeout_ms())); |
486 | 485 |
487 ASSERT_EQ(expected_process_count, GetBrowserProcessCount()); | 486 ASSERT_EQ(expected_process_count, GetBrowserProcessCount()); |
488 } | 487 } |
489 | 488 |
490 } // namespace | 489 } // namespace |
OLD | NEW |