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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 }; | 566 }; |
567 | 567 |
568 // A ContentBrowserClient that forces cross-process navigations. | 568 // A ContentBrowserClient that forces cross-process navigations. |
569 class SwapProcessesContentBrowserClient : public ChromeContentBrowserClient { | 569 class SwapProcessesContentBrowserClient : public ChromeContentBrowserClient { |
570 public: | 570 public: |
571 SwapProcessesContentBrowserClient() {} | 571 SwapProcessesContentBrowserClient() {} |
572 ~SwapProcessesContentBrowserClient() override {} | 572 ~SwapProcessesContentBrowserClient() override {} |
573 | 573 |
574 // ChromeContentBrowserClient: | 574 // ChromeContentBrowserClient: |
575 bool ShouldSwapProcessesForRedirect( | 575 bool ShouldSwapProcessesForRedirect( |
576 content::ResourceContext* resource_context, | 576 content::BrowserContext* browser_context, |
577 const GURL& current_url, | 577 const GURL& current_url, |
578 const GURL& new_url) override { | 578 const GURL& new_url) override { |
579 return true; | 579 return true; |
580 } | 580 } |
581 | 581 |
582 private: | 582 private: |
583 DISALLOW_COPY_AND_ASSIGN(SwapProcessesContentBrowserClient); | 583 DISALLOW_COPY_AND_ASSIGN(SwapProcessesContentBrowserClient); |
584 }; | 584 }; |
585 | 585 |
586 base::FilePath GetTestPath(const std::string& file_name) { | 586 base::FilePath GetTestPath(const std::string& file_name) { |
(...skipping 2774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3361 browser()->tab_strip_model()->GetActiveWebContents(); | 3361 browser()->tab_strip_model()->GetActiveWebContents(); |
3362 bool display_test_result = false; | 3362 bool display_test_result = false; |
3363 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(web_contents, | 3363 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(web_contents, |
3364 "DidDisplayReallyPass()", | 3364 "DidDisplayReallyPass()", |
3365 &display_test_result)); | 3365 &display_test_result)); |
3366 ASSERT_TRUE(display_test_result); | 3366 ASSERT_TRUE(display_test_result); |
3367 } | 3367 } |
3368 #endif // !defined(DISABLE_NACL) | 3368 #endif // !defined(DISABLE_NACL) |
3369 | 3369 |
3370 } // namespace prerender | 3370 } // namespace prerender |
OLD | NEW |