diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-10 05:46:45 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-10 05:46:45 +0000 |
commit | dd7daa80d25deb78ab365e28df4d93437357793b (patch) | |
tree | fb4dd2331820f5e32ddeb7e2bfb731f0604fbc0d /chrome/renderer/render_view_unittest.cc | |
parent | 64c40aa34646a198a04029ee6b78dd9559595dc5 (diff) | |
download | chromium_src-dd7daa80d25deb78ab365e28df4d93437357793b.zip chromium_src-dd7daa80d25deb78ab365e28df4d93437357793b.tar.gz chromium_src-dd7daa80d25deb78ab365e28df4d93437357793b.tar.bz2 |
Switch to WebFrame from the WebKit API.
I tried to avoid unnecessary changes in this CL to help make it easier to
review.
As part of this CL, glue/webtextinput* are folded into WebFrame / WebFrameImpl.
R=dglazkov
BUG=10034
TEST=none
Review URL: http://codereview.chromium.org/164225
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22896 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_view_unittest.cc')
-rw-r--r-- | chrome/renderer/render_view_unittest.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/chrome/renderer/render_view_unittest.cc b/chrome/renderer/render_view_unittest.cc index 135c78d..24bfe2d 100644 --- a/chrome/renderer/render_view_unittest.cc +++ b/chrome/renderer/render_view_unittest.cc @@ -14,6 +14,7 @@ #include "webkit/api/public/WebURLError.h" using WebKit::WebCompositionCommand; +using WebKit::WebFrame; using WebKit::WebTextDirection; using WebKit::WebURLError; @@ -247,8 +248,8 @@ TEST_F(RenderViewTest, ImeComposition) { // Retrieve the content of this page and compare it with the expected // result. const int kMaxOutputCharacters = 128; - std::wstring output; - GetMainFrame()->GetContentAsPlainText(kMaxOutputCharacters, &output); + std::wstring output = UTF16ToWideHack( + GetMainFrame()->contentAsText(kMaxOutputCharacters)); EXPECT_EQ(output, ime_message->result); } } @@ -296,8 +297,8 @@ TEST_F(RenderViewTest, OnSetTextDirection) { // Copy the document content to std::wstring and compare with the // expected result. const int kMaxOutputCharacters = 16; - std::wstring output; - GetMainFrame()->GetContentAsPlainText(kMaxOutputCharacters, &output); + std::wstring output = UTF16ToWideHack( + GetMainFrame()->contentAsText(kMaxOutputCharacters)); EXPECT_EQ(output, kTextDirection[i].expected_result); } } @@ -612,9 +613,8 @@ TEST_F(RenderViewTest, OnHandleKeyboardEvent) { // text created from a virtual-key code, a character code, and the // modifier-key status. const int kMaxOutputCharacters = 1024; - std::wstring output; - GetMainFrame()->GetContentAsPlainText(kMaxOutputCharacters, &output); - + std::wstring output = UTF16ToWideHack( + GetMainFrame()->contentAsText(kMaxOutputCharacters)); EXPECT_EQ(expected_result, output); } } @@ -825,8 +825,8 @@ TEST_F(RenderViewTest, InsertCharacters) { // text created from a virtual-key code, a character code, and the // modifier-key status. const int kMaxOutputCharacters = 4096; - std::wstring output; - GetMainFrame()->GetContentAsPlainText(kMaxOutputCharacters, &output); + std::wstring output = UTF16ToWideHack( + GetMainFrame()->contentAsText(kMaxOutputCharacters)); EXPECT_EQ(kLayouts[i].expected_result, output); } #else @@ -852,15 +852,15 @@ TEST_F(RenderViewTest, DidFailProvisionalLoadWithErrorForError) { #endif TEST_F(RenderViewTest, DidFailProvisionalLoadWithErrorForCancellation) { - GetMainFrame()->SetInViewSourceMode(true); + GetMainFrame()->enableViewSourceMode(true); WebURLError error; error.domain.fromUTF8("test_domain"); error.reason = net::ERR_ABORTED; error.unreachableURL = GURL("http://foo"); WebFrame* web_frame = GetMainFrame(); - WebView* web_view = web_frame->GetView(); + WebView* web_view = web_frame->view(); // A cancellation occurred. view_->DidFailProvisionalLoadWithError(web_view, error, web_frame); // Frame should stay in view-source mode. - EXPECT_TRUE(web_frame->GetInViewSourceMode()); + EXPECT_TRUE(web_frame->isViewSourceModeEnabled()); } |