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

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

Issue 1924043002: Switch the inheritance of WebViewClient from WebWidgetClient to protected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, fix new test Created 4 years, 7 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/PageOverlay.h" 5 #include "web/PageOverlay.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/layout/LayoutView.h" 8 #include "core/layout/LayoutView.h"
9 #include "platform/graphics/Color.h" 9 #include "platform/graphics/Color.h"
10 #include "platform/graphics/GraphicsContext.h" 10 #include "platform/graphics/GraphicsContext.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 Color m_color; 64 Color m_color;
65 }; 65 };
66 66
67 class PageOverlayTest : public ::testing::Test { 67 class PageOverlayTest : public ::testing::Test {
68 protected: 68 protected:
69 enum CompositingMode { AcceleratedCompositing, UnacceleratedCompositing }; 69 enum CompositingMode { AcceleratedCompositing, UnacceleratedCompositing };
70 70
71 void initialize(CompositingMode compositingMode) 71 void initialize(CompositingMode compositingMode)
72 { 72 {
73 m_helper.initialize( 73 m_helper.initialize(
74 false /* enableJavascript */, nullptr /* webFrameClient */, nullptr /* webViewClient */, 74 false /* enableJavascript */, nullptr /* webFrameClient */, nullptr /* webViewClient */, nullptr /* webWidgetClient */,
75 compositingMode == AcceleratedCompositing ? enableAcceleratedComposi ting : disableAcceleratedCompositing); 75 compositingMode == AcceleratedCompositing ? enableAcceleratedComposi ting : disableAcceleratedCompositing);
76 webViewImpl()->resize(WebSize(viewportWidth, viewportHeight)); 76 webViewImpl()->resize(WebSize(viewportWidth, viewportHeight));
77 webViewImpl()->updateAllLifecyclePhases(); 77 webViewImpl()->updateAllLifecyclePhases();
78 ASSERT_EQ(compositingMode == AcceleratedCompositing, webViewImpl()->isAc celeratedCompositingActive()); 78 ASSERT_EQ(compositingMode == AcceleratedCompositing, webViewImpl()->isAc celeratedCompositingActive());
79 } 79 }
80 80
81 WebViewImpl* webViewImpl() const { return m_helper.webViewImpl(); } 81 WebViewImpl* webViewImpl() const { return m_helper.webViewImpl(); }
82 82
83 PassOwnPtr<PageOverlay> createSolidYellowOverlay() 83 PassOwnPtr<PageOverlay> createSolidYellowOverlay()
84 { 84 {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 { 143 {
144 initialize(AcceleratedCompositing); 144 initialize(AcceleratedCompositing);
145 OwnPtr<PageOverlay> pageOverlay = createSolidYellowOverlay(); 145 OwnPtr<PageOverlay> pageOverlay = createSolidYellowOverlay();
146 pageOverlay->update(); 146 pageOverlay->update();
147 webViewImpl()->updateAllLifecyclePhases(); 147 webViewImpl()->updateAllLifecyclePhases();
148 EXPECT_EQ(LayoutRect(0, 0, viewportWidth, viewportHeight), pageOverlay->visu alRect()); 148 EXPECT_EQ(LayoutRect(0, 0, viewportWidth, viewportHeight), pageOverlay->visu alRect());
149 } 149 }
150 150
151 } // namespace 151 } // namespace
152 } // namespace blink 152 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698