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

Side by Side Diff: ui/gfx/compositor/layer_unittest.cc

Issue 9845017: Fix a few warnings that -Wnull-conversion of a future clang will complain about. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 8 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 | « net/base/x509_util_mac.cc ('k') | webkit/plugins/npapi/webplugin_delegate_impl_mac.mm » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 } 358 }
359 359
360 class LayerWithDelegateTest : public testing::Test, public CompositorDelegate { 360 class LayerWithDelegateTest : public testing::Test, public CompositorDelegate {
361 public: 361 public:
362 LayerWithDelegateTest() : schedule_draw_invoked_(false) {} 362 LayerWithDelegateTest() : schedule_draw_invoked_(false) {}
363 virtual ~LayerWithDelegateTest() {} 363 virtual ~LayerWithDelegateTest() {}
364 364
365 // Overridden from testing::Test: 365 // Overridden from testing::Test:
366 virtual void SetUp() OVERRIDE { 366 virtual void SetUp() OVERRIDE {
367 ui::SetupTestCompositor(); 367 ui::SetupTestCompositor();
368 compositor_.reset(new Compositor(this, NULL, gfx::Size(1000, 1000))); 368 compositor_.reset(new Compositor(
369 this, gfx::kNullAcceleratedWidget, gfx::Size(1000, 1000)));
369 } 370 }
370 371
371 virtual void TearDown() OVERRIDE { 372 virtual void TearDown() OVERRIDE {
372 } 373 }
373 374
374 Compositor* compositor() { return compositor_.get(); } 375 Compositor* compositor() { return compositor_.get(); }
375 376
376 virtual Layer* CreateLayer(LayerType type) { 377 virtual Layer* CreateLayer(LayerType type) {
377 return new Layer(type); 378 return new Layer(type);
378 } 379 }
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 EXPECT_TRUE(schedule_draw_invoked_); 1015 EXPECT_TRUE(schedule_draw_invoked_);
1015 // Because SchedulePaint() was invoked from OnPaintLayer() |child| should 1016 // Because SchedulePaint() was invoked from OnPaintLayer() |child| should
1016 // still need to be painted. 1017 // still need to be painted.
1017 DrawTree(root.get()); 1018 DrawTree(root.get());
1018 EXPECT_EQ(1, child_delegate.GetPaintCountAndClear()); 1019 EXPECT_EQ(1, child_delegate.GetPaintCountAndClear());
1019 EXPECT_TRUE(child_delegate.last_clip_rect().Contains( 1020 EXPECT_TRUE(child_delegate.last_clip_rect().Contains(
1020 gfx::Rect(10, 10, 30, 30))); 1021 gfx::Rect(10, 10, 30, 30)));
1021 } 1022 }
1022 1023
1023 } // namespace ui 1024 } // namespace ui
OLDNEW
« no previous file with comments | « net/base/x509_util_mac.cc ('k') | webkit/plugins/npapi/webplugin_delegate_impl_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698