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 <deque> | 5 #include <deque> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
(...skipping 2137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2148 // asynchronously. | 2148 // asynchronously. |
2149 WebContents* web_contents = browser()->GetSelectedWebContents(); | 2149 WebContents* web_contents = browser()->GetSelectedWebContents(); |
2150 bool display_test_result = false; | 2150 bool display_test_result = false; |
2151 ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool( | 2151 ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool( |
2152 web_contents->GetRenderViewHost(), L"", | 2152 web_contents->GetRenderViewHost(), L"", |
2153 L"DidDisplayReallyPass()", | 2153 L"DidDisplayReallyPass()", |
2154 &display_test_result)); | 2154 &display_test_result)); |
2155 ASSERT_TRUE(display_test_result); | 2155 ASSERT_TRUE(display_test_result); |
2156 } | 2156 } |
2157 | 2157 |
| 2158 // Checks that the referrer policy is used when prerendering. |
| 2159 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderReferrerPolicy) { |
| 2160 set_loader_path("files/prerender/prerender_loader_with_referrer_policy.html"); |
| 2161 PrerenderTestURL("files/prerender/prerender_referrer_policy.html", |
| 2162 FINAL_STATUS_USED, |
| 2163 1); |
| 2164 NavigateToDestURL(); |
| 2165 } |
| 2166 |
| 2167 // Checks that the referrer policy is used when prerendering on HTTPS. |
| 2168 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderSSLReferrerPolicy) { |
| 2169 set_use_https_src(true); |
| 2170 set_loader_path("files/prerender/prerender_loader_with_referrer_policy.html"); |
| 2171 PrerenderTestURL("files/prerender/prerender_referrer_policy.html", |
| 2172 FINAL_STATUS_USED, |
| 2173 1); |
| 2174 NavigateToDestURL(); |
| 2175 } |
| 2176 |
2158 } // namespace prerender | 2177 } // namespace prerender |
OLD | NEW |