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

Unified Diff: third_party/WebKit/Source/core/testing/DummyPageHolder.cpp

Issue 1397713004: Don't bother layout until first navigation is done. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move the check to Document::updateLayoutTree Created 4 years, 10 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: third_party/WebKit/Source/core/testing/DummyPageHolder.cpp
diff --git a/third_party/WebKit/Source/core/testing/DummyPageHolder.cpp b/third_party/WebKit/Source/core/testing/DummyPageHolder.cpp
index 9a6696d9f19bb6e56a18f89af168c73c467582ae..defaee6652c88b9625a8728d7a741deceadc9d44 100644
--- a/third_party/WebKit/Source/core/testing/DummyPageHolder.cpp
+++ b/third_party/WebKit/Source/core/testing/DummyPageHolder.cpp
@@ -35,6 +35,7 @@
#include "core/frame/LocalFrame.h"
#include "core/frame/Settings.h"
#include "core/loader/EmptyClients.h"
+#include "core/loader/FrameLoaderStateMachine.h"
#include "wtf/Assertions.h"
namespace blink {
@@ -83,6 +84,9 @@ DummyPageHolder::DummyPageHolder(
m_frame = LocalFrame::create(m_frameLoaderClient.get(), &m_page->frameHost(), 0);
m_frame->setView(FrameView::create(m_frame.get(), initialViewSize));
m_frame->init();
+ // Some tests directly inject content into the initial empty document.
+ // Unmark it so that unforced layout would also run on the document.
+ m_frame->loader().stateMachine()->advanceTo(FrameLoaderStateMachine::CommittedFirstRealLoad);
}
DummyPageHolder::~DummyPageHolder()

Powered by Google App Engine
This is Rietveld 408576698