| Index: Source/web/PageOverlayTest.cpp
|
| diff --git a/Source/web/PageOverlayTest.cpp b/Source/web/PageOverlayTest.cpp
|
| index 9e738b47bfee30039f488bd34f85c787a3d478aa..84b76e683583ac14752394a9d57158fe32af6d1a 100644
|
| --- a/Source/web/PageOverlayTest.cpp
|
| +++ b/Source/web/PageOverlayTest.cpp
|
| @@ -14,7 +14,6 @@
|
| #include "public/platform/Platform.h"
|
| #include "public/platform/WebCanvas.h"
|
| #include "public/platform/WebThread.h"
|
| -#include "public/web/WebPageOverlay.h"
|
| #include "public/web/WebSettings.h"
|
| #include "third_party/skia/include/core/SkBitmap.h"
|
| #include "third_party/skia/include/core/SkCanvas.h"
|
| @@ -22,6 +21,7 @@
|
| #include "third_party/skia/include/core/SkPaint.h"
|
| #include "web/WebGraphicsContextImpl.h"
|
| #include "web/WebLocalFrameImpl.h"
|
| +#include "web/WebPageOverlay.h"
|
| #include "web/WebViewImpl.h"
|
| #include "web/tests/FrameTestHelpers.h"
|
| #include <gmock/gmock.h>
|
| @@ -61,7 +61,7 @@ protected:
|
| webViewImpl()->resize(WebSize(viewportWidth, viewportHeight));
|
| webViewImpl()->layout();
|
| ASSERT_EQ(compositingMode == AcceleratedCompositing, webViewImpl()->isAcceleratedCompositingActive());
|
| - ASSERT_TRUE(!webViewImpl()->pageOverlays() || webViewImpl()->pageOverlays()->empty());
|
| + ASSERT_TRUE(!webViewImpl()->pageOverlay());
|
| }
|
|
|
| WebViewImpl* webViewImpl() const { return m_helper.webViewImpl(); }
|
| @@ -142,7 +142,7 @@ void PageOverlayTest::runPageOverlayTestWithUnacceleratedCompositing()
|
|
|
| OverlayType overlay(SK_ColorYELLOW);
|
| webViewImpl()->addPageOverlay(&overlay, 0 /* zOrder */);
|
| - EXPECT_TRUE(webViewImpl()->pageOverlays() && !webViewImpl()->pageOverlays()->empty());
|
| + EXPECT_TRUE(webViewImpl()->pageOverlay());
|
| webViewImpl()->layout();
|
|
|
| MockCanvas canvas(viewportWidth, viewportHeight);
|
| @@ -183,7 +183,7 @@ void PageOverlayTest::runPageOverlayTestWithAcceleratedCompositing()
|
|
|
| OverlayType overlay(SK_ColorYELLOW);
|
| webViewImpl()->addPageOverlay(&overlay, 0 /* zOrder */);
|
| - EXPECT_TRUE(webViewImpl()->pageOverlays() && !webViewImpl()->pageOverlays()->empty());
|
| + EXPECT_TRUE(webViewImpl()->pageOverlay());
|
| webViewImpl()->layout();
|
|
|
| // Ideally, we would get results from the compositor that showed that this
|
| @@ -194,7 +194,7 @@ void PageOverlayTest::runPageOverlayTestWithAcceleratedCompositing()
|
| EXPECT_CALL(canvas, onDrawRect(_, _)).Times(AtLeast(0));
|
| EXPECT_CALL(canvas, onDrawRect(SkRect::MakeWH(viewportWidth, viewportHeight), Property(&SkPaint::getColor, SK_ColorYELLOW)));
|
|
|
| - GraphicsLayer* graphicsLayer = webViewImpl()->pageOverlays()->graphicsLayerForTesting();
|
| + GraphicsLayer* graphicsLayer = webViewImpl()->pageOverlay()->graphicsLayer();
|
| WebRect rect(0, 0, viewportWidth, viewportHeight);
|
| if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
|
| // If slimming paint is on, we paint the layer with a null canvas to get
|
|
|