| 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);
|
|
|