diff options
Diffstat (limited to 'chrome/test/reliability/page_load_test.cc')
-rw-r--r-- | chrome/test/reliability/page_load_test.cc | 23 |
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); } } } |