summaryrefslogtreecommitdiffstats
path: root/cc/trees
diff options
context:
space:
mode:
authorweiliangc <weiliangc@chromium.org>2016-03-14 14:23:42 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-14 21:26:56 +0000
commit02f0b811814e103b4f092d6df880140827b202ed (patch)
tree149c4213d8569676e07609d00ba306572dbf0107 /cc/trees
parenteef62b0282ec19ebc040785d0b7ac36de398cbc1 (diff)
downloadchromium_src-02f0b811814e103b4f092d6df880140827b202ed.zip
chromium_src-02f0b811814e103b4f092d6df880140827b202ed.tar.gz
chromium_src-02f0b811814e103b4f092d6df880140827b202ed.tar.bz2
cc: Fix one unittest to set up clip children correctly
One of the LayerTreeImpl unittest did not set up clip children correct. To set up clip children, clip child layer need to set its clip parent, and also clip parent layer need to update its clip children list. R=ajuma BUG= CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1800813002 Cr-Commit-Position: refs/heads/master@{#381072}
Diffstat (limited to 'cc/trees')
-rw-r--r--cc/trees/layer_tree_impl_unittest.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/cc/trees/layer_tree_impl_unittest.cc b/cc/trees/layer_tree_impl_unittest.cc
index 3405a2f..195c44b 100644
--- a/cc/trees/layer_tree_impl_unittest.cc
+++ b/cc/trees/layer_tree_impl_unittest.cc
@@ -1206,6 +1206,9 @@ TEST_F(LayerTreeImplTest, HitTestingRespectsClipParents) {
// This should let |grand_child| "escape" |child|'s clip.
grand_child->SetClipParent(root.get());
+ scoped_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
+ clip_children->insert(grand_child.get());
+ root->SetClipChildren(clip_children.release());
child->AddChild(std::move(grand_child));
root->AddChild(std::move(child));