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

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: another attempt to fix tests 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 2e9b253d93c91c7faa096fc4c3a1c8d7e6a5d08c..41e72c69703149fe4d9dd96b19b50da1acf39476 100644
--- a/third_party/WebKit/Source/core/testing/DummyPageHolder.cpp
+++ b/third_party/WebKit/Source/core/testing/DummyPageHolder.cpp
@@ -36,6 +36,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 {
@@ -85,6 +86,9 @@ DummyPageHolder::DummyPageHolder(
m_frame->setView(FrameView::create(m_frame.get(), initialViewSize));
m_frame->view()->page()->frameHost().visualViewport().setSize(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()
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp ('k') | third_party/WebKit/Source/web/WebFrameContentDumper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698