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

Side by Side Diff: third_party/WebKit/Source/web/WebViewImplPaintArtifactCompositorTest.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "web/WebViewImpl.h" 5 #include "web/WebViewImpl.h"
6 6
7 #include "platform/RuntimeEnabledFeatures.h" 7 #include "platform/RuntimeEnabledFeatures.h"
8 #include "platform/graphics/compositing/PaintArtifactCompositor.h" 8 #include "platform/graphics/compositing/PaintArtifactCompositor.h"
9 #include "public/platform/WebLayerTreeView.h" 9 #include "public/platform/WebLayerTreeView.h"
10 #include "public/web/WebViewClient.h" 10 #include "public/web/WebViewClient.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 m_helper.initialize(false, nullptr, &m_webViewClient); 50 m_helper.initialize(false, nullptr, &m_webViewClient);
51 } 51 }
52 52
53 void TearDown() override 53 void TearDown() override
54 { 54 {
55 m_featuresBackup.restore(); 55 m_featuresBackup.restore();
56 } 56 }
57 57
58 MockWebLayerTreeView& webLayerTreeView() { return m_webLayerTreeView; } 58 MockWebLayerTreeView& webLayerTreeView() { return m_webLayerTreeView; }
59 WebViewImpl& webViewImpl() { return *m_helper.webViewImpl(); } 59 WebViewImpl& webViewImpl() { return *m_helper.webViewImpl(); }
60 PaintArtifactCompositor& paintArtifactCompositor() { return webViewImpl().pa intArtifactCompositor(); } 60 PaintArtifactCompositor& getPaintArtifactCompositor() { return webViewImpl() .getPaintArtifactCompositor(); }
61 61
62 private: 62 private:
63 RuntimeEnabledFeatures::Backup m_featuresBackup; 63 RuntimeEnabledFeatures::Backup m_featuresBackup;
64 MockWebLayerTreeView m_webLayerTreeView; 64 MockWebLayerTreeView m_webLayerTreeView;
65 TestWebViewClientWithLayerTreeView m_webViewClient; 65 TestWebViewClientWithLayerTreeView m_webViewClient;
66 FrameTestHelpers::WebViewHelper m_helper; 66 FrameTestHelpers::WebViewHelper m_helper;
67 }; 67 };
68 68
69 TEST_F(WebViewImplPaintArtifactCompositorTest, AttachAndDetach) 69 TEST_F(WebViewImplPaintArtifactCompositorTest, AttachAndDetach)
70 { 70 {
71 cc::Layer* rootLayer = paintArtifactCompositor().rootLayer(); 71 cc::Layer* rootLayer = getPaintArtifactCompositor().rootLayer();
72 ASSERT_TRUE(rootLayer); 72 ASSERT_TRUE(rootLayer);
73 73
74 EXPECT_CALL(webLayerTreeView(), setRootLayer(Property(&WebLayer::ccLayer, ro otLayer))); 74 EXPECT_CALL(webLayerTreeView(), setRootLayer(Property(&WebLayer::ccLayer, ro otLayer)));
75 webViewImpl().attachPaintArtifactCompositor(); 75 webViewImpl().attachPaintArtifactCompositor();
76 testing::Mock::VerifyAndClearExpectations(&webLayerTreeView()); 76 testing::Mock::VerifyAndClearExpectations(&webLayerTreeView());
77 77
78 EXPECT_CALL(webLayerTreeView(), clearRootLayer()); 78 EXPECT_CALL(webLayerTreeView(), clearRootLayer());
79 webViewImpl().detachPaintArtifactCompositor(); 79 webViewImpl().detachPaintArtifactCompositor();
80 testing::Mock::VerifyAndClearExpectations(&webLayerTreeView()); 80 testing::Mock::VerifyAndClearExpectations(&webLayerTreeView());
81 } 81 }
82 82
83 } // namespace 83 } // namespace
84 } // namespace blink 84 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | third_party/WebKit/Source/web/mac/WebSubstringUtil.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698