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

Unified Diff: content/browser/site_per_process_browsertest.cc

Issue 140553003: Browser test that demonstrates failure to run subframe unload handlers. Base URL: svn://svn.chromium.org/chrome/trunk/src
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
Index: content/browser/site_per_process_browsertest.cc
diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc
index 80c4d169bf440321d0aa58edef178fe177dd45d4..45960c266237ab809fa741d256f7fede17f6eb78 100644
--- a/content/browser/site_per_process_browsertest.cc
+++ b/content/browser/site_per_process_browsertest.cc
@@ -3367,6 +3367,35 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, LoadEventForwarding) {
}
}
+IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, SetCookieInSubframeUnload) {
+ GURL url = embedded_test_server()->GetURL(
+ "a.com", "/onunload_cookie_wrapper_wrapper.html");
+ EXPECT_TRUE(NavigateToURL(shell(), url));
+
+ FrameTreeNode* root = web_contents()->GetFrameTree()->root();
+ EXPECT_EQ(
+ " Site A ------------ proxies for B\n"
+ " +--Site B ------- proxies for A\n"
+ " +--Site B -- proxies for A\n"
+ "Where A = http://a.com/\n"
+ " B = http://b.com/",
+ DepictFrameTree(root));
+
+ NavigateFrameToURL(root->child_at(0),
+ embedded_test_server()->GetURL("c.com", "/title1.html"));
+
+ EXPECT_EQ(
+ " Site A ------------ proxies for C\n"
+ " +--Site C ------- proxies for A\n"
+ "Where A = http://a.com/\n"
+ " C = http://c.com/",
+ DepictFrameTree(root));
+ EXPECT_EQ("",
+ content::GetCookies(shell()->web_contents()->GetBrowserContext(),
+ embedded_test_server()->GetURL(
+ "b.com", "/onunload_cookie.html")));
+}
+
// Check that postMessage can be routed between cross-site iframes.
IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, SubframePostMessage) {
GURL main_url(embedded_test_server()->GetURL(
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_browsertest.cc ('k') | content/test/data/onunload_cookie.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698