Index: content/renderer/dom_serializer_browsertest.cc |
diff --git a/content/renderer/dom_serializer_browsertest.cc b/content/renderer/dom_serializer_browsertest.cc |
index a726d9cea77e8e8556ab77bb78acae6a9fbf46a2..0b74e4ab0c65493ae1561b5dd4288444e833abfa 100644 |
--- a/content/renderer/dom_serializer_browsertest.cc |
+++ b/content/renderer/dom_serializer_browsertest.cc |
@@ -34,11 +34,11 @@ |
#include "third_party/WebKit/public/web/WebDocument.h" |
#include "third_party/WebKit/public/web/WebElement.h" |
#include "third_party/WebKit/public/web/WebElementCollection.h" |
+#include "third_party/WebKit/public/web/WebFrameSerializer.h" |
+#include "third_party/WebKit/public/web/WebFrameSerializerClient.h" |
#include "third_party/WebKit/public/web/WebLocalFrame.h" |
#include "third_party/WebKit/public/web/WebMetaElement.h" |
#include "third_party/WebKit/public/web/WebNode.h" |
-#include "third_party/WebKit/public/web/WebPageSerializer.h" |
-#include "third_party/WebKit/public/web/WebPageSerializerClient.h" |
#include "third_party/WebKit/public/web/WebView.h" |
using blink::WebCString; |
@@ -48,10 +48,10 @@ using blink::WebElement; |
using blink::WebMetaElement; |
using blink::WebElementCollection; |
using blink::WebFrame; |
+using blink::WebFrameSerializer; |
+using blink::WebFrameSerializerClient; |
using blink::WebLocalFrame; |
using blink::WebNode; |
-using blink::WebPageSerializer; |
-using blink::WebPageSerializerClient; |
using blink::WebString; |
using blink::WebURL; |
using blink::WebView; |
@@ -79,7 +79,7 @@ class LoadObserver : public RenderViewObserver { |
}; |
class DomSerializerTests : public ContentBrowserTest, |
- public WebPageSerializerClient { |
+ public WebFrameSerializerClient { |
public: |
DomSerializerTests() : serialization_reported_end_of_data_(false) {} |
@@ -98,7 +98,7 @@ class DomSerializerTests : public ContentBrowserTest, |
// DomSerializerDelegate. |
void didSerializeDataForFrame(const WebCString& data, |
- PageSerializationStatus status) override { |
+ FrameSerializationStatus status) override { |
// Check finish status of current frame. |
ASSERT_FALSE(serialization_reported_end_of_data_); |
@@ -106,7 +106,7 @@ class DomSerializerTests : public ContentBrowserTest, |
serialized_contents_ += data; |
// Current frame is completed saving, change the finish status. |
- if (status == WebPageSerializerClient::CurrentFrameIsFinished) |
+ if (status == WebFrameSerializerClient::CurrentFrameIsFinished) |
serialization_reported_end_of_data_ = true; |
} |
@@ -168,9 +168,9 @@ class DomSerializerTests : public ContentBrowserTest, |
std::vector<std::pair<WebURL, WebString>> url_to_local_path; |
url_to_local_path.push_back(std::make_pair(WebURL(frame_url), file_path)); |
// Start serializing DOM. |
- bool result = WebPageSerializer::serialize( |
+ bool result = WebFrameSerializer::serialize( |
web_frame->toWebLocalFrame(), |
- static_cast<WebPageSerializerClient*>(this), url_to_local_path); |
+ static_cast<WebFrameSerializerClient*>(this), url_to_local_path); |
ASSERT_TRUE(result); |
} |
@@ -223,7 +223,7 @@ class DomSerializerTests : public ContentBrowserTest, |
const GURL& file_url, const std::string& original_contents) { |
// Make sure original contents does not have MOTW; |
std::string motw_declaration = |
- WebPageSerializer::generateMarkOfTheWebDeclaration(file_url).utf8(); |
+ WebFrameSerializer::generateMarkOfTheWebDeclaration(file_url).utf8(); |
ASSERT_FALSE(motw_declaration.empty()); |
// The encoding of original contents is ISO-8859-1, so we convert the MOTW |
// declaration to ASCII and search whether original contents has it or not. |
@@ -369,7 +369,7 @@ class DomSerializerTests : public ContentBrowserTest, |
// Because we add MOTW when serializing DOM, so before comparison, we also |
// need to add MOTW to original_contents. |
std::string original_str = |
- WebPageSerializer::generateMarkOfTheWebDeclaration(file_url).utf8(); |
+ WebFrameSerializer::generateMarkOfTheWebDeclaration(file_url).utf8(); |
original_str += original_contents; |
// Since WebCore now inserts a new HEAD element if there is no HEAD element |
// when creating BODY element. (Please see |
@@ -383,7 +383,7 @@ class DomSerializerTests : public ContentBrowserTest, |
pos += htmlTag.length(); |
std::string head_part("<head>"); |
head_part += |
- WebPageSerializer::generateMetaCharsetDeclaration(encoding).utf8(); |
+ WebFrameSerializer::generateMetaCharsetDeclaration(encoding).utf8(); |
head_part += "</head>"; |
original_str.insert(pos, head_part); |
} |
@@ -418,7 +418,7 @@ class DomSerializerTests : public ContentBrowserTest, |
// Compare the serialized contents with original contents to make sure |
// they are same. |
std::string original_str = |
- WebPageSerializer::generateMarkOfTheWebDeclaration(file_url).utf8(); |
+ WebFrameSerializer::generateMarkOfTheWebDeclaration(file_url).utf8(); |
original_str += original_contents; |
if (!doc.isNull()) { |
WebString encoding = web_frame->document().encoding(); |
@@ -428,7 +428,7 @@ class DomSerializerTests : public ContentBrowserTest, |
pos += htmlTag.length(); |
std::string head_part("<head>"); |
head_part += |
- WebPageSerializer::generateMetaCharsetDeclaration(encoding).utf8(); |
+ WebFrameSerializer::generateMetaCharsetDeclaration(encoding).utf8(); |
head_part += "</head>"; |
original_str.insert(pos, head_part); |
} |