OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/browser/frame_host/navigation_controller_impl.h" | 5 #include "content/browser/frame_host/navigation_controller_impl.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 2241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2252 " +--Site B ------- proxies for A\n" | 2252 " +--Site B ------- proxies for A\n" |
2253 " +--Site A -- proxies for B\n" | 2253 " +--Site A -- proxies for B\n" |
2254 "Where A = http://127.0.0.1/\n" | 2254 "Where A = http://127.0.0.1/\n" |
2255 " B = http://foo.com/", | 2255 " B = http://foo.com/", |
2256 visualizer.DepictFrameTree(root)); | 2256 visualizer.DepictFrameTree(root)); |
2257 } | 2257 } |
2258 } | 2258 } |
2259 | 2259 |
2260 // Verify the tree of FrameNavigationEntries after NAVIGATION_TYPE_NEW_SUBFRAME | 2260 // Verify the tree of FrameNavigationEntries after NAVIGATION_TYPE_NEW_SUBFRAME |
2261 // commits. | 2261 // commits. |
| 2262 // Disabled due to flakes on Linux Tests; see https://crbug.com/646836. |
| 2263 #if defined(OS_LINUX) |
| 2264 #define MAYBE_FrameNavigationEntry_NewSubframe \ |
| 2265 DISABLED_FrameNavigationEntry_NewSubframe |
| 2266 #else |
| 2267 #define MAYBE_FrameNavigationEntry_NewSubframe FrameNavigationEntry_NewSubframe |
| 2268 #endif |
2262 IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest, | 2269 IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest, |
2263 FrameNavigationEntry_NewSubframe) { | 2270 MAYBE_FrameNavigationEntry_NewSubframe) { |
2264 GURL main_url(embedded_test_server()->GetURL( | 2271 GURL main_url(embedded_test_server()->GetURL( |
2265 "/navigation_controller/simple_page_1.html")); | 2272 "/navigation_controller/simple_page_1.html")); |
2266 NavigateToURL(shell(), main_url); | 2273 NavigateToURL(shell(), main_url); |
2267 const NavigationControllerImpl& controller = | 2274 const NavigationControllerImpl& controller = |
2268 static_cast<const NavigationControllerImpl&>( | 2275 static_cast<const NavigationControllerImpl&>( |
2269 shell()->web_contents()->GetController()); | 2276 shell()->web_contents()->GetController()); |
2270 FrameTreeNode* root = | 2277 FrameTreeNode* root = |
2271 static_cast<WebContentsImpl*>(shell()->web_contents())-> | 2278 static_cast<WebContentsImpl*>(shell()->web_contents())-> |
2272 GetFrameTree()->root(); | 2279 GetFrameTree()->root(); |
2273 | 2280 |
(...skipping 3729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6003 &headers)); | 6010 &headers)); |
6004 | 6011 |
6005 // Verify the Origin and Referer headers. | 6012 // Verify the Origin and Referer headers. |
6006 EXPECT_THAT(headers, ::testing::HasSubstr("Origin: null")); | 6013 EXPECT_THAT(headers, ::testing::HasSubstr("Origin: null")); |
6007 EXPECT_THAT(headers, | 6014 EXPECT_THAT(headers, |
6008 ::testing::ContainsRegex( | 6015 ::testing::ContainsRegex( |
6009 "Referer: http://a.com:.*/form_that_posts_cross_site.html")); | 6016 "Referer: http://a.com:.*/form_that_posts_cross_site.html")); |
6010 } | 6017 } |
6011 | 6018 |
6012 } // namespace content | 6019 } // namespace content |
OLD | NEW |