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

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

Issue 1437413002: cc: Remove ScopedPtrVector and cc::remove_if. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: just the vector Created 5 years, 1 month 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 "cc/layers/layer.h" 7 #include "cc/layers/layer.h"
8 #include "cc/test/fake_impl_task_runner_provider.h" 8 #include "cc/test/fake_impl_task_runner_provider.h"
9 #include "cc/test/fake_layer_tree_host.h" 9 #include "cc/test/fake_layer_tree_host.h"
10 #include "cc/test/fake_layer_tree_host_impl.h" 10 #include "cc/test/fake_layer_tree_host_impl.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 layer->have_wheel_event_handlers())); 43 layer->have_wheel_event_handlers()));
44 RETURN_IF_EXPECTATION_FAILS( 44 RETURN_IF_EXPECTATION_FAILS(
45 EXPECT_EQ(layer_impl->have_scroll_event_handlers(), 45 EXPECT_EQ(layer_impl->have_scroll_event_handlers(),
46 layer->have_scroll_event_handlers())); 46 layer->have_scroll_event_handlers()));
47 RETURN_IF_EXPECTATION_FAILS( 47 RETURN_IF_EXPECTATION_FAILS(
48 EXPECT_EQ(layer_impl->touch_event_handler_region(), 48 EXPECT_EQ(layer_impl->touch_event_handler_region(),
49 layer->touch_event_handler_region())); 49 layer->touch_event_handler_region()));
50 50
51 for (size_t i = 0; i < layer_impl->children().size(); ++i) { 51 for (size_t i = 0; i < layer_impl->children().size(); ++i) {
52 RETURN_IF_EXPECTATION_FAILS(EXPECT_TRUE(LayerTreesMatch( 52 RETURN_IF_EXPECTATION_FAILS(EXPECT_TRUE(LayerTreesMatch(
53 layer_impl->children()[i], layer->children()[i].get()))); 53 layer_impl->children()[i].get(), layer->children()[i].get())));
54 } 54 }
55 55
56 return true; 56 return true;
57 #undef RETURN_IF_EXPECTATION_FAILS 57 #undef RETURN_IF_EXPECTATION_FAILS
58 } 58 }
59 59
60 } // namespace 60 } // namespace
61 61
62 class LayerTreeJsonParserSanityCheck : public testing::Test { 62 class LayerTreeJsonParserSanityCheck : public testing::Test {
63 }; 63 };
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 root_impl->AddChild(touch_layer.Pass()); 115 root_impl->AddChild(touch_layer.Pass());
116 tree->SetRootLayer(root_impl.Pass()); 116 tree->SetRootLayer(root_impl.Pass());
117 117
118 std::string json = host_impl.LayerTreeAsJson(); 118 std::string json = host_impl.LayerTreeAsJson();
119 scoped_refptr<Layer> root = ParseTreeFromJson(json, NULL); 119 scoped_refptr<Layer> root = ParseTreeFromJson(json, NULL);
120 ASSERT_TRUE(root.get()); 120 ASSERT_TRUE(root.get());
121 EXPECT_TRUE(LayerTreesMatch(host_impl.RootLayer(), root.get())); 121 EXPECT_TRUE(LayerTreesMatch(host_impl.RootLayer(), root.get()));
122 } 122 }
123 123
124 } // namespace cc 124 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698