summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/browser_focus_uitest.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-02 22:44:13 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-02 22:44:13 +0000
commit06bc5d9a46ad798452b317fc47be8acd5ff041c5 (patch)
treefe194e49cf0ea3f31a88b60821abb82c4fe6a853 /chrome/browser/ui/browser_focus_uitest.cc
parent78e2370448246f03b6f795b105746bf82ba5f4f4 (diff)
downloadchromium_src-06bc5d9a46ad798452b317fc47be8acd5ff041c5.zip
chromium_src-06bc5d9a46ad798452b317fc47be8acd5ff041c5.tar.gz
chromium_src-06bc5d9a46ad798452b317fc47be8acd5ff041c5.tar.bz2
Change ExecuteJavaScript* helper functions in browser_test_utils.{h,cc}
to take std::string (UTF-8) instead of std::wstring. This seems to help simplify callsites considerably. TBR=jam@chromium.org BUG=none Review URL: https://chromiumcodereview.appspot.com/11728003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174880 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/browser_focus_uitest.cc')
-rw-r--r--chrome/browser/ui/browser_focus_uitest.cc28
1 files changed, 16 insertions, 12 deletions
diff --git a/chrome/browser/ui/browser_focus_uitest.cc b/chrome/browser/ui/browser_focus_uitest.cc
index 698ff0c..f53588e 100644
--- a/chrome/browser/ui/browser_focus_uitest.cc
+++ b/chrome/browser/ui/browser_focus_uitest.cc
@@ -465,8 +465,9 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest,
focused_browser->window()->Activate();
ASSERT_TRUE(content::ExecuteJavaScript(
- chrome::GetActiveWebContents(unfocused_browser)->GetRenderViewHost(), L"",
- L"stealFocus();"));
+ chrome::GetActiveWebContents(unfocused_browser)->GetRenderViewHost(),
+ "",
+ "stealFocus();"));
// Make sure the first browser is still active.
EXPECT_TRUE(focused_browser->window()->IsActive());
@@ -484,8 +485,9 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, LocationBarLockFocus) {
chrome::FocusLocationBar(browser());
ASSERT_TRUE(content::ExecuteJavaScript(
- chrome::GetActiveWebContents(browser())->GetRenderViewHost(), L"",
- L"stealFocus();"));
+ chrome::GetActiveWebContents(browser())->GetRenderViewHost(),
+ "",
+ "stealFocus();"));
// Make sure the location bar is still focused.
ASSERT_TRUE(IsViewFocused(location_bar_focus_view_id_));
@@ -531,8 +533,8 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversal) {
std::string actual;
ASSERT_TRUE(content::ExecuteJavaScriptAndExtractString(
chrome::GetActiveWebContents(browser())->GetRenderViewHost(),
- L"",
- L"window.domAutomationController.send(getFocusedElement());",
+ "",
+ "window.domAutomationController.send(getFocusedElement());",
&actual));
ASSERT_STREQ(kExpElementIDs[j], actual.c_str());
@@ -604,8 +606,8 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversal) {
std::string actual;
ASSERT_TRUE(content::ExecuteJavaScriptAndExtractString(
chrome::GetActiveWebContents(browser())->GetRenderViewHost(),
- L"",
- L"window.domAutomationController.send(getFocusedElement());",
+ "",
+ "window.domAutomationController.send(getFocusedElement());",
&actual));
ASSERT_STREQ(next_element, actual.c_str());
}
@@ -662,8 +664,9 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversalOnInterstitial) {
// Let's make sure the focus is on the expected element in the page.
std::string actual;
ASSERT_TRUE(content::ExecuteJavaScriptAndExtractString(
- interstitial_page->render_view_host(), L"",
- L"window.domAutomationController.send(getFocusedElement());",
+ interstitial_page->render_view_host(),
+ "",
+ "window.domAutomationController.send(getFocusedElement());",
&actual));
ASSERT_STREQ(kExpElementIDs[j], actual.c_str());
@@ -722,8 +725,9 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversalOnInterstitial) {
// Let's make sure the focus is on the expected element in the page.
std::string actual;
ASSERT_TRUE(content::ExecuteJavaScriptAndExtractString(
- interstitial_page->render_view_host(), L"",
- L"window.domAutomationController.send(getFocusedElement());",
+ interstitial_page->render_view_host(),
+ "",
+ "window.domAutomationController.send(getFocusedElement());",
&actual));
ASSERT_STREQ(kExpElementIDs[6 - j], actual.c_str());
}