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

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

Issue 2018833002: cc : Delete LayerImpl::opacity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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 21 matching lines...) Expand all
32 layer->children().size())); 32 layer->children().size()));
33 RETURN_IF_EXPECTATION_FAILS(EXPECT_EQ(layer_impl->bounds(), layer->bounds())); 33 RETURN_IF_EXPECTATION_FAILS(EXPECT_EQ(layer_impl->bounds(), layer->bounds()));
34 RETURN_IF_EXPECTATION_FAILS( 34 RETURN_IF_EXPECTATION_FAILS(
35 EXPECT_EQ(layer_impl->position(), layer->position())); 35 EXPECT_EQ(layer_impl->position(), layer->position()));
36 RETURN_IF_EXPECTATION_FAILS(EXPECT_TRANSFORMATION_MATRIX_EQ( 36 RETURN_IF_EXPECTATION_FAILS(EXPECT_TRANSFORMATION_MATRIX_EQ(
37 layer_impl->transform(), layer->transform())); 37 layer_impl->transform(), layer->transform()));
38 RETURN_IF_EXPECTATION_FAILS(EXPECT_EQ(layer_impl->contents_opaque(), 38 RETURN_IF_EXPECTATION_FAILS(EXPECT_EQ(layer_impl->contents_opaque(),
39 layer->contents_opaque())); 39 layer->contents_opaque()));
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(
43 layer->opacity())); 43 EXPECT_FLOAT_EQ(layer_impl->Opacity(), 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], layer->children()[i].get()))); 50 layer_impl->children()[i], layer->children()[i].get())));
51 } 51 }
52 52
53 return true; 53 return true;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 root_impl->AddChild(std::move(touch_layer)); 113 root_impl->AddChild(std::move(touch_layer));
114 tree->SetRootLayer(std::move(root_impl)); 114 tree->SetRootLayer(std::move(root_impl));
115 115
116 std::string json = host_impl.LayerTreeAsJson(); 116 std::string json = host_impl.LayerTreeAsJson();
117 scoped_refptr<Layer> root = ParseTreeFromJson(json, NULL); 117 scoped_refptr<Layer> root = ParseTreeFromJson(json, NULL);
118 ASSERT_TRUE(root.get()); 118 ASSERT_TRUE(root.get());
119 EXPECT_TRUE(LayerTreesMatch(host_impl.RootLayer(), root.get())); 119 EXPECT_TRUE(LayerTreesMatch(host_impl.RootLayer(), root.get()));
120 } 120 }
121 121
122 } // namespace cc 122 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/solid_color_scrollbar_layer_impl_unittest.cc ('k') | cc/trees/damage_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698