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

Unified Diff: Source/web/tests/WebPageSerializerTest.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/WebPageNewSerializerTest.cpp ('k') | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebPageSerializerTest.cpp
diff --git a/Source/web/tests/WebPageSerializerTest.cpp b/Source/web/tests/WebPageSerializerTest.cpp
index 2e10985cde772baa78288a52611d0123a69fb339..e5014ccadf689e9d92f5f0aa6d79d239151df57a 100644
--- a/Source/web/tests/WebPageSerializerTest.cpp
+++ b/Source/web/tests/WebPageSerializerTest.cpp
@@ -79,7 +79,12 @@
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();
}
static bool webVectorContains(const WebVector<WebURL>& vector, const char* url)
@@ -155,6 +160,12 @@
WebString::fromUTF8("awesome.png"));
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();
// Retrieve all resources.
WebVector<WebURL> frames;
« no previous file with comments | « Source/web/tests/WebPageNewSerializerTest.cpp ('k') | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698