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

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

Issue 271793007: Fix webkit_unit_tests to use the threaded parser and enable everywhere. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add loadHistoryItem wrapper 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
Index: Source/web/tests/WebPageNewSerializerTest.cpp
diff --git a/Source/web/tests/WebPageNewSerializerTest.cpp b/Source/web/tests/WebPageNewSerializerTest.cpp
index 6b9488c73b5cc89ceaaeac908b74b34823991651..401d4ba6cbf19d84a593967948dcf663cce8561d 100644
--- a/Source/web/tests/WebPageNewSerializerTest.cpp
+++ b/Source/web/tests/WebPageNewSerializerTest.cpp
@@ -159,16 +159,7 @@ protected:
void loadURLInTopFrame(const WebURL& url)
{
- 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();
+ FrameTestHelpers::loadFrame(m_helper.webView()->mainFrame(), url.string().utf8());
}
const WebString& htmlMimeType() const { return m_htmlMimeType; }
@@ -219,12 +210,6 @@ TEST_F(WebPageNewSerializeTest, PageWithFrames)
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);
@@ -446,13 +431,6 @@ TEST_F(WebPageNewSerializeTest, SubFrameSerialization)
loadURLInTopFrame(pageUrl);
- // 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<WebURL> localLinks(static_cast<size_t>(2));
WebVector<WebString> localPaths(static_cast<size_t>(2));
localLinks[0] = pageUrl;

Powered by Google App Engine
This is Rietveld 408576698