| OLD | NEW |
| 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 #include "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
| (...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 // Reduced 'referer' granularity flag tests. | 610 // Reduced 'referer' granularity flag tests. |
| 611 | 611 |
| 612 // User initiated navigation, from HTTP to HTTPS via server redirect. | 612 // User initiated navigation, from HTTP to HTTPS via server redirect. |
| 613 IN_PROC_BROWSER_TEST_F(ReferrerPolicyTest, HttpLeftClickRedirectDefaultNoFlag) { | 613 IN_PROC_BROWSER_TEST_F(ReferrerPolicyTest, HttpLeftClickRedirectDefaultNoFlag) { |
| 614 RunReferrerTest(blink::WebReferrerPolicyDefault, START_ON_HTTP, REGULAR_LINK, | 614 RunReferrerTest(blink::WebReferrerPolicyDefault, START_ON_HTTP, REGULAR_LINK, |
| 615 SERVER_REDIRECT_FROM_HTTP_TO_HTTPS, CURRENT_TAB, | 615 SERVER_REDIRECT_FROM_HTTP_TO_HTTPS, CURRENT_TAB, |
| 616 blink::WebMouseEvent::ButtonLeft, EXPECT_FULL_REFERRER); | 616 blink::WebMouseEvent::ButtonLeft, EXPECT_FULL_REFERRER); |
| 617 } | 617 } |
| 618 | 618 |
| 619 IN_PROC_BROWSER_TEST_F(ReferrerPolicyTest, HttpLeftClickRedirectDefaultFlag) { | 619 IN_PROC_BROWSER_TEST_F(ReferrerPolicyTest, HttpLeftClickRedirectDefaultFlag) { |
| 620 CommandLine::ForCurrentProcess()->AppendSwitch( | 620 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
| 621 switches::kReducedReferrerGranularity); | 621 switches::kReducedReferrerGranularity); |
| 622 RunReferrerTest(blink::WebReferrerPolicyDefault, START_ON_HTTP, REGULAR_LINK, | 622 RunReferrerTest(blink::WebReferrerPolicyDefault, START_ON_HTTP, REGULAR_LINK, |
| 623 SERVER_REDIRECT_FROM_HTTP_TO_HTTPS, CURRENT_TAB, | 623 SERVER_REDIRECT_FROM_HTTP_TO_HTTPS, CURRENT_TAB, |
| 624 blink::WebMouseEvent::ButtonLeft, EXPECT_ORIGIN_AS_REFERRER); | 624 blink::WebMouseEvent::ButtonLeft, EXPECT_ORIGIN_AS_REFERRER); |
| 625 } | 625 } |
| OLD | NEW |