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

Side by Side Diff: cc/layers/layer_proto_converter_unittest.cc

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase Created 4 years, 8 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/layers/layer_position_constraint_unittest.cc ('k') | cc/layers/layer_unittest.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/layers/layer_proto_converter.h" 5 #include "cc/layers/layer_proto_converter.h"
6 6
7 #include "cc/layers/empty_content_layer_client.h" 7 #include "cc/layers/empty_content_layer_client.h"
8 #include "cc/layers/heads_up_display_layer.h" 8 #include "cc/layers/heads_up_display_layer.h"
9 #include "cc/layers/layer.h" 9 #include "cc/layers/layer.h"
10 #include "cc/layers/picture_layer.h" 10 #include "cc/layers/picture_layer.h"
(...skipping 17 matching lines...) Expand all
28 FakeLayerTreeHost::Create(&fake_client_, &task_graph_runner_); 28 FakeLayerTreeHost::Create(&fake_client_, &task_graph_runner_);
29 } 29 }
30 30
31 void TearDown() override { 31 void TearDown() override {
32 layer_tree_host_->SetRootLayer(nullptr); 32 layer_tree_host_->SetRootLayer(nullptr);
33 layer_tree_host_ = nullptr; 33 layer_tree_host_ = nullptr;
34 } 34 }
35 35
36 TestTaskGraphRunner task_graph_runner_; 36 TestTaskGraphRunner task_graph_runner_;
37 FakeLayerTreeHostClient fake_client_; 37 FakeLayerTreeHostClient fake_client_;
38 scoped_ptr<FakeLayerTreeHost> layer_tree_host_; 38 std::unique_ptr<FakeLayerTreeHost> layer_tree_host_;
39 }; 39 };
40 40
41 TEST_F(LayerProtoConverterTest, TestKeepingRoot) { 41 TEST_F(LayerProtoConverterTest, TestKeepingRoot) {
42 /* Test deserialization of a tree that looks like: 42 /* Test deserialization of a tree that looks like:
43 root 43 root
44 / \ 44 / \
45 a b 45 a b
46 \ 46 \
47 c 47 c
48 The old root node will be reused during deserialization. 48 The old root node will be reused during deserialization.
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 // serialize to. 396 // serialize to.
397 proto::LayerNode layer_node; 397 proto::LayerNode layer_node;
398 new_root->SetTypeForProtoSerialization(&layer_node); 398 new_root->SetTypeForProtoSerialization(&layer_node);
399 EXPECT_EQ(proto::LayerNode::HEADS_UP_DISPLAY_LAYER, layer_node.type()); 399 EXPECT_EQ(proto::LayerNode::HEADS_UP_DISPLAY_LAYER, layer_node.type());
400 400
401 new_root->SetLayerTreeHost(nullptr); 401 new_root->SetLayerTreeHost(nullptr);
402 } 402 }
403 403
404 } // namespace 404 } // namespace
405 } // namespace cc 405 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_position_constraint_unittest.cc ('k') | cc/layers/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698