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

Side by Side Diff: cc/test/layer_tree_json_parser_unittest.cc

Issue 1801853002: Transfer LayerImpl ownership to LayerTreeImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more asan. Created 4 years, 9 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/test/layer_tree_host_common_test.h ('k') | cc/tiles/tile_manager_perftest.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/test/layer_tree_json_parser.h" 5 #include "cc/test/layer_tree_json_parser.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "cc/layers/layer.h" 9 #include "cc/layers/layer.h"
10 #include "cc/test/fake_impl_task_runner_provider.h" 10 #include "cc/test/fake_impl_task_runner_provider.h"
(...skipping 29 matching lines...) Expand all
40 RETURN_IF_EXPECTATION_FAILS(EXPECT_EQ(layer_impl->scrollable(), 40 RETURN_IF_EXPECTATION_FAILS(EXPECT_EQ(layer_impl->scrollable(),
41 layer->scrollable())); 41 layer->scrollable()));
42 RETURN_IF_EXPECTATION_FAILS(EXPECT_FLOAT_EQ(layer_impl->opacity(), 42 RETURN_IF_EXPECTATION_FAILS(EXPECT_FLOAT_EQ(layer_impl->opacity(),
43 layer->opacity())); 43 layer->opacity()));
44 RETURN_IF_EXPECTATION_FAILS( 44 RETURN_IF_EXPECTATION_FAILS(
45 EXPECT_EQ(layer_impl->touch_event_handler_region(), 45 EXPECT_EQ(layer_impl->touch_event_handler_region(),
46 layer->touch_event_handler_region())); 46 layer->touch_event_handler_region()));
47 47
48 for (size_t i = 0; i < layer_impl->children().size(); ++i) { 48 for (size_t i = 0; i < layer_impl->children().size(); ++i) {
49 RETURN_IF_EXPECTATION_FAILS(EXPECT_TRUE(LayerTreesMatch( 49 RETURN_IF_EXPECTATION_FAILS(EXPECT_TRUE(LayerTreesMatch(
50 layer_impl->children()[i].get(), layer->children()[i].get()))); 50 layer_impl->children()[i], layer->children()[i].get())));
51 } 51 }
52 52
53 return true; 53 return true;
54 #undef RETURN_IF_EXPECTATION_FAILS 54 #undef RETURN_IF_EXPECTATION_FAILS
55 } 55 }
56 56
57 } // namespace 57 } // namespace
58 58
59 class LayerTreeJsonParserSanityCheck : public testing::Test { 59 class LayerTreeJsonParserSanityCheck : public testing::Test {
60 }; 60 };
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 root_impl->AddChild(std::move(touch_layer)); 109 root_impl->AddChild(std::move(touch_layer));
110 tree->SetRootLayer(std::move(root_impl)); 110 tree->SetRootLayer(std::move(root_impl));
111 111
112 std::string json = host_impl.LayerTreeAsJson(); 112 std::string json = host_impl.LayerTreeAsJson();
113 scoped_refptr<Layer> root = ParseTreeFromJson(json, NULL); 113 scoped_refptr<Layer> root = ParseTreeFromJson(json, NULL);
114 ASSERT_TRUE(root.get()); 114 ASSERT_TRUE(root.get());
115 EXPECT_TRUE(LayerTreesMatch(host_impl.RootLayer(), root.get())); 115 EXPECT_TRUE(LayerTreesMatch(host_impl.RootLayer(), root.get()));
116 } 116 }
117 117
118 } // namespace cc 118 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_tree_host_common_test.h ('k') | cc/tiles/tile_manager_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698