Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Side by Side Diff: chrome/browser/sessions/session_restore_uitest.cc

Issue 16490: Add FTP unit test in preparation for portable FTP implementation.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/session_history_uitest.cc ('k') | chrome/browser/ssl_uitest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_util.h" 6 #include "base/file_util.h"
7 #include "base/scoped_ptr.h" 7 #include "base/scoped_ptr.h"
8 #include "chrome/app/chrome_dll_resource.h" 8 #include "chrome/app/chrome_dll_resource.h"
9 #include "chrome/common/chrome_paths.h" 9 #include "chrome/common/chrome_paths.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 TestServer server(kDocRoot); 148 scoped_refptr<HTTPTestServer> server =
149 GURL cross_site_url(server.TestServerPageW(L"files/title2.html")); 149 HTTPTestServer::CreateServer(kDocRoot);
150 ASSERT_TRUE(NULL != server.get());
151 GURL cross_site_url(server->TestServerPageW(L"files/title2.html"));
150 152
151 // Visit URLs on different sites. 153 // Visit URLs on different sites.
152 NavigateToURL(url1); 154 NavigateToURL(url1);
153 NavigateToURL(cross_site_url); 155 NavigateToURL(cross_site_url);
154 NavigateToURL(url2); 156 NavigateToURL(url2);
155 157
156 ASSERT_TRUE(GetActiveTab()->GoBack()); 158 ASSERT_TRUE(GetActiveTab()->GoBack());
157 159
158 QuitBrowserAndRestore(); 160 QuitBrowserAndRestore();
159 161
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 scoped_ptr<TabProxy> tab_proxy(browser_proxy->GetTab(restored_tab_count - 2)); 424 scoped_ptr<TabProxy> tab_proxy(browser_proxy->GetTab(restored_tab_count - 2));
423 ASSERT_TRUE(tab_proxy.get() != NULL); 425 ASSERT_TRUE(tab_proxy.get() != NULL);
424 ASSERT_TRUE(tab_proxy->WaitForTabToBeRestored(kWaitForActionMsec)); 426 ASSERT_TRUE(tab_proxy->WaitForTabToBeRestored(kWaitForActionMsec));
425 tab_proxy.reset(browser_proxy->GetTab(restored_tab_count - 1)); 427 tab_proxy.reset(browser_proxy->GetTab(restored_tab_count - 1));
426 ASSERT_TRUE(tab_proxy.get() != NULL); 428 ASSERT_TRUE(tab_proxy.get() != NULL);
427 ASSERT_TRUE(tab_proxy->WaitForTabToBeRestored(kWaitForActionMsec)); 429 ASSERT_TRUE(tab_proxy->WaitForTabToBeRestored(kWaitForActionMsec));
428 430
429 ASSERT_EQ(expected_process_count, GetBrowserProcessCount()); 431 ASSERT_EQ(expected_process_count, GetBrowserProcessCount());
430 } 432 }
431 433
OLDNEW
« no previous file with comments | « chrome/browser/session_history_uitest.cc ('k') | chrome/browser/ssl_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698