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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc

Issue 2819493002: [Test] Move DelegatedFrameEvictor into components -public_deps (Closed)
Patch Set: use if null instead of feature Created 3 years, 8 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: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
index 0eb0b684147ca3964babcf4e3d90527c4a560ad1..dc4d863e4890abc04a1a33d6a83d975a07d53b9f 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
@@ -110,6 +110,7 @@ using blink::WebMouseWheelEvent;
using blink::WebTouchEvent;
using blink::WebTouchPoint;
using ui::WebInputEventTraits;
+using viz::FrameEvictionManager;
namespace content {
@@ -654,14 +655,14 @@ class RenderWidgetHostViewAuraTest : public testing::Test {
void SimulateMemoryPressure(
base::MemoryPressureListener::MemoryPressureLevel level) {
// Here should be base::MemoryPressureListener::NotifyMemoryPressure, but
- // since the RendererFrameManager is installing a MemoryPressureListener
+ // since the FrameEvictionManager is installing a MemoryPressureListener
// which uses base::ObserverListThreadSafe, which furthermore remembers the
// message loop for the thread it was created in. Between tests, the
- // RendererFrameManager singleton survives and and the MessageLoop gets
+ // FrameEvictionManager singleton survives and and the MessageLoop gets
// destroyed. The correct fix would be to have base::ObserverListThreadSafe
// look
// up the proper message loop every time (see crbug.com/443824.)
- RendererFrameManager::GetInstance()->OnMemoryPressure(level);
+ FrameEvictionManager::GetInstance()->OnMemoryPressure(level);
}
void SendInputEventACK(WebInputEvent::Type type,
@@ -2659,7 +2660,7 @@ TEST_F(RenderWidgetHostViewAuraTest, DiscardDelegatedFrames) {
view_->InitAsChild(nullptr);
size_t max_renderer_frames =
- RendererFrameManager::GetInstance()->GetMaxNumberOfSavedFrames();
+ FrameEvictionManager::GetInstance()->GetMaxNumberOfSavedFrames();
ASSERT_LE(2u, max_renderer_frames);
size_t renderer_count = max_renderer_frames + 1;
gfx::Rect view_rect(100, 100);
@@ -2802,7 +2803,7 @@ TEST_F(RenderWidgetHostViewAuraTest, DiscardDelegatedFrames) {
// Allocate enough bitmaps so that two frames (proportionally) would be
// enough hit the handle limit.
int handles_per_frame = 5;
- RendererFrameManager::GetInstance()->set_max_handles(handles_per_frame * 2);
+ FrameEvictionManager::GetInstance()->set_max_handles(handles_per_frame * 2);
display_compositor::HostSharedBitmapManagerClient bitmap_client(
display_compositor::HostSharedBitmapManager::current());
@@ -2820,7 +2821,7 @@ TEST_F(RenderWidgetHostViewAuraTest, DiscardDelegatedFrames) {
else
EXPECT_TRUE(views[i]->HasFrameData());
}
- RendererFrameManager::GetInstance()->set_max_handles(
+ FrameEvictionManager::GetInstance()->set_max_handles(
base::SharedMemory::GetHandleLimit());
for (size_t i = 0; i < renderer_count; ++i) {
@@ -2833,7 +2834,7 @@ TEST_F(RenderWidgetHostViewAuraTest, DiscardDelegatedFramesWithLocking) {
view_->InitAsChild(nullptr);
size_t max_renderer_frames =
- RendererFrameManager::GetInstance()->GetMaxNumberOfSavedFrames();
+ FrameEvictionManager::GetInstance()->GetMaxNumberOfSavedFrames();
ASSERT_LE(2u, max_renderer_frames);
size_t renderer_count = max_renderer_frames + 1;
gfx::Rect view_rect(100, 100);
@@ -2905,7 +2906,7 @@ TEST_F(RenderWidgetHostViewAuraTest, DiscardDelegatedFramesWithMemoryPressure) {
// this value is calculated from total physical memory and causes the test to
// fail when run on hardware with < 256MB of RAM.
const size_t kMaxRendererFrames = 5;
- RendererFrameManager::GetInstance()->set_max_number_of_saved_frames(
+ FrameEvictionManager::GetInstance()->set_max_number_of_saved_frames(
kMaxRendererFrames);
size_t renderer_count = kMaxRendererFrames;

Powered by Google App Engine
This is Rietveld 408576698