summaryrefslogtreecommitdiffstats
path: root/chrome/test/reliability/page_load_test.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-11 23:29:59 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-11 23:29:59 +0000
commitaa9387daf0c639b82627dc003237023130a8c693 (patch)
tree7e9645ee84ebbac14e9313e84eb1371c1a84d178 /chrome/test/reliability/page_load_test.cc
parent378b4516b5e7970ae1011599ed397b3d03010c7a (diff)
downloadchromium_src-aa9387daf0c639b82627dc003237023130a8c693.zip
chromium_src-aa9387daf0c639b82627dc003237023130a8c693.tar.gz
chromium_src-aa9387daf0c639b82627dc003237023130a8c693.tar.bz2
Get rid of ui_controls.h usage in shipping browser code. In a followup change, I'll move the code to a test directory.
I switched the page_load reliablity test to send synthesized keystrokes instead. I removed the reliablity tag drag tests, since these duplicate the newer interactive_ui_tests. The ChromeDriver method has been deprecated after discussion with kkania. Review URL: https://codereview.chromium.org/11875004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176470 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/reliability/page_load_test.cc')
-rw-r--r--chrome/test/reliability/page_load_test.cc23
1 files changed, 7 insertions, 16 deletions
diff --git a/chrome/test/reliability/page_load_test.cc b/chrome/test/reliability/page_load_test.cc
index c0590d0..ce333e8 100644
--- a/chrome/test/reliability/page_load_test.cc
+++ b/chrome/test/reliability/page_load_test.cc
@@ -353,22 +353,13 @@ class PageLoadTest : public UITest {
if (result == AUTOMATION_MSG_NAVIGATION_SUCCESS) {
if (g_page_down) {
// Page down twice.
- scoped_refptr<BrowserProxy> browser(
- automation()->GetBrowserWindow(0));
- if (browser.get()) {
- scoped_refptr<WindowProxy> window(browser->GetWindow());
- if (window.get()) {
- if (browser->BringToFront()) {
- // Sleep for 2 seconds between commands.
- // This used to be settable but the flag went away.
- base::TimeDelta sleep_time = base::TimeDelta::FromSeconds(2);
- window->SimulateOSKeyPress(ui::VKEY_NEXT, 0);
- base::PlatformThread::Sleep(sleep_time);
- window->SimulateOSKeyPress(ui::VKEY_NEXT, 0);
- base::PlatformThread::Sleep(sleep_time);
- }
- }
- }
+ // Sleep for 2 seconds between commands.
+ // This used to be settable but the flag went away.
+ base::TimeDelta sleep_time = base::TimeDelta::FromSeconds(2);
+ tab_proxy->SimulateKeyPress(ui::VKEY_NEXT);
+ base::PlatformThread::Sleep(sleep_time);
+ tab_proxy->SimulateKeyPress(ui::VKEY_NEXT);
+ base::PlatformThread::Sleep(sleep_time);
}
}
}