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

Side by Side 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: Keeping the old rvh alive for up to 1s Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "chrome/browser/renderer_host/web_cache_manager.h" 8 #include "chrome/browser/renderer_host/web_cache_manager.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_commands.h" 10 #include "chrome/browser/ui/browser_commands.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 browser()->tab_strip_model()->ActivateTabAt(0, true); 51 browser()->tab_strip_model()->ActivateTabAt(0, true);
52 chrome::CloseTab(browser()); 52 chrome::CloseTab(browser());
53 browser()->tab_strip_model()->ActivateTabAt(0, true); 53 browser()->tab_strip_model()->ActivateTabAt(0, true);
54 chrome::CloseTab(browser()); 54 chrome::CloseTab(browser());
55 browser()->tab_strip_model()->ActivateTabAt(0, true); 55 browser()->tab_strip_model()->ActivateTabAt(0, true);
56 chrome::CloseTab(browser()); 56 chrome::CloseTab(browser());
57 57
58 ui_test_utils::NavigateToURL(browser(), url); 58 ui_test_utils::NavigateToURL(browser(), url);
59 59
60 EXPECT_EQ( 60 // We may have two renderers if one is still executing the unload event in the
Charlie Reis 2013/12/09 20:12:29 Slight concern: Are we likely to have many flaky t
61 WebCacheManager::GetInstance()->active_renderers_.size(), 1U); 61 // background.
62 EXPECT_GT(
63 WebCacheManager::GetInstance()->active_renderers_.size(), 0U);
64 EXPECT_LT(
65 WebCacheManager::GetInstance()->active_renderers_.size(), 3U);
62 EXPECT_EQ( 66 EXPECT_EQ(
63 WebCacheManager::GetInstance()->inactive_renderers_.size(), 0U); 67 WebCacheManager::GetInstance()->inactive_renderers_.size(), 0U);
64 EXPECT_EQ( 68 EXPECT_GT(
65 WebCacheManager::GetInstance()->stats_.size(), 1U); 69 WebCacheManager::GetInstance()->stats_.size(), 0U);
70 EXPECT_LT(
71 WebCacheManager::GetInstance()->stats_.size(), 3U);
66 } 72 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698