| Index: third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp b/third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp
|
| index 3d2e288b0b278ceca3aa95c41f5f5f6b7f17969f..a6f6466c9062084f9b9a7ff2641e96aa99733420 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "core/frame/FrameHost.h"
|
| #include "core/html/HTMLIFrameElement.h"
|
| +#include "core/loader/FrameLoaderStateMachine.h"
|
| #include "platform/graphics/test/FakeGraphicsLayerFactory.h"
|
| #include "platform/scroll/ScrollbarTheme.h"
|
|
|
| @@ -61,12 +62,14 @@ void RenderingTest::TearDown()
|
|
|
| Document& RenderingTest::setupChildIframe(const AtomicString& iframeElementId, const String& htmlContentOfIframe)
|
| {
|
| -
|
| HTMLIFrameElement& iframe = *toHTMLIFrameElement(document().getElementById(iframeElementId));
|
| m_childFrameLoaderClient = FrameLoaderClientWithParent::create(document().frame());
|
| m_subframe = LocalFrame::create(m_childFrameLoaderClient.get(), document().frame()->host(), &iframe);
|
| m_subframe->setView(FrameView::create(m_subframe.get(), IntSize(500, 500)));
|
| m_subframe->init();
|
| + // Some tests directly inject content into the initial empty document.
|
| + // Unmark it so that unforced layout would also run on the document.
|
| + m_subframe->loader().stateMachine()->advanceTo(FrameLoaderStateMachine::CommittedFirstRealLoad);
|
| m_subframe->view()->setParentVisible(true);
|
| m_subframe->view()->setSelfVisible(true);
|
| static_cast<SingleChildFrameLoaderClient*>(document().frame()->client())->setChild(m_subframe.get());
|
|
|