| OLD | NEW |
| 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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 | 385 |
| 386 testing::Mock::VerifyAndClearExpectations(layer_tree_host_.get()); | 386 testing::Mock::VerifyAndClearExpectations(layer_tree_host_.get()); |
| 387 EXPECT_EQ(scrollbar_layer->layer_tree_host(), layer_tree_host_.get()); | 387 EXPECT_EQ(scrollbar_layer->layer_tree_host(), layer_tree_host_.get()); |
| 388 | 388 |
| 389 PriorityCalculator calculator; | 389 PriorityCalculator calculator; |
| 390 ResourceUpdateQueue queue; | 390 ResourceUpdateQueue queue; |
| 391 OcclusionTracker occlusion_tracker(gfx::Rect(), false); | 391 OcclusionTracker occlusion_tracker(gfx::Rect(), false); |
| 392 | 392 |
| 393 scrollbar_layer->SetTexturePriorities(calculator); | 393 scrollbar_layer->SetTexturePriorities(calculator); |
| 394 layer_tree_host_->contents_texture_manager()->PrioritizeTextures(); | 394 layer_tree_host_->contents_texture_manager()->PrioritizeTextures(); |
| 395 scrollbar_layer->Update(&queue, &occlusion_tracker, NULL); | 395 scrollbar_layer->Update(&queue, &occlusion_tracker); |
| 396 EXPECT_EQ(0, queue.FullUploadSize()); | 396 EXPECT_EQ(0, queue.FullUploadSize()); |
| 397 EXPECT_EQ(expected_resources, queue.PartialUploadSize()); | 397 EXPECT_EQ(expected_resources, queue.PartialUploadSize()); |
| 398 | 398 |
| 399 testing::Mock::VerifyAndClearExpectations(layer_tree_host_.get()); | 399 testing::Mock::VerifyAndClearExpectations(layer_tree_host_.get()); |
| 400 } | 400 } |
| 401 | 401 |
| 402 protected: | 402 protected: |
| 403 FakeLayerTreeHostClient fake_client_; | 403 FakeLayerTreeHostClient fake_client_; |
| 404 LayerTreeSettings layer_tree_settings_; | 404 LayerTreeSettings layer_tree_settings_; |
| 405 scoped_ptr<MockLayerTreeHost> layer_tree_host_; | 405 scoped_ptr<MockLayerTreeHost> layer_tree_host_; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 EXPECT_EQ(10.f, pinch_zoom_horizontal->CurrentPos()); | 476 EXPECT_EQ(10.f, pinch_zoom_horizontal->CurrentPos()); |
| 477 EXPECT_EQ(100, pinch_zoom_horizontal->TotalSize()); | 477 EXPECT_EQ(100, pinch_zoom_horizontal->TotalSize()); |
| 478 EXPECT_EQ(30, pinch_zoom_horizontal->Maximum()); | 478 EXPECT_EQ(30, pinch_zoom_horizontal->Maximum()); |
| 479 EXPECT_EQ(20.f, pinch_zoom_vertical->CurrentPos()); | 479 EXPECT_EQ(20.f, pinch_zoom_vertical->CurrentPos()); |
| 480 EXPECT_EQ(200, pinch_zoom_vertical->TotalSize()); | 480 EXPECT_EQ(200, pinch_zoom_vertical->TotalSize()); |
| 481 EXPECT_EQ(50, pinch_zoom_vertical->Maximum()); | 481 EXPECT_EQ(50, pinch_zoom_vertical->Maximum()); |
| 482 } | 482 } |
| 483 | 483 |
| 484 } // namespace | 484 } // namespace |
| 485 } // namespace cc | 485 } // namespace cc |
| OLD | NEW |