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

Unified Diff: chrome/test/functional/translate.py

Issue 10830193: Remove SWIGged use of BrowserProxy and TabProxy from PyAuto tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Used named arguments and deleted unused test files, as suggested by Nirnimesh. Created 8 years, 4 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 | « chrome/test/functional/sync.py ('k') | chrome/test/functional/ui_model.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/translate.py
diff --git a/chrome/test/functional/translate.py b/chrome/test/functional/translate.py
index 986f0a198cfd20f1a76ca598f616ab94bc7e5f15..66ec222030976238d9bb0acfe7d056ebe092105d 100755
--- a/chrome/test/functional/translate.py
+++ b/chrome/test/functional/translate.py
@@ -212,7 +212,7 @@ class TranslateTest(pyauto.PyUITest):
translate_info = self.GetTranslateInfo()
self.assertTrue(translate_info['page_translated'])
# Reload the tab and confirm the page was translated.
- self.GetBrowserWindow(0).GetTab(0).Reload()
+ self.ReloadTab()
self.assertTrue(self.WaitForInfobarCount(1))
success = self.WaitUntilTranslateComplete()
# Sometimes the translation fails. Continue clicking until it succeeds.
@@ -225,7 +225,7 @@ class TranslateTest(pyauto.PyUITest):
self.assertTrue(translate_info['page_translated'])
self.assertFalse('translate_bar' in translate_info)
# Reload the tab and confirm that the page has not been translated.
- self.GetBrowserWindow(0).GetTab(0).Reload()
+ self.ReloadTab()
translate_info = self.GetTranslateInfo()
self.assertFalse(translate_info['page_translated'])
self.assertTrue('translate_bar' in translate_info)
@@ -267,7 +267,7 @@ class TranslateTest(pyauto.PyUITest):
self.assertFalse('translate_bar' in self.GetTranslateInfo())
# Go back to the page that should be translated and assert that the
# translate bar re-appears.
- self.GetBrowserWindow(0).GetTab(0).GoBack()
+ self.TabGoBack()
self.assertTrue(self.WaitForInfobarCount(1))
self.assertTrue('translate_bar' in self.GetTranslateInfo())
@@ -276,11 +276,11 @@ class TranslateTest(pyauto.PyUITest):
translate_info = self.GetTranslateInfo()
self.assertFalse('translate_bar' in translate_info)
self._AssertTranslateWorks(trans_url, self.spanish)
- self.GetBrowserWindow(0).GetTab(0).GoBack()
+ self.TabGoBack()
self.assertTrue(self.WaitForInfobarCount(0))
translate_info = self.GetTranslateInfo()
self.assertFalse('translate_bar' in translate_info)
- self.GetBrowserWindow(0).GetTab(0).GoForward()
+ self.TabGoForward()
self.assertTrue(self.WaitForInfobarCount(1))
translate_info = self.GetTranslateInfo()
self.assertTrue(translate_info['can_translate_page'])
@@ -319,7 +319,7 @@ class TranslateTest(pyauto.PyUITest):
# 'Translate' for a language 3 times.
for unused in range(3):
self._ClickTranslateUntilSuccess()
- self.GetBrowserWindow(0).GetTab(0).Reload()
+ self.ReloadTab()
# Click the 'Always Translate' button.
self.assertTrue(self.GetTranslateInfo()\
@@ -342,7 +342,7 @@ class TranslateTest(pyauto.PyUITest):
# 'Nope' for a language 3 times.
for unused in range(3):
self.SelectTranslateOption('decline_translation')
- self.GetBrowserWindow(0).GetTab(0).Reload()
+ self.ReloadTab()
# Click the 'Never Translate' button.
self.assertTrue(self.GetTranslateInfo()\
@@ -372,7 +372,7 @@ class TranslateTest(pyauto.PyUITest):
# Select always translate Spanish to French.
self.SelectTranslateOption('toggle_always_translate')
# Reload the page and assert that the page has been translated to French.
- self.GetBrowserWindow(0).GetTab(0).Reload()
+ self.ReloadTab()
self.WaitUntilTranslateComplete()
translate_info = self.GetTranslateInfo()
self.assertTrue(translate_info['page_translated'])
« no previous file with comments | « chrome/test/functional/sync.py ('k') | chrome/test/functional/ui_model.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698