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

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

Issue 2635523002: Missing `contentFrame` after cross-origin navigation with PlzNavigate + site isolation. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigation_handle_impl_browsertest.cc
diff --git a/content/browser/frame_host/navigation_handle_impl_browsertest.cc b/content/browser/frame_host/navigation_handle_impl_browsertest.cc
index ba1c812e470e081ec81e0cf068c26b7b2637463b..303bcb3e5cfeeef4f0a3e7f2054104dac8592dbc 100644
--- a/content/browser/frame_host/navigation_handle_impl_browsertest.cc
+++ b/content/browser/frame_host/navigation_handle_impl_browsertest.cc
@@ -808,6 +808,48 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest,
EXPECT_FALSE(installer.navigation_throttle());
}
+IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest,
+ BugBaseline) {
+ const char kChildFrameId[] = "child0";
+ GURL main_url(embedded_test_server()->GetURL(
+ "a.com", "/frame_tree/page_with_one_frame.html"));
+ GURL allowed_subframe_url(embedded_test_server()->GetURL(
+ "a.com", "/title2.html"));
+
+ ASSERT_TRUE(NavigateToURL(shell(), main_url));
+ ASSERT_TRUE(NavigateIframeToURL(shell()->web_contents(), kChildFrameId,
+ allowed_subframe_url));
+ const char kScript[] =
+ "let f = document.getElementById(\"%s\");"
+ "window.domAutomationController.send(!!f.contentWindow);";
+ bool has_content_window = 0;
+ EXPECT_TRUE(ExecuteScriptAndExtractBool(
+ shell(), base::StringPrintf(kScript, kChildFrameId),
+ &has_content_window));
+ EXPECT_TRUE(has_content_window);
+}
+
+IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest,
+ BugRepro) {
+ const char kChildFrameId[] = "child0";
+ GURL main_url(embedded_test_server()->GetURL(
+ "a.com", "/frame_tree/page_with_one_frame.html"));
+ GURL allowed_subframe_url(embedded_test_server()->GetURL(
+ "a.com", "/cross-site/baz.com/title2.html"));
+
+ ASSERT_TRUE(NavigateToURL(shell(), main_url));
+ ASSERT_TRUE(NavigateIframeToURL(shell()->web_contents(), kChildFrameId,
+ allowed_subframe_url));
+ const char kScript[] =
+ "let f = document.getElementById(\"%s\");"
+ "window.domAutomationController.send(!!f.contentWindow);";
+ bool has_content_window = 0;
+ EXPECT_TRUE(ExecuteScriptAndExtractBool(
+ shell(), base::StringPrintf(kScript, kChildFrameId),
+ &has_content_window));
+ EXPECT_TRUE(has_content_window);
+}
+
// Checks that the RequestContextType value is properly set for an form (POST).
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest,
VerifyFormRequestContextType) {
« 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