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

Unified Diff: content/browser/frame_host/render_frame_host_manager_browsertest.cc

Issue 1911093002: Remove incorrect DCHECK in RequestOpenURL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/frame_host/navigator_impl.cc ('k') | content/test/data/ctrl-click-subframe-link.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_manager_browsertest.cc
diff --git a/content/browser/frame_host/render_frame_host_manager_browsertest.cc b/content/browser/frame_host/render_frame_host_manager_browsertest.cc
index 7bc7c1c24f6e19b11b922697851a2db16273ead1..e53c889bf098e0f82c45b670487a2d0f3474e5cb 100644
--- a/content/browser/frame_host/render_frame_host_manager_browsertest.cc
+++ b/content/browser/frame_host/render_frame_host_manager_browsertest.cc
@@ -2688,4 +2688,21 @@ IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest,
}
}
+// Test coverage for attempts to open subframe links in new windows, to prevent
+// incorrect invariant checks. See https://crbug.com/605055.
+IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, CtrlClickSubframeLink) {
+ StartEmbeddedServer();
+
+ // Load a page with a subframe link.
+ NavigateToURL(shell(), embedded_test_server()->GetURL(
+ "/ctrl-click-subframe-link.html"));
+
+ // Simulate a ctrl click on the link. This won't actually create a new Shell
+ // because Shell::OpenURLFromTab only supports CURRENT_TAB, but it's enough to
+ // trigger the crash from https://crbug.com/605055.
+ EXPECT_TRUE(
+ ExecuteScript(shell()->web_contents(),
+ "window.domAutomationController.send(ctrlClickLink());"));
+}
+
} // namespace content
« no previous file with comments | « content/browser/frame_host/navigator_impl.cc ('k') | content/test/data/ctrl-click-subframe-link.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698