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

Side by Side Diff: cc/trees/layer_tree_host_unittest_serialization.cc

Issue 1986883002: blimp: Update page load status update indicator to use first paint. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test. Created 4 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
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/remote_channel_main.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/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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 DCHECK(layer->layer_tree_host()); 51 DCHECK(layer->layer_tree_host());
52 EXPECT_EQ(layer, layer->layer_tree_host()->LayerById(layer->id())); 52 EXPECT_EQ(layer, layer->layer_tree_host()->LayerById(layer->id()));
53 }); 53 });
54 } 54 }
55 55
56 void VerifySerializationAndDeserialization() { 56 void VerifySerializationAndDeserialization() {
57 proto::LayerTreeHost proto; 57 proto::LayerTreeHost proto;
58 58
59 std::unordered_set<Layer*> layers_that_should_push_properties_src = 59 std::unordered_set<Layer*> layers_that_should_push_properties_src =
60 layer_tree_host_src_->LayersThatShouldPushProperties(); 60 layer_tree_host_src_->LayersThatShouldPushProperties();
61 layer_tree_host_src_->ToProtobufForCommit(&proto); 61 std::vector<std::unique_ptr<SwapPromise>> swap_promises;
62 layer_tree_host_src_->ToProtobufForCommit(&proto, &swap_promises);
62 layer_tree_host_dst_->FromProtobufForCommit(proto); 63 layer_tree_host_dst_->FromProtobufForCommit(proto);
63 64
64 EXPECT_EQ(layer_tree_host_src_->needs_full_tree_sync_, 65 EXPECT_EQ(layer_tree_host_src_->needs_full_tree_sync_,
65 layer_tree_host_dst_->needs_full_tree_sync_); 66 layer_tree_host_dst_->needs_full_tree_sync_);
66 EXPECT_EQ(layer_tree_host_src_->needs_meta_info_recomputation_, 67 EXPECT_EQ(layer_tree_host_src_->needs_meta_info_recomputation_,
67 layer_tree_host_dst_->needs_meta_info_recomputation_); 68 layer_tree_host_dst_->needs_meta_info_recomputation_);
68 EXPECT_EQ(layer_tree_host_src_->source_frame_number_, 69 EXPECT_EQ(layer_tree_host_src_->source_frame_number_,
69 layer_tree_host_dst_->source_frame_number_); 70 layer_tree_host_dst_->source_frame_number_);
70 EXPECT_EQ(layer_tree_host_src_->root_layer()->id(), 71 EXPECT_EQ(layer_tree_host_src_->root_layer()->id(),
71 layer_tree_host_dst_->root_layer()->id()); 72 layer_tree_host_dst_->root_layer()->id());
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 364
364 TEST_F(LayerTreeHostSerializationTest, LayersChangedMultipleSerializations) { 365 TEST_F(LayerTreeHostSerializationTest, LayersChangedMultipleSerializations) {
365 RunLayersChangedMultipleSerializations(); 366 RunLayersChangedMultipleSerializations();
366 } 367 }
367 368
368 TEST_F(LayerTreeHostSerializationTest, AddAndRemoveNodeFromLayerTree) { 369 TEST_F(LayerTreeHostSerializationTest, AddAndRemoveNodeFromLayerTree) {
369 RunAddAndRemoveNodeFromLayerTree(); 370 RunAddAndRemoveNodeFromLayerTree();
370 } 371 }
371 372
372 } // namespace cc 373 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/remote_channel_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698