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

Unified Diff: chrome/browser/browser_focus_uitest.cc

Issue 101013: Migrating the SSL UI tests to be browser tests (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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 | « no previous file | chrome/browser/ssl/ssl_browser_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_focus_uitest.cc
===================================================================
--- chrome/browser/browser_focus_uitest.cc (revision 14732)
+++ chrome/browser/browser_focus_uitest.cc (working copy)
@@ -264,11 +264,12 @@
// Now let's press tab to move the focus.
for (int j = 0; j < 7; ++j) {
// Let's make sure the focus is on the expected element in the page.
- ui_test_utils::JavaScriptRunner js_runner(
+ std::string actual;
+ ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
browser()->GetSelectedTabContents()->AsWebContents(),
L"",
- L"window.domAutomationController.send(getFocusedElement());");
- std::string actual = js_runner.Run();
+ L"window.domAutomationController.send(getFocusedElement());",
+ &actual));
ASSERT_STREQ(kExpElementIDs[j], actual.c_str());
ui_controls::SendKeyPressNotifyWhenDone(L'\t', false, false, false,
@@ -300,11 +301,12 @@
::Sleep(kActionDelayMs);
// Let's make sure the focus is on the expected element in the page.
- ui_test_utils::JavaScriptRunner js_runner(
+ std::string actual;
+ ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
browser()->GetSelectedTabContents()->AsWebContents(),
L"",
- L"window.domAutomationController.send(getFocusedElement());");
- std::string actual = js_runner.Run();
+ L"window.domAutomationController.send(getFocusedElement());",
+ &actual));
ASSERT_STREQ(kExpElementIDs[6 - j], actual.c_str());
}
« no previous file with comments | « no previous file | chrome/browser/ssl/ssl_browser_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698