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

Unified Diff: Source/WebKit/chromium/tests/WebFrameTest.cpp

Issue 14550002: Making GraphicsContext the owner of PlatformContext. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixing tests and addressing comments. Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: Source/WebKit/chromium/tests/WebFrameTest.cpp
diff --git a/Source/WebKit/chromium/tests/WebFrameTest.cpp b/Source/WebKit/chromium/tests/WebFrameTest.cpp
index f74b411b6df28e1239931d265fdb063e4fd7638f..2212fa6e84d874cd3b2905e7caa0fb70f5d01fc6 100644
--- a/Source/WebKit/chromium/tests/WebFrameTest.cpp
+++ b/Source/WebKit/chromium/tests/WebFrameTest.cpp
@@ -847,11 +847,11 @@ TEST_F(WebFrameTest, pageScaleFactorScalesPaintClip)
bitmap.eraseColor(0);
SkCanvas canvas(bitmap);
- WebCore::PlatformContextSkia platformContext(&canvas);
- platformContext.setTrackOpaqueRegion(true);
- WebCore::GraphicsContext context(&platformContext);
+ WebCore::GraphicsContext context(&canvas);
+ WebCore::PlatformContextSkia* platformContext = context.platformContext();
+ platformContext->setTrackOpaqueRegion(true);
- EXPECT_EQ_RECT(WebCore::IntRect(0, 0, 0, 0), platformContext.opaqueRegion().asRect());
+ EXPECT_EQ_RECT(WebCore::IntRect(0, 0, 0, 0), platformContext->opaqueRegion().asRect());
WebCore::FrameView* view = static_cast<WebViewImpl*>(m_webView)->mainFrameImpl()->frameView();
WebCore::IntRect paintRect(0, 0, 200, 200);
@@ -860,7 +860,7 @@ TEST_F(WebFrameTest, pageScaleFactorScalesPaintClip)
int viewportWidthMinusScrollbar = 50 - (view->verticalScrollbar()->isOverlayScrollbar() ? 0 : 15);
int viewportHeightMinusScrollbar = 50 - (view->horizontalScrollbar()->isOverlayScrollbar() ? 0 : 15);
WebCore::IntRect clippedRect(0, 0, viewportWidthMinusScrollbar * 2, viewportHeightMinusScrollbar * 2);
- EXPECT_EQ_RECT(clippedRect, platformContext.opaqueRegion().asRect());
+ EXPECT_EQ_RECT(clippedRect, platformContext->opaqueRegion().asRect());
}
TEST_F(WebFrameTest, CanOverrideMaximumScaleFactor)

Powered by Google App Engine
This is Rietveld 408576698