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

Unified Diff: third_party/WebKit/Source/web/tests/WebPageSerializerTest.cpp

Issue 1373573002: ABANDONED: OOPIFs: Moving stitching of local paths from renderer to browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@page-serialization-recursive-begone
Patch Set: Rebasing... Created 5 years, 2 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: third_party/WebKit/Source/web/tests/WebPageSerializerTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebPageSerializerTest.cpp b/third_party/WebKit/Source/web/tests/WebPageSerializerTest.cpp
index afc35c70e12af2d68fb2a723defbb3db9176c244..ec3c2f33d61d43243b659da8f63410262ea15b5c 100644
--- a/third_party/WebKit/Source/web/tests/WebPageSerializerTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebPageSerializerTest.cpp
@@ -43,6 +43,7 @@
#include "public/web/WebPageSerializerClient.h"
#include "public/web/WebView.h"
#include "web/tests/FrameTestHelpers.h"
+#include "wtf/Assertions.h"
#include <gtest/gtest.h>
using blink::Document;
@@ -56,11 +57,24 @@ public:
std::string toString() const { return m_string; }
private:
- void didSerializeDataForFrame(const WebURL&, const WebCString& data, PageSerializationStatus) final
+ void writeHtmlFragment(const WebCString& data) override { m_string += data; }
+
+ void writeLocalPathForSubframe(const WebFrame& subframe) override
+ {
+ // SimpleWebPageSerializerClient is currently only used in tests
+ // of pages without subframes.
+ ASSERT_NOT_REACHED();
+ }
+
+ void writeLocalPathForSavableResource(const WebURL& savableResourceURL) override
{
- m_string += data;
+ // SimpleWebPageSerializerClient is currently only used in tests
+ // of pages without subresources.
+ ASSERT_NOT_REACHED();
}
+ void endOfFrame() override {}
+
std::string m_string;
};
@@ -181,7 +195,7 @@ TEST_F(WebPageSerializerTest, fromUrlWithMinusMinus)
SimpleWebPageSerializerClient serializerClient;
WebVector<WebURL> links(&topFrameURL, 1);
WebVector<WebString> localPaths(&"local", 1);
- WebPageSerializer::serialize(webView()->mainFrame()->toWebLocalFrame(), &serializerClient, links, localPaths, "");
+ WebPageSerializer::serialize(webView()->mainFrame()->toWebLocalFrame(), &serializerClient);
EXPECT_EQ("<!-- saved from url=(0030)http://www.test.com/?-%2Dx-%2D -->", serializerClient.toString().substr(1, 60));
}
« no previous file with comments | « third_party/WebKit/Source/web/WebPageSerializerImpl.cpp ('k') | third_party/WebKit/public/web/WebPageSerializer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698