Index: third_party/WebKit/Source/web/tests/VisualViewportTest.cpp |
diff --git a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp |
index de41d3e91ce8ecd9b5bb46b2f2c9ee33fae80b21..0a6758d3f0c2d5e29755c430ad8546c204d21430 100644 |
--- a/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp |
+++ b/third_party/WebKit/Source/web/tests/VisualViewportTest.cpp |
@@ -425,9 +425,10 @@ TEST_P(ParameterizedVisualViewportTest, TestWebViewResizedBeforeAttachment) |
// Make sure that a resize that comes in while there's no root layer is |
// honoured when we attach to the layer tree. |
- webViewImpl()->setRootGraphicsLayer(nullptr); |
+ WebFrameWidget* mainFrameWidget = static_cast<WebFrameWidget*>(webViewImpl()->mainFrame()->toWebLocalFrame()->frameWidget()); |
+ mainFrameWidget->setRootGraphicsLayer(nullptr); |
webViewImpl()->resize(IntSize(320, 240)); |
- webViewImpl()->setRootGraphicsLayer(rootGraphicsLayer); |
+ mainFrameWidget->setRootGraphicsLayer(rootGraphicsLayer); |
navigateTo("about:blank"); |
webViewImpl()->updateAllLifecyclePhases(); |