| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/process_util.h" | 8 #include "base/process_util.h" |
| 9 #include "chrome/browser/browser.h" | |
| 10 #include "chrome/browser/renderer_host/render_process_host.h" | 9 #include "chrome/browser/renderer_host/render_process_host.h" |
| 11 #include "chrome/browser/renderer_host/web_cache_manager.h" | 10 #include "chrome/browser/renderer_host/web_cache_manager.h" |
| 12 #include "chrome/browser/tab_contents/tab_contents.h" | 11 #include "chrome/browser/tab_contents/tab_contents.h" |
| 12 #include "chrome/browser/ui/browser.h" |
| 13 #include "chrome/test/in_process_browser_test.h" | 13 #include "chrome/test/in_process_browser_test.h" |
| 14 #include "chrome/test/ui_test_utils.h" | 14 #include "chrome/test/ui_test_utils.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 16 |
| 17 class WebCacheManagerBrowserTest : public InProcessBrowserTest { | 17 class WebCacheManagerBrowserTest : public InProcessBrowserTest { |
| 18 }; | 18 }; |
| 19 | 19 |
| 20 // Regression test for http://crbug.com/12362. If a renderer crashes and the | 20 // Regression test for http://crbug.com/12362. If a renderer crashes and the |
| 21 // user navigates to another tab and back, the browser doesn't crash. | 21 // user navigates to another tab and back, the browser doesn't crash. |
| 22 // Flaky, http://crbug.com/15288. | 22 // Flaky, http://crbug.com/15288. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 ui_test_utils::NavigateToURL(browser(), url); | 55 ui_test_utils::NavigateToURL(browser(), url); |
| 56 | 56 |
| 57 EXPECT_EQ( | 57 EXPECT_EQ( |
| 58 WebCacheManager::GetInstance()->active_renderers_.size(), 1U); | 58 WebCacheManager::GetInstance()->active_renderers_.size(), 1U); |
| 59 EXPECT_EQ( | 59 EXPECT_EQ( |
| 60 WebCacheManager::GetInstance()->inactive_renderers_.size(), 0U); | 60 WebCacheManager::GetInstance()->inactive_renderers_.size(), 0U); |
| 61 EXPECT_EQ( | 61 EXPECT_EQ( |
| 62 WebCacheManager::GetInstance()->stats_.size(), 1U); | 62 WebCacheManager::GetInstance()->stats_.size(), 1U); |
| 63 } | 63 } |
| OLD | NEW |