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