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

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

Issue 61553006: Rename WebKit namespace to blink (part 5) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/compositor/test/default_context_factory.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 (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/bind.h" 6 #include "base/bind.h"
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 593
594 DISALLOW_COPY_AND_ASSIGN(LayerWithNullDelegateTest); 594 DISALLOW_COPY_AND_ASSIGN(LayerWithNullDelegateTest);
595 }; 595 };
596 596
597 class FakeTexture : public Texture { 597 class FakeTexture : public Texture {
598 public: 598 public:
599 FakeTexture(bool flipped, const gfx::Size& size, float device_scale_factor) 599 FakeTexture(bool flipped, const gfx::Size& size, float device_scale_factor)
600 : Texture(flipped, size, device_scale_factor) {} 600 : Texture(flipped, size, device_scale_factor) {}
601 601
602 virtual unsigned int PrepareTexture() OVERRIDE { return 0; } 602 virtual unsigned int PrepareTexture() OVERRIDE { return 0; }
603 virtual WebKit::WebGraphicsContext3D* HostContext3D() OVERRIDE { 603 virtual blink::WebGraphicsContext3D* HostContext3D() OVERRIDE {
604 return NULL; 604 return NULL;
605 } 605 }
606 606
607 protected: 607 protected:
608 virtual ~FakeTexture() {} 608 virtual ~FakeTexture() {}
609 }; 609 };
610 610
611 TEST_F(LayerWithNullDelegateTest, SwitchLayerPreservesCCLayerState) { 611 TEST_F(LayerWithNullDelegateTest, SwitchLayerPreservesCCLayerState) {
612 scoped_ptr<Layer> l1(CreateColorLayer(SK_ColorRED, 612 scoped_ptr<Layer> l1(CreateColorLayer(SK_ColorRED,
613 gfx::Rect(20, 20, 400, 400))); 613 gfx::Rect(20, 20, 400, 400)));
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
1446 l1->SetOpacity(0.5f); 1446 l1->SetOpacity(0.5f);
1447 1447
1448 // Change l1's cc::Layer. 1448 // Change l1's cc::Layer.
1449 l1->SwitchCCLayerForTest(); 1449 l1->SwitchCCLayerForTest();
1450 1450
1451 // Ensure that the opacity animation completed. 1451 // Ensure that the opacity animation completed.
1452 EXPECT_FLOAT_EQ(l1->opacity(), 0.5f); 1452 EXPECT_FLOAT_EQ(l1->opacity(), 0.5f);
1453 } 1453 }
1454 1454
1455 } // namespace ui 1455 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/compositor/test/default_context_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698