Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 } |
| OLD | NEW |