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

Unified Diff: content/browser/loader/resource_dispatcher_host_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
« no previous file with comments | « no previous file | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/resource_dispatcher_host_browsertest.cc
diff --git a/content/browser/loader/resource_dispatcher_host_browsertest.cc b/content/browser/loader/resource_dispatcher_host_browsertest.cc
index 3a3a13d5550a94384a5e8d3d346ed4bb960aa980..74eb0099a59e3553e10f9a34539fd12a8a352f4f 100644
--- a/content/browser/loader/resource_dispatcher_host_browsertest.cc
+++ b/content/browser/loader/resource_dispatcher_host_browsertest.cc
@@ -259,6 +259,26 @@ IN_PROC_BROWSER_TEST_F(ResourceDispatcherHostBrowserTest,
EXPECT_EQ("onunloadCookie=foo", GetCookies(url));
}
+IN_PROC_BROWSER_TEST_F(ResourceDispatcherHostBrowserTest,
+ CrossSiteOnunloadCookieInFrame) {
+ ASSERT_TRUE(embedded_test_server()->Start());
+
+ CheckTitleTest(
+ embedded_test_server()->GetURL("/onunload_cookie_wrapper.html"),
+ "set cookie on unload");
+
+ // Navigate to a new cross-site page, to dispatch unload event and set the
+ // cookie.
+ CheckTitleTest(
+ net::URLRequestMockHTTPJob::GetMockUrl("content-sniffer-test0.html"),
+ "Content Sniffer Test 0");
+
+ // Currently, subframe unloads happen after the IPC filter for swapped out
+ // renderers is installed, so we won't see the cookie set...
+ EXPECT_EQ(
+ "", GetCookies(embedded_test_server()->GetURL("/onunload_cookie.html")));
+}
+
// If this flakes, use http://crbug.com/130404
// Tests that onunload is run for cross-site requests to URLs that complete
// without network loads (e.g., about:blank, data URLs).
« no previous file with comments | « no previous file | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698