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 /webkit/tools/test_shell/layout_test_controller.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 'webkit/tools/test_shell/layout_test_controller.cc')
-rw-r--r-- | webkit/tools/test_shell/layout_test_controller.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc index f3754ce..f80262b 100644 --- a/webkit/tools/test_shell/layout_test_controller.cc +++ b/webkit/tools/test_shell/layout_test_controller.cc @@ -14,9 +14,9 @@ #include "base/message_loop.h" #include "base/path_service.h" #include "base/string_util.h" +#include "webkit/api/public/WebFrame.h" #include "webkit/api/public/WebScriptSource.h" #include "webkit/glue/dom_operations.h" -#include "webkit/glue/webframe.h" #include "webkit/glue/webpreferences.h" #include "webkit/glue/webview.h" #include "webkit/tools/test_shell/test_navigation_controller.h" @@ -329,7 +329,7 @@ class WorkItemLoadingScript : public LayoutTestController::WorkItem { public: WorkItemLoadingScript(const string& script) : script_(script) {} bool Run(TestShell* shell) { - shell->webView()->GetMainFrame()->ExecuteScript( + shell->webView()->GetMainFrame()->executeScript( WebScriptSource(WebString::fromUTF8(script_))); return true; // TODO(darin): Did it really start a navigation? } @@ -341,7 +341,7 @@ class WorkItemNonLoadingScript : public LayoutTestController::WorkItem { public: WorkItemNonLoadingScript(const string& script) : script_(script) {} bool Run(TestShell* shell) { - shell->webView()->GetMainFrame()->ExecuteScript( + shell->webView()->GetMainFrame()->executeScript( WebScriptSource(WebString::fromUTF8(script_))); return false; } @@ -380,7 +380,7 @@ class WorkItemLoad : public LayoutTestController::WorkItem { void LayoutTestController::queueLoad( const CppArgumentList& args, CppVariant* result) { if (args.size() > 0 && args[0].isString()) { - GURL current_url = shell_->webView()->GetMainFrame()->GetURL(); + GURL current_url = shell_->webView()->GetMainFrame()->url(); GURL full_url = current_url.Resolve(args[0].ToString()); string target = ""; @@ -532,8 +532,8 @@ void LayoutTestController::execCommand( value = args[2].ToString(); // Note: webkit's version does not return the boolean, so neither do we. - shell_->webView()->GetFocusedFrame()->ExecuteEditCommandByName(command, - value); + shell_->webView()->GetFocusedFrame()->executeCommand( + WebString::fromUTF8(command), WebString::fromUTF8(value)); } result->SetNull(); } @@ -546,7 +546,8 @@ void LayoutTestController::isCommandEnabled( } std::string command = args[0].ToString(); - bool rv = shell_->webView()->GetFocusedFrame()->IsEditCommandEnabled(command); + bool rv = shell_->webView()->GetFocusedFrame()->isCommandEnabled( + WebString::fromUTF8(command)); result->Set(rv); } @@ -802,7 +803,7 @@ void LayoutTestController::evaluateScriptInIsolatedWorld( const CppArgumentList& args, CppVariant* result) { if (args.size() > 0 && args[0].isString()) { WebScriptSource source(WebString::fromUTF8(args[0].ToString())); - shell_->webView()->GetMainFrame()->ExecuteScriptInNewWorld(&source, 1, 1); + shell_->webView()->GetMainFrame()->executeScriptInNewWorld(&source, 1, 1); } result->SetNull(); } |