Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5479)

Unified Diff: chrome/browser/geolocation/geolocation_browsertest.cc

Issue 10795090: Move ExecuteJavaScript functions from ui_test_utils.h to browser_test_utils.h so they can be reused… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/window_open_apitest.cc ('k') | chrome/browser/instant/instant_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/geolocation/geolocation_browsertest.cc
===================================================================
--- chrome/browser/geolocation/geolocation_browsertest.cc (revision 148111)
+++ chrome/browser/geolocation/geolocation_browsertest.cc (working copy)
@@ -30,6 +30,7 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/test/browser_test_utils.h"
#include "net/base/net_util.h"
#include "net/test/test_server.h"
@@ -69,7 +70,7 @@
script = base::StringPrintf(
"window.domAutomationController.send(getIFrameSrc(%d))", iframe_id);
std::string iframe_src;
- EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
+ EXPECT_TRUE(content::ExecuteJavaScriptAndExtractString(
chrome::GetActiveWebContents(browser)->GetRenderViewHost(),
L"", UTF8ToWide(script), &iframe_src));
iframe_url_ = GURL(iframe_src);
@@ -327,7 +328,7 @@
std::string script = base::StringPrintf(
"window.domAutomationController.send(%s)", function.c_str());
std::string result;
- ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
+ ASSERT_TRUE(content::ExecuteJavaScriptAndExtractString(
web_contents->GetRenderViewHost(),
iframe_xpath_, UTF8ToWide(script), &result));
EXPECT_EQ(expected, result);
@@ -620,7 +621,7 @@
"window.domAutomationController.send(geoSetFinalPosition(%f, %f))",
final_position_latitude, final_position_longitude);
std::string js_result;
- EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
+ EXPECT_TRUE(content::ExecuteJavaScriptAndExtractString(
chrome::GetActiveWebContents(current_browser_)->GetRenderViewHost(),
L"", UTF8ToWide(script), &js_result));
EXPECT_EQ(js_result, "ok");
@@ -659,7 +660,7 @@
"window.domAutomationController.setAutomationId(0);"
"window.domAutomationController.send(window.close());";
bool result =
- ui_test_utils::ExecuteJavaScript(
+ content::ExecuteJavaScript(
chrome::GetActiveWebContents(current_browser_)->GetRenderViewHost(),
L"", UTF8ToWide(script));
EXPECT_EQ(result, true);
« no previous file with comments | « chrome/browser/extensions/window_open_apitest.cc ('k') | chrome/browser/instant/instant_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698