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

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

Issue 1440593004: Make operators on scoped_ptr match the ones defined for std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrequals: followupfix-after-rebase Created 5 years, 1 month 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 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"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 FakeImplTaskRunnerProvider task_runner_provider; 60 FakeImplTaskRunnerProvider task_runner_provider;
61 TestSharedBitmapManager shared_bitmap_manager; 61 TestSharedBitmapManager shared_bitmap_manager;
62 TestTaskGraphRunner task_graph_runner; 62 TestTaskGraphRunner task_graph_runner;
63 FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager, 63 FakeLayerTreeHostImpl host_impl(&task_runner_provider, &shared_bitmap_manager,
64 &task_graph_runner); 64 &task_graph_runner);
65 65
66 scoped_ptr<LayerImpl> layer_impl = 66 scoped_ptr<LayerImpl> layer_impl =
67 LayerImpl::Create(host_impl.active_tree(), 1); 67 LayerImpl::Create(host_impl.active_tree(), 1);
68 scrollState.set_current_native_scrolling_layer(layer_impl.get()); 68 scrollState.set_current_native_scrolling_layer(layer_impl.get());
69 EXPECT_EQ(layer_impl, scrollState.current_native_scrolling_layer()); 69 EXPECT_EQ(layer_impl.get(), scrollState.current_native_scrolling_layer());
70 } 70 }
71 71
72 TEST_F(ScrollStateTest, FullyConsumed) { 72 TEST_F(ScrollStateTest, FullyConsumed) {
73 ScrollState scrollState(1, 3, 0, 0, 0, false, false); 73 ScrollState scrollState(1, 3, 0, 0, 0, false, false);
74 EXPECT_FALSE(scrollState.FullyConsumed()); 74 EXPECT_FALSE(scrollState.FullyConsumed());
75 75
76 scrollState.ConsumeDelta(1, 3); 76 scrollState.ConsumeDelta(1, 3);
77 EXPECT_TRUE(scrollState.FullyConsumed()); 77 EXPECT_TRUE(scrollState.FullyConsumed());
78 } 78 }
79 } // namespace cc 79 } // namespace cc
OLDNEW
« no previous file with comments | « blimp/engine/browser/blimp_engine_session.cc ('k') | cc/raster/one_copy_tile_task_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698