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 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 2820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2831 ASSERT_TRUE(net::SpawnedTestServer::GetFilePathWithReplacements( | 2831 ASSERT_TRUE(net::SpawnedTestServer::GetFilePathWithReplacements( |
2832 "files/prerender/prerender_with_iframe.html", | 2832 "files/prerender/prerender_with_iframe.html", |
2833 replacement_text, | 2833 replacement_text, |
2834 &replacement_path)); | 2834 &replacement_path)); |
2835 PrerenderTestURL(replacement_path, FINAL_STATUS_USED, 1); | 2835 PrerenderTestURL(replacement_path, FINAL_STATUS_USED, 1); |
2836 NavigateToDestURL(); | 2836 NavigateToDestURL(); |
2837 } | 2837 } |
2838 | 2838 |
2839 // Checks that we cancel correctly when window.print() is called. | 2839 // Checks that we cancel correctly when window.print() is called. |
2840 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderPrint) { | 2840 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderPrint) { |
| 2841 DisableLoadEventCheck(); |
2841 PrerenderTestURL("files/prerender/prerender_print.html", | 2842 PrerenderTestURL("files/prerender/prerender_print.html", |
2842 FINAL_STATUS_WINDOW_PRINT, | 2843 FINAL_STATUS_WINDOW_PRINT, |
2843 0); | 2844 0); |
2844 } | 2845 } |
2845 | 2846 |
2846 // Checks that if a page is opened in a new window by javascript and both the | 2847 // Checks that if a page is opened in a new window by javascript and both the |
2847 // pages are in the same domain, the prerendered page is not used, due to | 2848 // pages are in the same domain, the prerendered page is not used, due to |
2848 // window.opener. | 2849 // window.opener. |
2849 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, | 2850 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, |
2850 PrerenderSameDomainWindowOpenerWindowOpen) { | 2851 PrerenderSameDomainWindowOpenerWindowOpen) { |
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4169 IN_PROC_BROWSER_TEST_F(PrerenderIncognitoBrowserTest, | 4170 IN_PROC_BROWSER_TEST_F(PrerenderIncognitoBrowserTest, |
4170 PrerenderIncognitoClosed) { | 4171 PrerenderIncognitoClosed) { |
4171 scoped_ptr<TestPrerender> prerender = | 4172 scoped_ptr<TestPrerender> prerender = |
4172 PrerenderTestURL("files/prerender/prerender_page.html", | 4173 PrerenderTestURL("files/prerender/prerender_page.html", |
4173 FINAL_STATUS_PROFILE_DESTROYED, 1); | 4174 FINAL_STATUS_PROFILE_DESTROYED, 1); |
4174 current_browser()->window()->Close(); | 4175 current_browser()->window()->Close(); |
4175 prerender->WaitForStop(); | 4176 prerender->WaitForStop(); |
4176 } | 4177 } |
4177 | 4178 |
4178 } // namespace prerender | 4179 } // namespace prerender |
OLD | NEW |