Index: Source/web/tests/WebPageSerializerTest.cpp |
diff --git a/Source/web/tests/WebPageSerializerTest.cpp b/Source/web/tests/WebPageSerializerTest.cpp |
index e5014ccadf689e9d92f5f0aa6d79d239151df57a..2e10985cde772baa78288a52611d0123a69fb339 100644 |
--- a/Source/web/tests/WebPageSerializerTest.cpp |
+++ b/Source/web/tests/WebPageSerializerTest.cpp |
@@ -79,12 +79,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(); |
+ FrameTestHelpers::loadFrame(m_helper.webView()->mainFrame(), url.string().utf8()); |
} |
static bool webVectorContains(const WebVector<WebURL>& vector, const char* url) |
@@ -160,12 +155,6 @@ TEST_F(WebPageSerializerTest, MultipleFrames) |
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; |