| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "base/memory/weak_ptr.h" | 5 #include "base/memory/weak_ptr.h" |
| 6 #include "content/browser/frame_host/navigation_handle_impl.h" | 6 #include "content/browser/frame_host/navigation_handle_impl.h" |
| 7 #include "content/browser/web_contents/web_contents_impl.h" | 7 #include "content/browser/web_contents/web_contents_impl.h" |
| 8 #include "content/public/browser/web_contents.h" | 8 #include "content/public/browser/web_contents.h" |
| 9 #include "content/public/browser/web_contents_observer.h" | 9 #include "content/public/browser/web_contents_observer.h" |
| 10 #include "content/public/common/request_context_type.h" | 10 #include "content/public/common/request_context_type.h" |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 // Wait for the end of the navigation. | 718 // Wait for the end of the navigation. |
| 719 navigation_observer.Wait(); | 719 navigation_observer.Wait(); |
| 720 | 720 |
| 721 EXPECT_TRUE(observer.has_committed()); | 721 EXPECT_TRUE(observer.has_committed()); |
| 722 EXPECT_TRUE(observer.was_redirected()); | 722 EXPECT_TRUE(observer.was_redirected()); |
| 723 EXPECT_FALSE(observer.is_error()); | 723 EXPECT_FALSE(observer.is_error()); |
| 724 EXPECT_EQ(shell()->web_contents()->GetLastCommittedURL(), | 724 EXPECT_EQ(shell()->web_contents()->GetLastCommittedURL(), |
| 725 GURL(embedded_test_server()->GetURL("bar.com", "/title2.html"))); | 725 GURL(embedded_test_server()->GetURL("bar.com", "/title2.html"))); |
| 726 } | 726 } |
| 727 | 727 |
| 728 #if defined(OS_WIN) |
| 729 #define MAYBE_VerifyRequestContextTypeForFrameTree \ |
| 730 DISABLED_VerifyRequestContextTypeForFrameTree |
| 731 #else |
| 732 #define MAYBE_VerifyRequestContextTypeForFrameTree \ |
| 733 VerifyRequestContextTypeForFrameTree |
| 734 #endif |
| 735 |
| 728 // Checks that the RequestContextType value is properly set. | 736 // Checks that the RequestContextType value is properly set. |
| 729 IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, | 737 IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, |
| 730 VerifyRequestContextTypeForFrameTree) { | 738 MAYBE_VerifyRequestContextTypeForFrameTree) { |
| 731 GURL main_url(embedded_test_server()->GetURL( | 739 GURL main_url(embedded_test_server()->GetURL( |
| 732 "a.com", "/cross_site_iframe_factory.html?a(b(c))")); | 740 "a.com", "/cross_site_iframe_factory.html?a(b(c))")); |
| 733 GURL b_url(embedded_test_server()->GetURL( | 741 GURL b_url(embedded_test_server()->GetURL( |
| 734 "b.com", "/cross_site_iframe_factory.html?b(c())")); | 742 "b.com", "/cross_site_iframe_factory.html?b(c())")); |
| 735 GURL c_url(embedded_test_server()->GetURL( | 743 GURL c_url(embedded_test_server()->GetURL( |
| 736 "c.com", "/cross_site_iframe_factory.html?c()")); | 744 "c.com", "/cross_site_iframe_factory.html?c()")); |
| 737 | 745 |
| 738 TestNavigationThrottleInstaller installer( | 746 TestNavigationThrottleInstaller installer( |
| 739 shell()->web_contents(), NavigationThrottle::PROCEED, | 747 shell()->web_contents(), NavigationThrottle::PROCEED, |
| 740 NavigationThrottle::PROCEED, NavigationThrottle::PROCEED); | 748 NavigationThrottle::PROCEED, NavigationThrottle::PROCEED); |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1043 NavigationThrottle::PROCEED, NavigationThrottle::PROCEED); | 1051 NavigationThrottle::PROCEED, NavigationThrottle::PROCEED); |
| 1044 NavigationHandleObserver observer(shell()->web_contents(), url); | 1052 NavigationHandleObserver observer(shell()->web_contents(), url); |
| 1045 EXPECT_TRUE(NavigateToURL(shell(), url)); | 1053 EXPECT_TRUE(NavigateToURL(shell(), url)); |
| 1046 EXPECT_EQ(1, installer.will_start_called()); | 1054 EXPECT_EQ(1, installer.will_start_called()); |
| 1047 EXPECT_EQ(1, installer.will_process_called()); | 1055 EXPECT_EQ(1, installer.will_process_called()); |
| 1048 EXPECT_FALSE(observer.is_same_page()); | 1056 EXPECT_FALSE(observer.is_same_page()); |
| 1049 } | 1057 } |
| 1050 } | 1058 } |
| 1051 | 1059 |
| 1052 } // namespace content | 1060 } // namespace content |
| OLD | NEW |