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

Side by Side Diff: cc/input/scroll_state_unittest.cc

Issue 2118993002: Detemplatize cc property nodes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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
« no previous file with comments | « cc/input/scroll_state_data.cc ('k') | cc/layers/layer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/input/scroll_state.h" 5 #include "cc/input/scroll_state.h"
6 6
7 #include "cc/layers/layer_impl.h" 7 #include "cc/layers/layer_impl.h"
8 #include "cc/test/fake_impl_task_runner_provider.h" 8 #include "cc/test/fake_impl_task_runner_provider.h"
9 #include "cc/test/fake_layer_tree_host_impl.h" 9 #include "cc/test/fake_layer_tree_host_impl.h"
10 #include "cc/test/test_shared_bitmap_manager.h" 10 #include "cc/test/test_shared_bitmap_manager.h"
11 #include "cc/test/test_task_graph_runner.h" 11 #include "cc/test/test_task_graph_runner.h"
12 #include "cc/trees/layer_tree_impl.h" 12 #include "cc/trees/layer_tree_impl.h"
13 #include "cc/trees/scroll_node.h"
13 #include "testing/gmock/include/gmock/gmock.h" 14 #include "testing/gmock/include/gmock/gmock.h"
14 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
15 16
16 namespace cc { 17 namespace cc {
17 18
18 class ScrollStateTest : public testing::Test {}; 19 class ScrollStateTest : public testing::Test {};
19 20
20 TEST_F(ScrollStateTest, ConsumeDeltaNative) { 21 TEST_F(ScrollStateTest, ConsumeDeltaNative) {
21 const float delta_x = 12.3f; 22 const float delta_x = 12.3f;
22 const float delta_y = 3.9f; 23 const float delta_y = 3.9f;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 ScrollStateData scroll_state_data; 81 ScrollStateData scroll_state_data;
81 scroll_state_data.delta_x = 1; 82 scroll_state_data.delta_x = 1;
82 scroll_state_data.delta_y = 3; 83 scroll_state_data.delta_y = 3;
83 ScrollState scroll_state(scroll_state_data); 84 ScrollState scroll_state(scroll_state_data);
84 85
85 EXPECT_FALSE(scroll_state.FullyConsumed()); 86 EXPECT_FALSE(scroll_state.FullyConsumed());
86 scroll_state.ConsumeDelta(1, 3); 87 scroll_state.ConsumeDelta(1, 3);
87 EXPECT_TRUE(scroll_state.FullyConsumed()); 88 EXPECT_TRUE(scroll_state.FullyConsumed());
88 } 89 }
89 } // namespace cc 90 } // namespace cc
OLDNEW
« no previous file with comments | « cc/input/scroll_state_data.cc ('k') | cc/layers/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698