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

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

Issue 332433003: cc: Remove EnsureRenderSurfaceLayerList, do UpdateDrawProps when needed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ensurersll: checkinside Created 6 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 | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_impl.h » ('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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 context_owned.Pass())); 531 context_owned.Pass()));
532 532
533 // Initialization will fail. 533 // Initialization will fail.
534 EXPECT_FALSE(CreateHostImpl(DefaultSettings(), 534 EXPECT_FALSE(CreateHostImpl(DefaultSettings(),
535 output_surface.PassAs<OutputSurface>())); 535 output_surface.PassAs<OutputSurface>()));
536 536
537 SetupScrollAndContentsLayers(gfx::Size(100, 100)); 537 SetupScrollAndContentsLayers(gfx::Size(100, 100));
538 538
539 // We should not crash when trying to scroll after the renderer initialization 539 // We should not crash when trying to scroll after the renderer initialization
540 // fails. 540 // fails.
541 EXPECT_EQ(InputHandler::ScrollIgnored, 541 EXPECT_EQ(InputHandler::ScrollStarted,
542 host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel)); 542 host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel));
543 } 543 }
544 544
545 TEST_F(LayerTreeHostImplTest, ReplaceTreeWhileScrolling) { 545 TEST_F(LayerTreeHostImplTest, ReplaceTreeWhileScrolling) {
546 LayerImpl* scroll_layer = SetupScrollAndContentsLayers(gfx::Size(100, 100)); 546 LayerImpl* scroll_layer = SetupScrollAndContentsLayers(gfx::Size(100, 100));
547 host_impl_->SetViewportSize(gfx::Size(50, 50)); 547 host_impl_->SetViewportSize(gfx::Size(50, 50));
548 DrawFrame(); 548 DrawFrame();
549 549
550 // We should not crash if the tree is replaced while we are scrolling. 550 // We should not crash if the tree is replaced while we are scrolling.
551 EXPECT_EQ(InputHandler::ScrollStarted, 551 EXPECT_EQ(InputHandler::ScrollStarted,
(...skipping 6015 matching lines...) Expand 10 before | Expand all | Expand 10 after
6567 FakePictureLayerImpl* active_mask_content = 6567 FakePictureLayerImpl* active_mask_content =
6568 static_cast<FakePictureLayerImpl*>( 6568 static_cast<FakePictureLayerImpl*>(
6569 host_impl_->active_tree()->root_layer()->children()[0]->mask_layer()); 6569 host_impl_->active_tree()->root_layer()->children()[0]->mask_layer());
6570 gfx::Rect r2 = active_mask_content->visible_rect_for_tile_priority(); 6570 gfx::Rect r2 = active_mask_content->visible_rect_for_tile_priority();
6571 6571
6572 ASSERT_TRUE(!r2.IsEmpty()); 6572 ASSERT_TRUE(!r2.IsEmpty());
6573 } 6573 }
6574 6574
6575 } // namespace 6575 } // namespace
6576 } // namespace cc 6576 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698