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

Side by Side Diff: content/public/test/browser_test_utils.h

Issue 1993093002: Test for navigating back to navigation that posts to a cross-site 307 redirect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed remaining CR feedback from creis@. Created 4 years, 6 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
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 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ 5 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_
6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ 6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 257
258 // Fetch the histograms data from other processes. This should be called after 258 // Fetch the histograms data from other processes. This should be called after
259 // the test code has been executed but before performing assertions. 259 // the test code has been executed but before performing assertions.
260 void FetchHistogramsFromChildProcesses(); 260 void FetchHistogramsFromChildProcesses();
261 261
262 // Registers a request handler which redirects to a different host, based 262 // Registers a request handler which redirects to a different host, based
263 // on the request path. The format of the path should be 263 // on the request path. The format of the path should be
264 // "/cross-site/hostname/rest/of/path" to redirect the request to 264 // "/cross-site/hostname/rest/of/path" to redirect the request to
265 // "<scheme>://hostname:<port>/rest/of/path", where <scheme> and <port> 265 // "<scheme>://hostname:<port>/rest/of/path", where <scheme> and <port>
266 // are the values for the instance of EmbeddedTestServer. 266 // are the values for the instance of EmbeddedTestServer.
267 //
268 // By default, redirection will be done using HTTP 302 response, but in some
269 // cases (e.g. to preserve HTTP method and POST body across redirects as
270 // prescribed by https://tools.ietf.org/html/rfc7231#section-6.4.7) a test might
271 // want to use HTTP 307 response instead. This can be accomplished by replacing
272 // "/cross-site/" URL substring above with "/cross-site-307/".
267 void SetupCrossSiteRedirector(net::EmbeddedTestServer* embedded_test_server); 273 void SetupCrossSiteRedirector(net::EmbeddedTestServer* embedded_test_server);
268 274
269 // Waits for an interstitial page to attach to given web contents. 275 // Waits for an interstitial page to attach to given web contents.
270 void WaitForInterstitialAttach(content::WebContents* web_contents); 276 void WaitForInterstitialAttach(content::WebContents* web_contents);
271 277
272 // Waits for an interstitial page to detach from given web contents. 278 // Waits for an interstitial page to detach from given web contents.
273 void WaitForInterstitialDetach(content::WebContents* web_contents); 279 void WaitForInterstitialDetach(content::WebContents* web_contents);
274 280
275 // Runs task and waits for an interstitial page to detach from given web 281 // Runs task and waits for an interstitial page to detach from given web
276 // contents. Prefer this over WaitForInterstitialDetach if web_contents may be 282 // contents. Prefer this over WaitForInterstitialDetach if web_contents may be
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 blink::WebInputEvent::Type wait_for_type_; 512 blink::WebInputEvent::Type wait_for_type_;
507 uint32_t ack_result_; 513 uint32_t ack_result_;
508 base::Closure quit_; 514 base::Closure quit_;
509 515
510 DISALLOW_COPY_AND_ASSIGN(InputMsgWatcher); 516 DISALLOW_COPY_AND_ASSIGN(InputMsgWatcher);
511 }; 517 };
512 518
513 } // namespace content 519 } // namespace content
514 520
515 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ 521 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « content/browser/session_history_browsertest.cc ('k') | content/public/test/browser_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698