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

Unified Diff: cc/layers/scrollbar_layer_unittest.cc

Issue 1437413002: cc: Remove ScopedPtrVector and cc::remove_if. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/render_surface_unittest.cc ('k') | cc/output/bsp_tree.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/scrollbar_layer_unittest.cc
diff --git a/cc/layers/scrollbar_layer_unittest.cc b/cc/layers/scrollbar_layer_unittest.cc
index 53e2714b7467b6fc60f9b4a785790c81519548ee..3ebf090438613faa1c68698de7f9ebfce8b849f6 100644
--- a/cc/layers/scrollbar_layer_unittest.cc
+++ b/cc/layers/scrollbar_layer_unittest.cc
@@ -153,7 +153,7 @@ TEST_F(ScrollbarLayerTest, ShouldScrollNonOverlayOnMainThread) {
0, 0);
PaintedScrollbarLayerImpl* scrollbar_layer_impl =
static_cast<PaintedScrollbarLayerImpl*>(
- layer_impl_tree_root->children()[1]);
+ layer_impl_tree_root->children()[1].get());
// When the scrollbar is not an overlay scrollbar, the scroll should be
// responded to on the main thread as the compositor does not yet implement
@@ -169,7 +169,7 @@ TEST_F(ScrollbarLayerTest, ShouldScrollNonOverlayOnMainThread) {
layer_settings(), layer_tree_host_.get(), scrollbar.Pass(), false, false,
0, 0);
scrollbar_layer_impl = static_cast<PaintedScrollbarLayerImpl*>(
- layer_impl_tree_root->children()[1]);
+ layer_impl_tree_root->children()[1].get());
// The user shouldn't be able to drag an overlay scrollbar and the scroll
// may be handled in the compositor.
@@ -207,7 +207,7 @@ TEST_F(ScrollbarLayerTest, ScrollOffsetSynchronization) {
ScrollbarLayerImplBase* cc_scrollbar_layer =
static_cast<PaintedScrollbarLayerImpl*>(
- layer_impl_tree_root->children()[1]);
+ layer_impl_tree_root->children()[1].get());
EXPECT_EQ(10.f, cc_scrollbar_layer->current_pos());
EXPECT_EQ(30, cc_scrollbar_layer->scroll_layer_length() -
@@ -227,7 +227,7 @@ TEST_F(ScrollbarLayerTest, ScrollOffsetSynchronization) {
EXPECT_EQ(300, cc_scrollbar_layer->scroll_layer_length() -
cc_scrollbar_layer->clip_layer_length());
- LayerImpl* scroll_layer_impl = layer_impl_tree_root->children()[0];
+ LayerImpl* scroll_layer_impl = layer_impl_tree_root->children()[0].get();
scroll_layer_impl->ScrollBy(gfx::Vector2d(12, 34));
EXPECT_EQ(112.f, cc_scrollbar_layer->current_pos());
@@ -240,9 +240,9 @@ TEST_F(ScrollbarLayerTest, ScrollOffsetSynchronization) {
scrollbar_layer->UpdateInternalContentScale(); \
scrollbar_layer->UpdateThumbAndTrackGeometry(); \
root_clip_layer_impl = layer_tree_host_->CommitAndCreateLayerImplTree(); \
- root_layer_impl = root_clip_layer_impl->children()[0]; \
+ root_layer_impl = root_clip_layer_impl->children()[0].get(); \
scrollbar_layer_impl = static_cast<PaintedScrollbarLayerImpl*>( \
- root_layer_impl->children()[1]); \
+ root_layer_impl->children()[1].get()); \
} while (false)
TEST_F(ScrollbarLayerTest, UpdatePropertiesOfScrollBarWhenThumbRemoved) {
@@ -375,7 +375,7 @@ TEST_F(ScrollbarLayerTest, SolidColorDrawQuads) {
kThumbThickness, kTrackStart);
ScrollbarLayerImplBase* scrollbar_layer_impl =
static_cast<SolidColorScrollbarLayerImpl*>(
- layer_impl_tree_root->children()[1]);
+ layer_impl_tree_root->children()[1].get());
scrollbar_layer_impl->SetBounds(gfx::Size(kTrackLength, kThumbThickness));
scrollbar_layer_impl->SetCurrentPos(10.f);
scrollbar_layer_impl->SetClipLayerLength(200 / 3.f);
@@ -449,10 +449,10 @@ TEST_F(ScrollbarLayerTest, LayerDrivenSolidColorDrawQuads) {
}
LayerImpl* layer_impl_tree_root =
layer_tree_host_->CommitAndCreateLayerImplTree();
- LayerImpl* scroll_layer_impl = layer_impl_tree_root->children()[0];
+ LayerImpl* scroll_layer_impl = layer_impl_tree_root->children()[0].get();
- auto* scrollbar_layer_impl =
- static_cast<ScrollbarLayerImplBase*>(scroll_layer_impl->children()[1]);
+ auto* scrollbar_layer_impl = static_cast<ScrollbarLayerImplBase*>(
+ scroll_layer_impl->children()[1].get());
// Choose layer bounds to give max_scroll_offset = (8, 8).
layer_impl_tree_root->SetBounds(gfx::Size(2, 2));
« no previous file with comments | « cc/layers/render_surface_unittest.cc ('k') | cc/output/bsp_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698