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

Side by Side Diff: third_party/WebKit/Source/web/PageOverlayTest.cpp

Issue 2494333002: Replace wrapUnique(new T(args)) by makeUnique<T>(args) in Blink (Closed)
Patch Set: Drop redundant WTF:: Created 4 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
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/PageOverlay.h" 5 #include "web/PageOverlay.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "platform/graphics/Color.h" 8 #include "platform/graphics/Color.h"
9 #include "platform/graphics/GraphicsContext.h" 9 #include "platform/graphics/GraphicsContext.h"
10 #include "platform/graphics/paint/DrawingRecorder.h" 10 #include "platform/graphics/paint/DrawingRecorder.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 : disableAcceleratedCompositing); 78 : disableAcceleratedCompositing);
79 webViewImpl()->resize(WebSize(viewportWidth, viewportHeight)); 79 webViewImpl()->resize(WebSize(viewportWidth, viewportHeight));
80 webViewImpl()->updateAllLifecyclePhases(); 80 webViewImpl()->updateAllLifecyclePhases();
81 ASSERT_EQ(compositingMode == AcceleratedCompositing, 81 ASSERT_EQ(compositingMode == AcceleratedCompositing,
82 webViewImpl()->isAcceleratedCompositingActive()); 82 webViewImpl()->isAcceleratedCompositingActive());
83 } 83 }
84 84
85 WebViewImpl* webViewImpl() const { return m_helper.webView(); } 85 WebViewImpl* webViewImpl() const { return m_helper.webView(); }
86 86
87 std::unique_ptr<PageOverlay> createSolidYellowOverlay() { 87 std::unique_ptr<PageOverlay> createSolidYellowOverlay() {
88 return PageOverlay::create( 88 return PageOverlay::create(webViewImpl()->mainFrameImpl(),
89 webViewImpl()->mainFrameImpl(), 89 makeUnique<SolidColorOverlay>(SK_ColorYELLOW));
90 wrapUnique(new SolidColorOverlay(SK_ColorYELLOW)));
91 } 90 }
92 91
93 template <typename OverlayType> 92 template <typename OverlayType>
94 void runPageOverlayTestWithAcceleratedCompositing(); 93 void runPageOverlayTestWithAcceleratedCompositing();
95 94
96 private: 95 private:
97 FrameTestHelpers::WebViewHelper m_helper; 96 FrameTestHelpers::WebViewHelper m_helper;
98 }; 97 };
99 98
100 template <bool (*getter)(), void (*setter)(bool)> 99 template <bool (*getter)(), void (*setter)(bool)>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 initialize(AcceleratedCompositing); 151 initialize(AcceleratedCompositing);
153 std::unique_ptr<PageOverlay> pageOverlay = createSolidYellowOverlay(); 152 std::unique_ptr<PageOverlay> pageOverlay = createSolidYellowOverlay();
154 pageOverlay->update(); 153 pageOverlay->update();
155 webViewImpl()->updateAllLifecyclePhases(); 154 webViewImpl()->updateAllLifecyclePhases();
156 EXPECT_EQ(LayoutRect(0, 0, viewportWidth, viewportHeight), 155 EXPECT_EQ(LayoutRect(0, 0, viewportWidth, viewportHeight),
157 pageOverlay->visualRect()); 156 pageOverlay->visualRect());
158 } 157 }
159 158
160 } // namespace 159 } // namespace
161 } // namespace blink 160 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/LinkHighlightImplTest.cpp ('k') | third_party/WebKit/Source/web/WebNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698