summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/render_view_unittest.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-31 18:08:40 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-31 18:08:40 +0000
commit4f999134a2e270792abc8b5ac6ad70aa500dcef4 (patch)
treee90d972ee2f29d10d6e22220d54cd142925bb2bb /chrome/renderer/render_view_unittest.cc
parentb5cd43eb964e452d7a0245b9e14bd9a9d1e89b4a (diff)
downloadchromium_src-4f999134a2e270792abc8b5ac6ad70aa500dcef4.zip
chromium_src-4f999134a2e270792abc8b5ac6ad70aa500dcef4.tar.gz
chromium_src-4f999134a2e270792abc8b5ac6ad70aa500dcef4.tar.bz2
Use WebScriptSource and WebFindInPageRequest from the WebKit API.
This change introduces some helper functions in glue_util.cc for efficient conversion between WebString and WebCore::String when inside the implementation of webkit/glue. This is a temporary change since eventually all code in glue that uses WebCore will be moved into the WebKit API implementation. Instead of making the Chrome automation use WebFindInPageRequest, I decided to introduce AutomationMsg_Find_Params as a copy of the old FindInPageRequest structure. That preserves the IPC protocol and avoids making the automation library depend on WebKit. R=dglazkov Review URL: http://codereview.chromium.org/57060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12881 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_view_unittest.cc')
-rw-r--r--chrome/renderer/render_view_unittest.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/renderer/render_view_unittest.cc b/chrome/renderer/render_view_unittest.cc
index fa26b44..88c4fa7 100644
--- a/chrome/renderer/render_view_unittest.cc
+++ b/chrome/renderer/render_view_unittest.cc
@@ -10,11 +10,14 @@
#include "chrome/renderer/renderer_webkitclient_impl.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebScriptSource.h"
#include "webkit/glue/webframe.h"
-#include "webkit/glue/webscriptsource.h"
#include "webkit/glue/weburlrequest.h"
#include "webkit/glue/webview.h"
+using WebKit::WebScriptSource;
+using WebKit::WebString;
+
namespace {
const int32 kRouteId = 5;
@@ -42,7 +45,7 @@ class RenderViewTest : public testing::Test {
// Executes the given JavaScript in the context of the main frame. The input
// is a NULL-terminated UTF-8 string.
void ExecuteJavaScript(const char* js) {
- GetMainFrame()->ExecuteScript(webkit_glue::WebScriptSource(js));
+ GetMainFrame()->ExecuteScript(WebScriptSource(WebString::fromUTF8(js)));
}
// Loads the given HTML into the main frame as a data: URL.