Index: chrome/test/functional/ui_runner.py |
diff --git a/chrome/test/functional/ui_runner.py b/chrome/test/functional/ui_runner.py |
index fb8bad103fd634b55903ff6dd03f752d316f7520..b7fa5f2cce82f60f2d4eb35bf045a29bb21c7648 100755 |
--- a/chrome/test/functional/ui_runner.py |
+++ b/chrome/test/functional/ui_runner.py |
@@ -92,14 +92,13 @@ class Runner(pyauto.PyUITest): |
window_count, expected_count)) |
def _GrabTab(self): |
- active_window = self.browser.window_position |
- window = self.GetBrowserWindow(active_window) |
tab_count = self.GetTabCount(self.browser.window_position) |
active_tab = self.browser.window.tab_position |
if active_tab >= tab_count: |
self.Error('active tab out of bounds: count: %d expected active: %d' % ( |
(tab_count, active_tab))) |
- return window.GetTab(self.browser.window.tab_position) |
+ return {'tab_index': self.browser.window.tab_position, |
+ 'windex': self.browser.window_position, } |
def _RunInActiveWindow(self, command): |
active_window = self.browser.window_position |
@@ -187,15 +186,15 @@ class Runner(pyauto.PyUITest): |
sys.stdout.write('%d, ' % retries) |
if a == 'navigate': |
target = pyauto.GURL(action.split(';')[1]) |
- nav_result = tab.NavigateToURL(target) |
+ nav_result = self.NavigateToURL(target, **tab) |
elif a == 'back': |
self.browser.Back() |
self.browser.Forward() |
- nav_result = tab.GoBack() |
+ nav_result = self.TabGoBack(**tab) |
elif a == 'forward': |
self.browser.Forward() |
self.browser.Back() |
- nav_result = tab.GoForward() |
+ nav_result = self.TabGoForward(**tab) |
retries += 1 |
if a == 'closetab': |
tab = self._GrabTab() |
@@ -213,7 +212,7 @@ class Runner(pyauto.PyUITest): |
result = actual == tab_count |
return (result, 'TabCount (expected %d, actual %d)' % |
(tab_count, actual)) |
- tab.Close(True) |
+ self.CloseTab(**tab) |
self._WaitFor(WindowCount) |
self._WaitFor(TabCount) |
return False |
@@ -237,7 +236,7 @@ class Runner(pyauto.PyUITest): |
if a == 'restoretab': |
active_window = self.browser.window_position |
self.ApplyAccelerator(pyauto.IDC_RESTORE_TAB, active_window) |
- self._GrabTab().WaitForTabToBeRestored(self.action_max_timeout_ms()) |
+ self.WaitForTabToBeRestored(**self._GrabTab()) |
ui_model.UpdateState(self.browser, action) |
return False |
return True |