| 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/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "third_party/WebKit/public/platform/WebInputEvent.h" | 31 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
| 32 | 32 |
| 33 class ReferrerPolicyTest : public InProcessBrowserTest { | 33 class ReferrerPolicyTest : public InProcessBrowserTest { |
| 34 public: | 34 public: |
| 35 ReferrerPolicyTest() {} | 35 ReferrerPolicyTest() {} |
| 36 ~ReferrerPolicyTest() override {} | 36 ~ReferrerPolicyTest() override {} |
| 37 | 37 |
| 38 void SetUpOnMainThread() override { | 38 void SetUpOnMainThread() override { |
| 39 content::BrowserThread::PostTask( | 39 content::BrowserThread::PostTask( |
| 40 content::BrowserThread::IO, FROM_HERE, | 40 content::BrowserThread::IO, FROM_HERE, |
| 41 base::Bind(&chrome_browser_net::SetUrlRequestMocksEnabled, true)); | 41 base::BindOnce(&chrome_browser_net::SetUrlRequestMocksEnabled, true)); |
| 42 } | 42 } |
| 43 | 43 |
| 44 protected: | 44 protected: |
| 45 enum ExpectedReferrer { | 45 enum ExpectedReferrer { |
| 46 EXPECT_EMPTY_REFERRER, | 46 EXPECT_EMPTY_REFERRER, |
| 47 EXPECT_FULL_REFERRER, | 47 EXPECT_FULL_REFERRER, |
| 48 EXPECT_ORIGIN_AS_REFERRER | 48 EXPECT_ORIGIN_AS_REFERRER |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 // Returns the expected title for the tab with the given (full) referrer and | 51 // Returns the expected title for the tab with the given (full) referrer and |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 HttpLeftClickRedirectDefaultFlag) { | 614 HttpLeftClickRedirectDefaultFlag) { |
| 615 blink::WebReferrerPolicy expected_referrer_policy = | 615 blink::WebReferrerPolicy expected_referrer_policy = |
| 616 blink::kWebReferrerPolicyNoReferrerWhenDowngradeOriginWhenCrossOrigin; | 616 blink::kWebReferrerPolicyNoReferrerWhenDowngradeOriginWhenCrossOrigin; |
| 617 | 617 |
| 618 RunReferrerTest(blink::kWebReferrerPolicyDefault, START_ON_HTTP, REGULAR_LINK, | 618 RunReferrerTest(blink::kWebReferrerPolicyDefault, START_ON_HTTP, REGULAR_LINK, |
| 619 SERVER_REDIRECT_FROM_HTTP_TO_HTTPS, | 619 SERVER_REDIRECT_FROM_HTTP_TO_HTTPS, |
| 620 WindowOpenDisposition::CURRENT_TAB, | 620 WindowOpenDisposition::CURRENT_TAB, |
| 621 blink::WebMouseEvent::Button::kLeft, | 621 blink::WebMouseEvent::Button::kLeft, |
| 622 EXPECT_ORIGIN_AS_REFERRER, expected_referrer_policy); | 622 EXPECT_ORIGIN_AS_REFERRER, expected_referrer_policy); |
| 623 } | 623 } |
| OLD | NEW |