| 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 1677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1688 // not pending. This relies on pending prerenders being resolved in the same | 1688 // not pending. This relies on pending prerenders being resolved in the same |
| 1689 // event loop iteration as OnPrerenderStop. | 1689 // event loop iteration as OnPrerenderStop. |
| 1690 EXPECT_TRUE(UrlIsInPrerenderManager(kHtmlFileB)); | 1690 EXPECT_TRUE(UrlIsInPrerenderManager(kHtmlFileB)); |
| 1691 EXPECT_EQ(1U, GetLinkPrerenderCount()); | 1691 EXPECT_EQ(1U, GetLinkPrerenderCount()); |
| 1692 EXPECT_EQ(1U, GetRunningLinkPrerenderCount()); | 1692 EXPECT_EQ(1U, GetRunningLinkPrerenderCount()); |
| 1693 } | 1693 } |
| 1694 | 1694 |
| 1695 // Checks that we don't prerender in an infinite loop and multiple links are | 1695 // Checks that we don't prerender in an infinite loop and multiple links are |
| 1696 // handled correctly. | 1696 // handled correctly. |
| 1697 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, | 1697 IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, |
| 1698 PrerenderInfiniteLoopMultiple) { | 1698 DISABLED_PrerenderInfiniteLoopMultiple) { |
| 1699 const char* const kHtmlFileA = | 1699 const char* const kHtmlFileA = |
| 1700 "/prerender/prerender_infinite_a_multiple.html"; | 1700 "/prerender/prerender_infinite_a_multiple.html"; |
| 1701 const char* const kHtmlFileB = | 1701 const char* const kHtmlFileB = |
| 1702 "/prerender/prerender_infinite_b_multiple.html"; | 1702 "/prerender/prerender_infinite_b_multiple.html"; |
| 1703 const char* const kHtmlFileC = | 1703 const char* const kHtmlFileC = |
| 1704 "/prerender/prerender_infinite_c_multiple.html"; | 1704 "/prerender/prerender_infinite_c_multiple.html"; |
| 1705 | 1705 |
| 1706 // This test is conceptually simplest if concurrency is at two, since we | 1706 // This test is conceptually simplest if concurrency is at two, since we |
| 1707 // don't have to worry about which of kHtmlFileB or kHtmlFileC gets evicted. | 1707 // don't have to worry about which of kHtmlFileB or kHtmlFileC gets evicted. |
| 1708 GetPrerenderManager()->mutable_config().max_link_concurrency = 2; | 1708 GetPrerenderManager()->mutable_config().max_link_concurrency = 2; |
| (...skipping 1613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3322 browser()->tab_strip_model()->GetActiveWebContents(); | 3322 browser()->tab_strip_model()->GetActiveWebContents(); |
| 3323 bool display_test_result = false; | 3323 bool display_test_result = false; |
| 3324 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(web_contents, | 3324 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(web_contents, |
| 3325 "DidDisplayReallyPass()", | 3325 "DidDisplayReallyPass()", |
| 3326 &display_test_result)); | 3326 &display_test_result)); |
| 3327 ASSERT_TRUE(display_test_result); | 3327 ASSERT_TRUE(display_test_result); |
| 3328 } | 3328 } |
| 3329 #endif // !defined(DISABLE_NACL) | 3329 #endif // !defined(DISABLE_NACL) |
| 3330 | 3330 |
| 3331 } // namespace prerender | 3331 } // namespace prerender |
| OLD | NEW |