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

Unified Diff: chrome/test/data/referrer_policy/referrer-policy-start.html

Issue 135973009: Don't try to guess the referrer policy, but use the one associated with the request (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/referrer_policy/referrer-policy-start.html
diff --git a/chrome/test/data/referrer_policy/referrer-policy-start.html b/chrome/test/data/referrer_policy/referrer-policy-start.html
index 5799b9c2f9e8eac6af0cef02e81bd2c67d9c6045..7cdc0502abc21c80ea05fa8f800858dee22cdcbe 100644
--- a/chrome/test/data/referrer_policy/referrer-policy-start.html
+++ b/chrome/test/data/referrer_policy/referrer-policy-start.html
@@ -9,8 +9,8 @@ function run() {
var kRedirect = 4;
var kLink = 5;
var kTarget = 6;
- var re = new RegExp(
- /policy=(.*)&port=(.*)&ssl_port=(.*)&redirect=(.*)&link=(.*)&target=(.*)/);
+ var re = new RegExp("policy=(.*)&port=(.*)&ssl_port=(.*)&redirect=(.*)&" +
+ "link=(.*)&target=(.*)");
var matches = re.exec(document.location.search);
if (matches == null) {
@@ -25,13 +25,17 @@ function run() {
var destination;
- if (matches[kRedirect] == "true") {
- destination =
- "https://127.0.0.1:" + matches[kSslPort] + "/server-redirect?" +
- "http://127.0.0.1:" + matches[kPort] + "/files/referrer-policy-log.html";
+ if (matches[kRedirect] == "false") {
+ destination = "http://127.0.0.1:" + matches[kPort] +
+ "/files/referrer-policy-log.html";
+ } else if (matches[kRedirect] == "http") {
+ destination = "http://127.0.0.1:" + matches[kPort] +
+ "/server-redirect?http://127.0.0.1:" + matches[kPort] +
+ "/files/referrer-policy-log.html";
} else {
- destination =
- "http://127.0.0.1:" + matches[kPort] + "/files/referrer-policy-log.html";
+ destination = "https://127.0.0.1:" + matches[kSslPort] +
+ "/server-redirect?http://127.0.0.1:" + matches[kPort] +
+ "/files/referrer-policy-log.html";
}
if (matches[kLink] == "true") {
« no previous file with comments | « chrome/test/data/referrer_policy/referrer-policy-iframe.html ('k') | content/child/npapi/plugin_url_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698