| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <deque> | 6 #include <deque> |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <unordered_map> | 9 #include <unordered_map> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2002 | 2002 |
| 2003 // Checks that scripts can retrieve the correct window size while prerendering. | 2003 // Checks that scripts can retrieve the correct window size while prerendering. |
| 2004 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderWindowSize) { | 2004 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderWindowSize) { |
| 2005 PrerenderTestURL("/prerender/prerender_size.html", FINAL_STATUS_USED, 1); | 2005 PrerenderTestURL("/prerender/prerender_size.html", FINAL_STATUS_USED, 1); |
| 2006 NavigateToDestURL(); | 2006 NavigateToDestURL(); |
| 2007 } | 2007 } |
| 2008 | 2008 |
| 2009 // TODO(jam): http://crbug.com/350550 | 2009 // TODO(jam): http://crbug.com/350550 |
| 2010 #if !(defined(OS_CHROMEOS) && defined(ADDRESS_SANITIZER)) | 2010 #if !(defined(OS_CHROMEOS) && defined(ADDRESS_SANITIZER)) |
| 2011 | 2011 |
| 2012 // TODO(hans): Temporarily disable while enabling Clang by default on Windows | |
| 2013 // over the weekend. (crbug.com/727458) | |
| 2014 #if !(defined(OS_WIN) && defined(__clang__)) | |
| 2015 | |
| 2016 // Checks that prerenderers will terminate when the RenderView crashes. | 2012 // Checks that prerenderers will terminate when the RenderView crashes. |
| 2017 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderRendererCrash) { | 2013 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderRendererCrash) { |
| 2018 std::unique_ptr<TestPrerender> prerender = PrerenderTestURL( | 2014 std::unique_ptr<TestPrerender> prerender = PrerenderTestURL( |
| 2019 "/prerender/prerender_page.html", FINAL_STATUS_RENDERER_CRASHED, 1); | 2015 "/prerender/prerender_page.html", FINAL_STATUS_RENDERER_CRASHED, 1); |
| 2020 | 2016 |
| 2021 // Navigate to about:crash and then wait for the renderer to crash. | 2017 // Navigate to about:crash and then wait for the renderer to crash. |
| 2022 ASSERT_TRUE(prerender->contents()); | 2018 ASSERT_TRUE(prerender->contents()); |
| 2023 ASSERT_TRUE(prerender->contents()->prerender_contents()); | 2019 ASSERT_TRUE(prerender->contents()->prerender_contents()); |
| 2024 prerender->contents()->prerender_contents()->GetController(). | 2020 prerender->contents()->prerender_contents()->GetController(). |
| 2025 LoadURL( | 2021 LoadURL( |
| 2026 GURL(content::kChromeUICrashURL), | 2022 GURL(content::kChromeUICrashURL), |
| 2027 content::Referrer(), | 2023 content::Referrer(), |
| 2028 ui::PAGE_TRANSITION_TYPED, | 2024 ui::PAGE_TRANSITION_TYPED, |
| 2029 std::string()); | 2025 std::string()); |
| 2030 prerender->WaitForStop(); | 2026 prerender->WaitForStop(); |
| 2031 } | 2027 } |
| 2032 #endif | 2028 #endif |
| 2033 #endif | |
| 2034 | 2029 |
| 2035 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, | 2030 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, |
| 2036 PrerenderPageWithFragment) { | 2031 PrerenderPageWithFragment) { |
| 2037 PrerenderTestURL("/prerender/prerender_page.html#fragment", FINAL_STATUS_USED, | 2032 PrerenderTestURL("/prerender/prerender_page.html#fragment", FINAL_STATUS_USED, |
| 2038 1); | 2033 1); |
| 2039 | 2034 |
| 2040 ChannelDestructionWatcher channel_close_watcher; | 2035 ChannelDestructionWatcher channel_close_watcher; |
| 2041 channel_close_watcher.WatchChannel(browser()->tab_strip_model()-> | 2036 channel_close_watcher.WatchChannel(browser()->tab_strip_model()-> |
| 2042 GetActiveWebContents()->GetRenderProcessHost()); | 2037 GetActiveWebContents()->GetRenderProcessHost()); |
| 2043 NavigateToDestURL(); | 2038 NavigateToDestURL(); |
| (...skipping 1889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3933 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(web_contents, | 3928 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(web_contents, |
| 3934 "DidDisplayReallyPass()", | 3929 "DidDisplayReallyPass()", |
| 3935 &display_test_result)); | 3930 &display_test_result)); |
| 3936 ASSERT_TRUE(display_test_result); | 3931 ASSERT_TRUE(display_test_result); |
| 3937 } | 3932 } |
| 3938 #endif // !defined(DISABLE_NACL) | 3933 #endif // !defined(DISABLE_NACL) |
| 3939 | 3934 |
| 3940 } // namespace prerender | 3935 } // namespace prerender |
| 3941 | 3936 |
| 3942 #endif // !defined(OS_MACOSX) || !defined(ADDRESS_SANITIZER) | 3937 #endif // !defined(OS_MACOSX) || !defined(ADDRESS_SANITIZER) |
| OLD | NEW |