Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Side by Side Diff: content/browser/frame_host/navigation_controller_impl_browsertest.cc

Issue 2316263004: Disable RaceCrossOriginNavigationAndSamePageHistoryNavigation due to flakiness. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 5909 matching lines...) Expand 10 before | Expand all | Expand 10 after
5920 }; 5920 };
5921 5921
5922 // Test which simulates a race condition between a cross-origin, same-process 5922 // Test which simulates a race condition between a cross-origin, same-process
5923 // navigation and a same page session history navigation. When such a race 5923 // navigation and a same page session history navigation. When such a race
5924 // occurs, the renderer will commit the cross-origin navigation, updating its 5924 // occurs, the renderer will commit the cross-origin navigation, updating its
5925 // version of the current document sequence number, and will send an IPC to the 5925 // version of the current document sequence number, and will send an IPC to the
5926 // browser process. The session history navigation comes after the commit for 5926 // browser process. The session history navigation comes after the commit for
5927 // the cross-origin navigation and updates the URL, but not the origin of the 5927 // the cross-origin navigation and updates the URL, but not the origin of the
5928 // document. This results in mismatch between the two and causes the renderer 5928 // document. This results in mismatch between the two and causes the renderer
5929 // process to be killed. See https://crbug.com/630103. 5929 // process to be killed. See https://crbug.com/630103.
5930 IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest, 5930 // TODO(nasko): Investigate why this test is flaky, likely related to
5931 RaceCrossOriginNavigationAndSamePageHistoryNavigation) { 5931 // https://crbug.com/638089, and enable once resolved.
5932 IN_PROC_BROWSER_TEST_F(
5933 NavigationControllerBrowserTest,
5934 DISABLED_RaceCrossOriginNavigationAndSamePageHistoryNavigation) {
5932 WebContentsImpl* web_contents = 5935 WebContentsImpl* web_contents =
5933 static_cast<WebContentsImpl*>(shell()->web_contents()); 5936 static_cast<WebContentsImpl*>(shell()->web_contents());
5934 5937
5935 // Navigate to a simple page and then perform an in-page navigation. 5938 // Navigate to a simple page and then perform an in-page navigation.
5936 GURL start_url(embedded_test_server()->GetURL("a.com", "/title1.html")); 5939 GURL start_url(embedded_test_server()->GetURL("a.com", "/title1.html"));
5937 EXPECT_TRUE(NavigateToURL(shell(), start_url)); 5940 EXPECT_TRUE(NavigateToURL(shell(), start_url));
5938 5941
5939 GURL same_page_url( 5942 GURL same_page_url(
5940 embedded_test_server()->GetURL("a.com", "/title1.html#foo")); 5943 embedded_test_server()->GetURL("a.com", "/title1.html#foo"));
5941 EXPECT_TRUE(NavigateToURL(shell(), same_page_url)); 5944 EXPECT_TRUE(NavigateToURL(shell(), same_page_url));
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
6002 &headers)); 6005 &headers));
6003 6006
6004 // Verify the Origin and Referer headers. 6007 // Verify the Origin and Referer headers.
6005 EXPECT_THAT(headers, ::testing::HasSubstr("Origin: null")); 6008 EXPECT_THAT(headers, ::testing::HasSubstr("Origin: null"));
6006 EXPECT_THAT(headers, 6009 EXPECT_THAT(headers,
6007 ::testing::ContainsRegex( 6010 ::testing::ContainsRegex(
6008 "Referer: http://a.com:.*/form_that_posts_cross_site.html")); 6011 "Referer: http://a.com:.*/form_that_posts_cross_site.html"));
6009 } 6012 }
6010 6013
6011 } // namespace content 6014 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698