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

Unified Diff: chrome/browser/renderer_host/web_cache_manager_browsertest.cc

Issue 88503002: Have the unload event execute in background on cross-site navigations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Charlie's comments Created 6 years, 10 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/frame_host/frame_tree.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/web_cache_manager_browsertest.cc
diff --git a/chrome/browser/renderer_host/web_cache_manager_browsertest.cc b/chrome/browser/renderer_host/web_cache_manager_browsertest.cc
index a917ed5cba1dbbc8b3a6d9b1e8b265ca62be306c..7caee2f6ec2c893ec7e68d0636da5a64b5a9ee3d 100644
--- a/chrome/browser/renderer_host/web_cache_manager_browsertest.cc
+++ b/chrome/browser/renderer_host/web_cache_manager_browsertest.cc
@@ -57,10 +57,13 @@ IN_PROC_BROWSER_TEST_F(WebCacheManagerBrowserTest, CrashOnceOnly) {
ui_test_utils::NavigateToURL(browser(), url);
- EXPECT_EQ(
- WebCacheManager::GetInstance()->active_renderers_.size(), 1U);
+ // Depending on the speed of execution of the unload event, we may have one or
+ // two active renderers at that point (one executing the unload event in
+ // background).
+ EXPECT_GE(WebCacheManager::GetInstance()->active_renderers_.size(), 1U);
+ EXPECT_LE(WebCacheManager::GetInstance()->active_renderers_.size(), 2U);
EXPECT_EQ(
WebCacheManager::GetInstance()->inactive_renderers_.size(), 0U);
- EXPECT_EQ(
- WebCacheManager::GetInstance()->stats_.size(), 1U);
+ EXPECT_GE(WebCacheManager::GetInstance()->stats_.size(), 1U);
+ EXPECT_LE(WebCacheManager::GetInstance()->stats_.size(), 2U);
}
« no previous file with comments | « no previous file | content/browser/frame_host/frame_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698