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

Side by Side Diff: cc/layers/scrollbar_layer_unittest.cc

Issue 16355009: Rewrite scoped_ptr<T>(NULL) to use the default ctor in cc/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix most vexing parse Created 7 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/layers/nine_patch_layer_unittest.cc ('k') | cc/layers/texture_layer_unittest.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "cc/layers/scrollbar_layer.h" 5 #include "cc/layers/scrollbar_layer.h"
6 6
7 #include "cc/animation/scrollbar_animation_controller.h" 7 #include "cc/animation/scrollbar_animation_controller.h"
8 #include "cc/layers/append_quads_data.h" 8 #include "cc/layers/append_quads_data.h"
9 #include "cc/layers/scrollbar_layer_impl.h" 9 #include "cc/layers/scrollbar_layer_impl.h"
10 #include "cc/quads/solid_color_draw_quad.h" 10 #include "cc/quads/solid_color_draw_quad.h"
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 context->getIntegerv(GL_MAX_TEXTURE_SIZE, &max_size); 413 context->getIntegerv(GL_MAX_TEXTURE_SIZE, &max_size);
414 SetScrollbarBounds(gfx::Size(max_size + 100, max_size + 100)); 414 SetScrollbarBounds(gfx::Size(max_size + 100, max_size + 100));
415 RunTest(true, true, true); 415 RunTest(true, true, true);
416 } 416 }
417 417
418 class MockLayerTreeHost : public LayerTreeHost { 418 class MockLayerTreeHost : public LayerTreeHost {
419 public: 419 public:
420 MockLayerTreeHost(LayerTreeHostClient* client, 420 MockLayerTreeHost(LayerTreeHostClient* client,
421 const LayerTreeSettings& settings) 421 const LayerTreeSettings& settings)
422 : LayerTreeHost(client, settings) { 422 : LayerTreeHost(client, settings) {
423 Initialize(scoped_ptr<Thread>(NULL)); 423 Initialize(scoped_ptr<Thread>());
424 } 424 }
425 }; 425 };
426 426
427 427
428 class ScrollbarLayerTestResourceCreation : public testing::Test { 428 class ScrollbarLayerTestResourceCreation : public testing::Test {
429 public: 429 public:
430 ScrollbarLayerTestResourceCreation() 430 ScrollbarLayerTestResourceCreation()
431 : fake_client_(FakeLayerTreeHostClient::DIRECT_3D) {} 431 : fake_client_(FakeLayerTreeHostClient::DIRECT_3D) {}
432 432
433 void TestResourceUpload(size_t expected_resources) { 433 void TestResourceUpload(size_t expected_resources) {
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 576
577 TEST_F(ScaledScrollbarLayerTestResourceCreation, ScaledResourceUpload) { 577 TEST_F(ScaledScrollbarLayerTestResourceCreation, ScaledResourceUpload) {
578 layer_tree_settings_.solid_color_scrollbars = false; 578 layer_tree_settings_.solid_color_scrollbars = false;
579 // Pick a test scale that moves the scrollbar's (non-zero) position to 579 // Pick a test scale that moves the scrollbar's (non-zero) position to
580 // a non-pixel-aligned location. 580 // a non-pixel-aligned location.
581 TestResourceUpload(2, 1.41f); 581 TestResourceUpload(2, 1.41f);
582 } 582 }
583 583
584 } // namespace 584 } // namespace
585 } // namespace cc 585 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/nine_patch_layer_unittest.cc ('k') | cc/layers/texture_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698