| 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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 AddAllPossibleTitles(start_url, title_watcher.get()); | 481 AddAllPossibleTitles(start_url, title_watcher.get()); |
| 482 | 482 |
| 483 // Reload to B. | 483 // Reload to B. |
| 484 chrome::Reload(browser(), CURRENT_TAB); | 484 chrome::Reload(browser(), CURRENT_TAB); |
| 485 EXPECT_EQ(expected_title, title_watcher->WaitAndGetTitle()); | 485 EXPECT_EQ(expected_title, title_watcher->WaitAndGetTitle()); |
| 486 | 486 |
| 487 title_watcher.reset(new content::TitleWatcher(tab, expected_title)); | 487 title_watcher.reset(new content::TitleWatcher(tab, expected_title)); |
| 488 AddAllPossibleTitles(start_url, title_watcher.get()); | 488 AddAllPossibleTitles(start_url, title_watcher.get()); |
| 489 | 489 |
| 490 // Shift-reload to B. | 490 // Shift-reload to B. |
| 491 chrome::ReloadIgnoringCache(browser(), CURRENT_TAB); | 491 chrome::ReloadBypassingCache(browser(), CURRENT_TAB); |
| 492 EXPECT_EQ(expected_title, title_watcher->WaitAndGetTitle()); | 492 EXPECT_EQ(expected_title, title_watcher->WaitAndGetTitle()); |
| 493 } | 493 } |
| 494 | 494 |
| 495 // Tests that reloading a site for "request tablet version" correctly clears | 495 // Tests that reloading a site for "request tablet version" correctly clears |
| 496 // the referrer. | 496 // the referrer. |
| 497 IN_PROC_BROWSER_TEST_F(ReferrerPolicyTest, RequestTabletSite) { | 497 IN_PROC_BROWSER_TEST_F(ReferrerPolicyTest, RequestTabletSite) { |
| 498 GURL start_url = RunReferrerTest( | 498 GURL start_url = RunReferrerTest( |
| 499 blink::WebReferrerPolicyOrigin, START_ON_HTTPS, REGULAR_LINK, | 499 blink::WebReferrerPolicyOrigin, START_ON_HTTPS, REGULAR_LINK, |
| 500 SERVER_REDIRECT_FROM_HTTP_TO_HTTP, CURRENT_TAB, | 500 SERVER_REDIRECT_FROM_HTTP_TO_HTTP, CURRENT_TAB, |
| 501 blink::WebMouseEvent::ButtonLeft, EXPECT_ORIGIN_AS_REFERRER); | 501 blink::WebMouseEvent::ButtonLeft, EXPECT_ORIGIN_AS_REFERRER); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 blink::WebMouseEvent::ButtonLeft, EXPECT_FULL_REFERRER); | 600 blink::WebMouseEvent::ButtonLeft, EXPECT_FULL_REFERRER); |
| 601 } | 601 } |
| 602 | 602 |
| 603 IN_PROC_BROWSER_TEST_F(ReferrerPolicyTest, HttpLeftClickRedirectDefaultFlag) { | 603 IN_PROC_BROWSER_TEST_F(ReferrerPolicyTest, HttpLeftClickRedirectDefaultFlag) { |
| 604 base::CommandLine::ForCurrentProcess()->AppendSwitch( | 604 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
| 605 switches::kReducedReferrerGranularity); | 605 switches::kReducedReferrerGranularity); |
| 606 RunReferrerTest(blink::WebReferrerPolicyDefault, START_ON_HTTP, REGULAR_LINK, | 606 RunReferrerTest(blink::WebReferrerPolicyDefault, START_ON_HTTP, REGULAR_LINK, |
| 607 SERVER_REDIRECT_FROM_HTTP_TO_HTTPS, CURRENT_TAB, | 607 SERVER_REDIRECT_FROM_HTTP_TO_HTTPS, CURRENT_TAB, |
| 608 blink::WebMouseEvent::ButtonLeft, EXPECT_ORIGIN_AS_REFERRER); | 608 blink::WebMouseEvent::ButtonLeft, EXPECT_ORIGIN_AS_REFERRER); |
| 609 } | 609 } |
| OLD | NEW |