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

Unified Diff: chrome/browser/browser_focus_uitest.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
Index: chrome/browser/browser_focus_uitest.cc
===================================================================
--- chrome/browser/browser_focus_uitest.cc (revision 148111)
+++ chrome/browser/browser_focus_uitest.cc (working copy)
@@ -32,6 +32,7 @@
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
+#include "content/public/test/browser_test_utils.h"
#include "net/test/test_server.h"
#if defined(TOOLKIT_VIEWS) || defined(OS_WIN)
@@ -463,7 +464,7 @@
// Activate the first browser.
focused_browser->window()->Activate();
- ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
+ ASSERT_TRUE(content::ExecuteJavaScript(
chrome::GetActiveWebContents(unfocused_browser)->GetRenderViewHost(), L"",
L"stealFocus();"));
@@ -482,7 +483,7 @@
chrome::FocusLocationBar(browser());
- ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
+ ASSERT_TRUE(content::ExecuteJavaScript(
chrome::GetActiveWebContents(browser())->GetRenderViewHost(), L"",
L"stealFocus();"));
@@ -528,7 +529,7 @@
SCOPED_TRACE(base::StringPrintf("inner loop %" PRIuS, j));
// Let's make sure the focus is on the expected element in the page.
std::string actual;
- ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
+ ASSERT_TRUE(content::ExecuteJavaScriptAndExtractString(
chrome::GetActiveWebContents(browser())->GetRenderViewHost(),
L"",
L"window.domAutomationController.send(getFocusedElement());",
@@ -601,7 +602,7 @@
// Let's make sure the focus is on the expected element in the page.
std::string actual;
- ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
+ ASSERT_TRUE(content::ExecuteJavaScriptAndExtractString(
chrome::GetActiveWebContents(browser())->GetRenderViewHost(),
L"",
L"window.domAutomationController.send(getFocusedElement());",
@@ -660,7 +661,7 @@
for (size_t j = 0; j < 7; ++j) {
// Let's make sure the focus is on the expected element in the page.
std::string actual;
- ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
+ ASSERT_TRUE(content::ExecuteJavaScriptAndExtractString(
interstitial_page->render_view_host(), L"",
L"window.domAutomationController.send(getFocusedElement());",
&actual));
@@ -720,7 +721,7 @@
// Let's make sure the focus is on the expected element in the page.
std::string actual;
- ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
+ ASSERT_TRUE(content::ExecuteJavaScriptAndExtractString(
interstitial_page->render_view_host(), L"",
L"window.domAutomationController.send(getFocusedElement());",
&actual));
« no previous file with comments | « chrome/browser/automation/automation_tab_helper_browsertest.cc ('k') | chrome/browser/browser_keyevents_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698