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

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

Issue 2876473005: Get rid of two callsites of effect_tree.FindNodeIndexFromOwningLayerId. (Closed)
Patch Set: Created 3 years, 7 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
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 22 matching lines...) Expand all
33 layer->children().size())); 33 layer->children().size()));
34 RETURN_IF_EXPECTATION_FAILS(EXPECT_EQ(layer_impl->bounds(), layer->bounds())); 34 RETURN_IF_EXPECTATION_FAILS(EXPECT_EQ(layer_impl->bounds(), layer->bounds()));
35 RETURN_IF_EXPECTATION_FAILS( 35 RETURN_IF_EXPECTATION_FAILS(
36 EXPECT_EQ(layer_impl->position(), layer->position())); 36 EXPECT_EQ(layer_impl->position(), layer->position()));
37 RETURN_IF_EXPECTATION_FAILS(EXPECT_TRANSFORMATION_MATRIX_EQ( 37 RETURN_IF_EXPECTATION_FAILS(EXPECT_TRANSFORMATION_MATRIX_EQ(
38 layer_impl->test_properties()->transform, layer->transform())); 38 layer_impl->test_properties()->transform, layer->transform()));
39 RETURN_IF_EXPECTATION_FAILS(EXPECT_EQ(layer_impl->contents_opaque(), 39 RETURN_IF_EXPECTATION_FAILS(EXPECT_EQ(layer_impl->contents_opaque(),
40 layer->contents_opaque())); 40 layer->contents_opaque()));
41 RETURN_IF_EXPECTATION_FAILS(EXPECT_EQ(layer_impl->scrollable(), 41 RETURN_IF_EXPECTATION_FAILS(EXPECT_EQ(layer_impl->scrollable(),
42 layer->scrollable())); 42 layer->scrollable()));
43
43 RETURN_IF_EXPECTATION_FAILS( 44 RETURN_IF_EXPECTATION_FAILS(
44 EXPECT_FLOAT_EQ(layer_impl->Opacity(), layer->opacity())); 45 EXPECT_FLOAT_EQ(layer_impl->Opacity(), layer->opacity()));
45 RETURN_IF_EXPECTATION_FAILS( 46 RETURN_IF_EXPECTATION_FAILS(
46 EXPECT_EQ(layer_impl->touch_event_handler_region(), 47 EXPECT_EQ(layer_impl->touch_event_handler_region(),
47 layer->touch_event_handler_region())); 48 layer->touch_event_handler_region()));
48 49
49 for (size_t i = 0; i < layer_impl->test_properties()->children.size(); ++i) { 50 for (size_t i = 0; i < layer_impl->test_properties()->children.size(); ++i) {
50 RETURN_IF_EXPECTATION_FAILS( 51 RETURN_IF_EXPECTATION_FAILS(
51 EXPECT_TRUE(LayerTreesMatch(layer_impl->test_properties()->children[i], 52 EXPECT_TRUE(LayerTreesMatch(layer_impl->test_properties()->children[i],
52 layer->children()[i].get()))); 53 layer->children()[i].get())));
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 tree->BuildPropertyTreesForTesting(); 116 tree->BuildPropertyTreesForTesting();
116 117
117 std::string json = host_impl.LayerTreeAsJson(); 118 std::string json = host_impl.LayerTreeAsJson();
118 scoped_refptr<Layer> root = ParseTreeFromJson(json, NULL); 119 scoped_refptr<Layer> root = ParseTreeFromJson(json, NULL);
119 ASSERT_TRUE(root.get()); 120 ASSERT_TRUE(root.get());
120 EXPECT_TRUE(LayerTreesMatch(host_impl.active_tree()->root_layer_for_testing(), 121 EXPECT_TRUE(LayerTreesMatch(host_impl.active_tree()->root_layer_for_testing(),
121 root.get())); 122 root.get()));
122 } 123 }
123 124
124 } // namespace cc 125 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698