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

Unified Diff: Source/web/tests/WebPageNewSerializerTest.cpp

Issue 272143002: Revert of Fix webkit_unit_tests to use the threaded parser and enable everywhere. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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
« no previous file with comments | « Source/web/tests/WebFrameTest.cpp ('k') | Source/web/tests/WebPageSerializerTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebPageNewSerializerTest.cpp
diff --git a/Source/web/tests/WebPageNewSerializerTest.cpp b/Source/web/tests/WebPageNewSerializerTest.cpp
index 72390d3c3df3df9bc50de625584a61603533a3be..6b9488c73b5cc89ceaaeac908b74b34823991651 100644
--- a/Source/web/tests/WebPageNewSerializerTest.cpp
+++ b/Source/web/tests/WebPageNewSerializerTest.cpp
@@ -159,7 +159,16 @@
void loadURLInTopFrame(const WebURL& url)
{
- FrameTestHelpers::loadFrame(m_helper.webView()->mainFrame(), url.string().utf8());
+ WebURLRequest urlRequest;
+ urlRequest.initialize();
+ urlRequest.setURL(url);
+ m_helper.webView()->mainFrame()->loadRequest(urlRequest);
+ // Make sure any pending request get served.
+ Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests();
+ // Some requests get delayed, run the timer.
+ runPendingTasks();
+ // Server the delayed resources.
+ Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests();
}
const WebString& htmlMimeType() const { return m_htmlMimeType; }
@@ -210,6 +219,12 @@
registerMockedURLLoad(toKURL("http://www.test.com/blue_background.png"), WebString::fromUTF8("blue_background.png"), WebString::fromUTF8("pageserializer/"), pngMimeType());
loadURLInTopFrame(topFrameURL);
+ // OBJECT/EMBED have some delay to start to load their content. The first
+ // serveAsynchronousMockedRequests call in loadURLInTopFrame() finishes
+ // before the start.
+ RefPtrWillBeRawPtr<Document> document = static_cast<PassRefPtrWillBeRawPtr<Document> >(webView()->mainFrame()->document());
+ document->updateLayoutIgnorePendingStylesheets(Document::RunPostLayoutTasksSynchronously);
+ Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests();
WebVector<WebPageSerializer::Resource> resources;
WebPageSerializer::serialize(webView(), &resources);
« no previous file with comments | « Source/web/tests/WebFrameTest.cpp ('k') | Source/web/tests/WebPageSerializerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698