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

Side by Side Diff: cc/layers/scrollbar_layer_unittest.cc

Issue 12426024: cc: Switch RenderingStats collection in Layer::Update() to RenderingStatsInstrumentation (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "cc/layers/scrollbar_layer.h" 5 #include "cc/layers/scrollbar_layer.h"
6 6
7 #include "cc/animation/scrollbar_animation_controller.h" 7 #include "cc/animation/scrollbar_animation_controller.h"
8 #include "cc/layers/append_quads_data.h" 8 #include "cc/layers/append_quads_data.h"
9 #include "cc/layers/scrollbar_layer_impl.h" 9 #include "cc/layers/scrollbar_layer_impl.h"
10 #include "cc/quads/solid_color_draw_quad.h" 10 #include "cc/quads/solid_color_draw_quad.h"
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 310
311 testing::Mock::VerifyAndClearExpectations(m_layerTreeHost.get()); 311 testing::Mock::VerifyAndClearExpectations(m_layerTreeHost.get());
312 EXPECT_EQ(scrollbarLayer->layer_tree_host(), m_layerTreeHost.get()); 312 EXPECT_EQ(scrollbarLayer->layer_tree_host(), m_layerTreeHost.get());
313 313
314 PriorityCalculator calculator; 314 PriorityCalculator calculator;
315 ResourceUpdateQueue queue; 315 ResourceUpdateQueue queue;
316 OcclusionTracker occlusionTracker(gfx::Rect(), false); 316 OcclusionTracker occlusionTracker(gfx::Rect(), false);
317 317
318 scrollbarLayer->SetTexturePriorities(calculator); 318 scrollbarLayer->SetTexturePriorities(calculator);
319 m_layerTreeHost->contents_texture_manager()->PrioritizeTextures(); 319 m_layerTreeHost->contents_texture_manager()->PrioritizeTextures();
320 scrollbarLayer->Update(&queue, &occlusionTracker, NULL); 320 scrollbarLayer->Update(&queue, &occlusionTracker);
321 EXPECT_EQ(0, queue.FullUploadSize()); 321 EXPECT_EQ(0, queue.FullUploadSize());
322 EXPECT_EQ(expectedResources, queue.PartialUploadSize()); 322 EXPECT_EQ(expectedResources, queue.PartialUploadSize());
323 323
324 testing::Mock::VerifyAndClearExpectations(m_layerTreeHost.get()); 324 testing::Mock::VerifyAndClearExpectations(m_layerTreeHost.get());
325 } 325 }
326 326
327 protected: 327 protected:
328 FakeLayerTreeHostClient m_fakeClient; 328 FakeLayerTreeHostClient m_fakeClient;
329 LayerTreeSettings m_layerTreeSettings; 329 LayerTreeSettings m_layerTreeSettings;
330 scoped_ptr<MockLayerTreeHost> m_layerTreeHost; 330 scoped_ptr<MockLayerTreeHost> m_layerTreeHost;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 EXPECT_EQ(10, pinchZoomHorizontal->CurrentPos()); 401 EXPECT_EQ(10, pinchZoomHorizontal->CurrentPos());
402 EXPECT_EQ(100, pinchZoomHorizontal->TotalSize()); 402 EXPECT_EQ(100, pinchZoomHorizontal->TotalSize());
403 EXPECT_EQ(30, pinchZoomHorizontal->Maximum()); 403 EXPECT_EQ(30, pinchZoomHorizontal->Maximum());
404 EXPECT_EQ(20, pinchZoomVertical->CurrentPos()); 404 EXPECT_EQ(20, pinchZoomVertical->CurrentPos());
405 EXPECT_EQ(200, pinchZoomVertical->TotalSize()); 405 EXPECT_EQ(200, pinchZoomVertical->TotalSize());
406 EXPECT_EQ(50, pinchZoomVertical->Maximum()); 406 EXPECT_EQ(50, pinchZoomVertical->Maximum());
407 } 407 }
408 408
409 } // namespace 409 } // namespace
410 } // namespace cc 410 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698