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

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: Rebase + addressed some of Nasko's comments Created 6 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
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);
}

Powered by Google App Engine
This is Rietveld 408576698