Chromium Code Reviews| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <unordered_map> | 7 #include <unordered_map> |
| 8 | 8 |
| 9 #include "base/threading/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
| 10 #include "cc/input/scrollbar_animation_controller.h" | 10 #include "cc/input/scrollbar_animation_controller.h" |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 540 EXPECT_TRUE(layer_tree_impl->IsPendingTree()); | 540 EXPECT_TRUE(layer_tree_impl->IsPendingTree()); |
| 541 layer_tree_impl->property_trees()->effect_tree.Node( | 541 layer_tree_impl->property_trees()->effect_tree.Node( |
| 542 scrollbar_layer->effect_tree_index()); | 542 scrollbar_layer->effect_tree_index()); |
| 543 EXPECT_EQ(node->data.opacity, 0.5f); | 543 EXPECT_EQ(node->data.opacity, 0.5f); |
| 544 // The active tree opacity should not change with activation for scrollbar | 544 // The active tree opacity should not change with activation for scrollbar |
| 545 // layer. | 545 // layer. |
| 546 host_impl->ActivateSyncTree(); | 546 host_impl->ActivateSyncTree(); |
| 547 layer_tree_impl = host_impl->active_tree(); | 547 layer_tree_impl = host_impl->active_tree(); |
| 548 node = layer_tree_impl->property_trees()->effect_tree.Node( | 548 node = layer_tree_impl->property_trees()->effect_tree.Node( |
| 549 scrollbar_layer->effect_tree_index()); | 549 scrollbar_layer->effect_tree_index()); |
| 550 EXPECT_EQ(node->data.opacity, 1.f); | 550 EXPECT_EQ(node->data.opacity, 0.f); |
|
jaydasika
2016/05/20 22:46:33
This tests that 0 opacity gets pushed onto the act
| |
| 551 } | 551 } |
| 552 | 552 |
| 553 class ScrollbarLayerSolidColorThumbTest : public testing::Test { | 553 class ScrollbarLayerSolidColorThumbTest : public testing::Test { |
| 554 public: | 554 public: |
| 555 ScrollbarLayerSolidColorThumbTest() { | 555 ScrollbarLayerSolidColorThumbTest() { |
| 556 LayerTreeSettings layer_tree_settings; | 556 LayerTreeSettings layer_tree_settings; |
| 557 host_impl_.reset(new FakeLayerTreeHostImpl( | 557 host_impl_.reset(new FakeLayerTreeHostImpl( |
| 558 layer_tree_settings, &task_runner_provider_, &shared_bitmap_manager_, | 558 layer_tree_settings, &task_runner_provider_, &shared_bitmap_manager_, |
| 559 &task_graph_runner_)); | 559 &task_graph_runner_)); |
| 560 | 560 |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1072 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); | 1072 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); |
| 1073 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); | 1073 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); |
| 1074 | 1074 |
| 1075 // Horizontal Scrollbars. | 1075 // Horizontal Scrollbars. |
| 1076 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); | 1076 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); |
| 1077 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); | 1077 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); |
| 1078 } | 1078 } |
| 1079 | 1079 |
| 1080 } // namespace | 1080 } // namespace |
| 1081 } // namespace cc | 1081 } // namespace cc |
| OLD | NEW |