OLD | NEW |
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/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
6 | 6 |
7 #include "cc/layers/heads_up_display_layer.h" | 7 #include "cc/layers/heads_up_display_layer.h" |
8 #include "cc/layers/layer.h" | 8 #include "cc/layers/layer.h" |
9 #include "cc/proto/layer.pb.h" | 9 #include "cc/proto/layer.pb.h" |
10 #include "cc/proto/layer_tree_host.pb.h" | 10 #include "cc/proto/layer_tree_host.pb.h" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 if (proto.root_layer().children(i).id() == | 124 if (proto.root_layer().children(i).id() == |
125 layer_tree_host_src_->hud_layer_->id()) { | 125 layer_tree_host_src_->hud_layer_->id()) { |
126 EXPECT_EQ(proto::LayerNode::HEADS_UP_DISPLAY_LAYER, | 126 EXPECT_EQ(proto::LayerNode::HEADS_UP_DISPLAY_LAYER, |
127 proto.root_layer().children(i).type()); | 127 proto.root_layer().children(i).type()); |
128 found_hud_layer_type = true; | 128 found_hud_layer_type = true; |
129 break; | 129 break; |
130 } | 130 } |
131 } | 131 } |
132 EXPECT_TRUE(found_hud_layer_type); | 132 EXPECT_TRUE(found_hud_layer_type); |
133 } else { | 133 } else { |
134 EXPECT_EQ(nullptr, layer_tree_host_dst_->hud_layer_); | 134 EXPECT_FALSE(layer_tree_host_dst_->hud_layer_); |
135 } | 135 } |
136 if (layer_tree_host_src_->overscroll_elasticity_layer_) { | 136 if (layer_tree_host_src_->overscroll_elasticity_layer_) { |
137 EXPECT_EQ(layer_tree_host_src_->overscroll_elasticity_layer_->id(), | 137 EXPECT_EQ(layer_tree_host_src_->overscroll_elasticity_layer_->id(), |
138 layer_tree_host_dst_->overscroll_elasticity_layer_->id()); | 138 layer_tree_host_dst_->overscroll_elasticity_layer_->id()); |
139 } else { | 139 } else { |
140 EXPECT_EQ(nullptr, layer_tree_host_dst_->overscroll_elasticity_layer_); | 140 EXPECT_FALSE(layer_tree_host_dst_->overscroll_elasticity_layer_); |
141 } | 141 } |
142 if (layer_tree_host_src_->page_scale_layer_) { | 142 if (layer_tree_host_src_->page_scale_layer_) { |
143 EXPECT_EQ(layer_tree_host_src_->page_scale_layer_->id(), | 143 EXPECT_EQ(layer_tree_host_src_->page_scale_layer_->id(), |
144 layer_tree_host_dst_->page_scale_layer_->id()); | 144 layer_tree_host_dst_->page_scale_layer_->id()); |
145 } else { | 145 } else { |
146 EXPECT_EQ(nullptr, layer_tree_host_dst_->page_scale_layer_); | 146 EXPECT_FALSE(layer_tree_host_dst_->page_scale_layer_); |
147 } | 147 } |
148 if (layer_tree_host_src_->inner_viewport_scroll_layer_) { | 148 if (layer_tree_host_src_->inner_viewport_scroll_layer_) { |
149 EXPECT_EQ(layer_tree_host_src_->inner_viewport_scroll_layer_->id(), | 149 EXPECT_EQ(layer_tree_host_src_->inner_viewport_scroll_layer_->id(), |
150 layer_tree_host_dst_->inner_viewport_scroll_layer_->id()); | 150 layer_tree_host_dst_->inner_viewport_scroll_layer_->id()); |
151 } else { | 151 } else { |
152 EXPECT_EQ(nullptr, layer_tree_host_dst_->inner_viewport_scroll_layer_); | 152 EXPECT_FALSE(layer_tree_host_dst_->inner_viewport_scroll_layer_); |
153 } | 153 } |
154 if (layer_tree_host_src_->outer_viewport_scroll_layer_) { | 154 if (layer_tree_host_src_->outer_viewport_scroll_layer_) { |
155 EXPECT_EQ(layer_tree_host_src_->outer_viewport_scroll_layer_->id(), | 155 EXPECT_EQ(layer_tree_host_src_->outer_viewport_scroll_layer_->id(), |
156 layer_tree_host_dst_->outer_viewport_scroll_layer_->id()); | 156 layer_tree_host_dst_->outer_viewport_scroll_layer_->id()); |
157 } else { | 157 } else { |
158 EXPECT_EQ(nullptr, layer_tree_host_dst_->outer_viewport_scroll_layer_); | 158 EXPECT_FALSE(layer_tree_host_dst_->outer_viewport_scroll_layer_); |
159 } | 159 } |
160 EXPECT_EQ(layer_tree_host_src_->selection_, | 160 EXPECT_EQ(layer_tree_host_src_->selection_, |
161 layer_tree_host_dst_->selection_); | 161 layer_tree_host_dst_->selection_); |
162 EXPECT_EQ(layer_tree_host_src_->property_trees_, | 162 EXPECT_EQ(layer_tree_host_src_->property_trees_, |
163 layer_tree_host_dst_->property_trees_); | 163 layer_tree_host_dst_->property_trees_); |
164 EXPECT_EQ(layer_tree_host_src_->surface_id_namespace_, | 164 EXPECT_EQ(layer_tree_host_src_->surface_id_namespace_, |
165 layer_tree_host_dst_->surface_id_namespace_); | 165 layer_tree_host_dst_->surface_id_namespace_); |
166 EXPECT_EQ(layer_tree_host_src_->next_surface_sequence_, | 166 EXPECT_EQ(layer_tree_host_src_->next_surface_sequence_, |
167 layer_tree_host_dst_->next_surface_sequence_); | 167 layer_tree_host_dst_->next_surface_sequence_); |
168 | 168 |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 | 363 |
364 TEST_F(LayerTreeHostSerializationTest, LayersChangedMultipleSerializations) { | 364 TEST_F(LayerTreeHostSerializationTest, LayersChangedMultipleSerializations) { |
365 RunLayersChangedMultipleSerializations(); | 365 RunLayersChangedMultipleSerializations(); |
366 } | 366 } |
367 | 367 |
368 TEST_F(LayerTreeHostSerializationTest, AddAndRemoveNodeFromLayerTree) { | 368 TEST_F(LayerTreeHostSerializationTest, AddAndRemoveNodeFromLayerTree) { |
369 RunAddAndRemoveNodeFromLayerTree(); | 369 RunAddAndRemoveNodeFromLayerTree(); |
370 } | 370 } |
371 | 371 |
372 } // namespace cc | 372 } // namespace cc |
OLD | NEW |