summaryrefslogtreecommitdiffstats
path: root/webkit/glue/dom_serializer_unittest.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-30 16:55:27 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-30 16:55:27 +0000
commit26aa04898e37692f354a9f97df01ff1fc7bbb14e (patch)
treed83f599bdc5083646ea70aec4c6906707e671b71 /webkit/glue/dom_serializer_unittest.cc
parentfbc805556ed3f7e15718313907481821ef6908b4 (diff)
downloadchromium_src-26aa04898e37692f354a9f97df01ff1fc7bbb14e.zip
chromium_src-26aa04898e37692f354a9f97df01ff1fc7bbb14e.tar.gz
chromium_src-26aa04898e37692f354a9f97df01ff1fc7bbb14e.tar.bz2
Hook up webkit/api/public/WebView.h
This change does not completely eliminate webkit/glue/webview.h. Instead, the old WebView extends from the new WebView temporarily as we complete the transition. R=dglazkov BUG=10033 TEST=none Review URL: http://codereview.chromium.org/257001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27620 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/dom_serializer_unittest.cc')
-rw-r--r--webkit/glue/dom_serializer_unittest.cc21
1 files changed, 9 insertions, 12 deletions
diff --git a/webkit/glue/dom_serializer_unittest.cc b/webkit/glue/dom_serializer_unittest.cc
index b6eb8f7..f62f01fb 100644
--- a/webkit/glue/dom_serializer_unittest.cc
+++ b/webkit/glue/dom_serializer_unittest.cc
@@ -108,14 +108,13 @@ class DomSerializerTests : public TestShellTest,
test_shell_->ResetTestController();
// If input encoding is empty, use UTF-8 as default encoding.
if (encoding_info.isEmpty()) {
- test_shell_->webView()->GetMainFrame()->loadHTMLString(contents,
- base_url);
+ test_shell_->webView()->mainFrame()->loadHTMLString(contents, base_url);
} else {
// Do not use WebFrame.LoadHTMLString because it assumes that input
// html contents use UTF-8 encoding.
// TODO(darin): This should use WebFrame::loadData.
WebFrameImpl* web_frame =
- static_cast<WebFrameImpl*>(test_shell_->webView()->GetMainFrame());
+ static_cast<WebFrameImpl*>(test_shell_->webView()->mainFrame());
ASSERT_TRUE(web_frame != NULL);
int len = static_cast<int>(contents.size());
RefPtr<WebCore::SharedBuffer> buf(
@@ -265,7 +264,7 @@ TEST_F(DomSerializerTests, SerialzeHTMLDOMWithDocType) {
web_frame->frame()->loader()->encoding());
// Make sure serialized contents still have document type.
web_frame =
- static_cast<WebFrameImpl*>(test_shell_->webView()->GetMainFrame());
+ static_cast<WebFrameImpl*>(test_shell_->webView()->mainFrame());
doc = web_frame->frame()->document();
ASSERT_TRUE(doc->doctype() != NULL);
}
@@ -297,7 +296,7 @@ TEST_F(DomSerializerTests, SerialzeHTMLDOMWithoutDocType) {
web_frame->frame()->loader()->encoding());
// Make sure serialized contents do not have document type.
web_frame =
- static_cast<WebFrameImpl*>(test_shell_->webView()->GetMainFrame());
+ static_cast<WebFrameImpl*>(test_shell_->webView()->mainFrame());
doc = web_frame->frame()->document();
ASSERT_TRUE(doc->doctype() == NULL);
}
@@ -399,7 +398,7 @@ TEST_F(DomSerializerTests, SerialzeHTMLDOMWithNoMetaCharsetInOriginalDoc) {
// Make sure the first child of HEAD element is META which has charset
// declaration in serialized contents.
web_frame =
- static_cast<WebFrameImpl*>(test_shell_->webView()->GetMainFrame());
+ static_cast<WebFrameImpl*>(test_shell_->webView()->mainFrame());
ASSERT_TRUE(web_frame != NULL);
doc = web_frame->frame()->document();
ASSERT_TRUE(doc->isHTMLDocument());
@@ -467,7 +466,7 @@ TEST_F(DomSerializerTests,
// Make sure only first child of HEAD element is META which has charset
// declaration in serialized contents.
web_frame =
- static_cast<WebFrameImpl*>(test_shell_->webView()->GetMainFrame());
+ static_cast<WebFrameImpl*>(test_shell_->webView()->mainFrame());
ASSERT_TRUE(web_frame != NULL);
doc = web_frame->frame()->document();
ASSERT_TRUE(doc->isHTMLDocument());
@@ -718,8 +717,7 @@ TEST_F(DomSerializerTests, SerialzeHTMLDOMWithBaseTag) {
// Make sure all links are absolute URLs and doc there are some number of
// BASE tags in serialized HTML data. Each of those BASE tags have same base
// URL which is as same as URL of current test file.
- web_frame =
- static_cast<WebFrameImpl*>(test_shell_->webView()->GetMainFrame());
+ web_frame = static_cast<WebFrameImpl*>(test_shell_->webView()->mainFrame());
ASSERT_TRUE(web_frame != NULL);
doc = web_frame->frame()->document();
ASSERT_TRUE(doc->isHTMLDocument());
@@ -772,7 +770,7 @@ TEST_F(DomSerializerTests, SerialzeHTMLDOMWithEmptyHead) {
// Make sure the head tag is empty.
WebFrameImpl* web_frame =
- static_cast<WebFrameImpl*>(test_shell_->webView()->GetMainFrame());
+ static_cast<WebFrameImpl*>(test_shell_->webView()->mainFrame());
ASSERT_TRUE(web_frame != NULL);
WebCore::Document* doc = web_frame->frame()->document();
ASSERT_TRUE(doc->isHTMLDocument());
@@ -791,8 +789,7 @@ TEST_F(DomSerializerTests, SerialzeHTMLDOMWithEmptyHead) {
// Reload serialized contents and make sure there is only one META tag.
LoadContents(serialized_contents, file_url,
web_frame->frame()->loader()->encoding());
- web_frame =
- static_cast<WebFrameImpl*>(test_shell_->webView()->GetMainFrame());
+ web_frame = static_cast<WebFrameImpl*>(test_shell_->webView()->mainFrame());
ASSERT_TRUE(web_frame != NULL);
doc = web_frame->frame()->document();
ASSERT_TRUE(doc->isHTMLDocument());