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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp

Issue 1774943003: blink: Rename platform/ methods to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-platform: rebase-yayyyyyyyy Created 4 years, 9 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "platform/graphics/compositing/PaintArtifactCompositor.h" 5 #include "platform/graphics/compositing/PaintArtifactCompositor.h"
6 6
7 #include "cc/layers/layer.h" 7 #include "cc/layers/layer.h"
8 #include "cc/layers/layer_settings.h" 8 #include "cc/layers/layer_settings.h"
9 #include "platform/RuntimeEnabledFeatures.h" 9 #include "platform/RuntimeEnabledFeatures.h"
10 #include "platform/graphics/paint/PaintArtifact.h" 10 #include "platform/graphics/paint/PaintArtifact.h"
(...skipping 22 matching lines...) Expand all
33 33
34 // Delay constructing the compositor until after the feature is set. 34 // Delay constructing the compositor until after the feature is set.
35 m_paintArtifactCompositor = adoptPtr(new PaintArtifactCompositor); 35 m_paintArtifactCompositor = adoptPtr(new PaintArtifactCompositor);
36 } 36 }
37 37
38 void TearDown() override 38 void TearDown() override
39 { 39 {
40 m_featuresBackup.restore(); 40 m_featuresBackup.restore();
41 } 41 }
42 42
43 PaintArtifactCompositor& paintArtifactCompositor() { return *m_paintArtifact Compositor; } 43 PaintArtifactCompositor& getPaintArtifactCompositor() { return *m_paintArtif actCompositor; }
44 cc::Layer* rootLayer() { return m_paintArtifactCompositor->rootLayer(); } 44 cc::Layer* rootLayer() { return m_paintArtifactCompositor->rootLayer(); }
45 void update(const PaintArtifact& artifact) { m_paintArtifactCompositor->upda te(artifact); } 45 void update(const PaintArtifact& artifact) { m_paintArtifactCompositor->upda te(artifact); }
46 46
47 private: 47 private:
48 RuntimeEnabledFeatures::Backup m_featuresBackup; 48 RuntimeEnabledFeatures::Backup m_featuresBackup;
49 OwnPtr<PaintArtifactCompositor> m_paintArtifactCompositor; 49 OwnPtr<PaintArtifactCompositor> m_paintArtifactCompositor;
50 }; 50 };
51 51
52 TEST_F(PaintArtifactCompositorTest, EmptyPaintArtifact) 52 TEST_F(PaintArtifactCompositorTest, EmptyPaintArtifact)
53 { 53 {
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 update(artifact.build()); 317 update(artifact.build());
318 318
319 ASSERT_EQ(1u, rootLayer()->children().size()); 319 ASSERT_EQ(1u, rootLayer()->children().size());
320 EXPECT_EQ(layer, rootLayer()->child_at(0)); 320 EXPECT_EQ(layer, rootLayer()->child_at(0));
321 EXPECT_EQ(gfx::Size(400, 300), layer->bounds()); 321 EXPECT_EQ(gfx::Size(400, 300), layer->bounds());
322 EXPECT_EQ(translation(50, 100), layer->transform()); 322 EXPECT_EQ(translation(50, 100), layer->transform());
323 } 323 }
324 324
325 } // namespace 325 } // namespace
326 } // namespace blink 326 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698