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

Side by Side Diff: chrome/browser/history/redirect_browsertest.cc

Issue 14691006: Move SpawnedTestServer to its own subdirectory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sort gyp Created 7 years, 7 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
OLDNEW
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 // Navigates the browser to server and client redirect pages and makes sure 5 // Navigates the browser to server and client redirect pages and makes sure
6 // that the correct redirects are reflected in the history database. Errors 6 // that the correct redirects are reflected in the history database. Errors
7 // here might indicate that WebKit changed the calls our glue layer gets in 7 // here might indicate that WebKit changed the calls our glue layer gets in
8 // the case of redirects. It may also mean problems with the history system. 8 // the case of redirects. It may also mean problems with the history system.
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 11 matching lines...) Expand all
22 #include "chrome/browser/profiles/profile.h" 22 #include "chrome/browser/profiles/profile.h"
23 #include "chrome/browser/ui/browser.h" 23 #include "chrome/browser/ui/browser.h"
24 #include "chrome/browser/ui/tabs/tab_strip_model.h" 24 #include "chrome/browser/ui/tabs/tab_strip_model.h"
25 #include "chrome/browser/ui/view_ids.h" 25 #include "chrome/browser/ui/view_ids.h"
26 #include "chrome/test/base/in_process_browser_test.h" 26 #include "chrome/test/base/in_process_browser_test.h"
27 #include "chrome/test/base/ui_test_utils.h" 27 #include "chrome/test/base/ui_test_utils.h"
28 #include "content/public/browser/web_contents.h" 28 #include "content/public/browser/web_contents.h"
29 #include "content/public/test/browser_test_utils.h" 29 #include "content/public/test/browser_test_utils.h"
30 #include "content/public/test/test_navigation_observer.h" 30 #include "content/public/test/test_navigation_observer.h"
31 #include "net/base/net_util.h" 31 #include "net/base/net_util.h"
32 #include "net/test/spawned_test_server.h" 32 #include "net/test/spawned_test_server/spawned_test_server.h"
33 #include "ui/base/events/event_constants.h" 33 #include "ui/base/events/event_constants.h"
34 34
35 class RedirectTest : public InProcessBrowserTest { 35 class RedirectTest : public InProcessBrowserTest {
36 public: 36 public:
37 RedirectTest() {} 37 RedirectTest() {}
38 38
39 std::vector<GURL> GetRedirects(const GURL& url) { 39 std::vector<GURL> GetRedirects(const GURL& url) {
40 HistoryService* history_service = 40 HistoryService* history_service =
41 HistoryServiceFactory::GetForProfile(browser()->profile(), 41 HistoryServiceFactory::GetForProfile(browser()->profile(),
42 Profile::EXPLICIT_ACCESS); 42 Profile::EXPLICIT_ACCESS);
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 // as a client redirect from the first (/client-redirect?) page. 304 // as a client redirect from the first (/client-redirect?) page.
305 for (std::vector<GURL>::iterator it = redirects.begin(); 305 for (std::vector<GURL>::iterator it = redirects.begin();
306 it != redirects.end(); ++it) { 306 it != redirects.end(); ++it) {
307 if (final_url.spec() == it->spec()) { 307 if (final_url.spec() == it->spec()) {
308 final_navigation_not_redirect = false; 308 final_navigation_not_redirect = false;
309 break; 309 break;
310 } 310 }
311 } 311 }
312 EXPECT_TRUE(final_navigation_not_redirect); 312 EXPECT_TRUE(final_navigation_not_redirect);
313 } 313 }
OLDNEW
« no previous file with comments | « chrome/browser/history/multipart_browsertest.cc ('k') | chrome/browser/infobars/infobars_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698