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

Unified Diff: chrome/test/chromedriver/run_py_tests.py

Issue 12978003: [chromedriver] Fix 3 bugs about web view, window handle and target window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 years, 9 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/chromedriver/commands.cc ('k') | chrome/test/chromedriver/session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/run_py_tests.py
diff --git a/chrome/test/chromedriver/run_py_tests.py b/chrome/test/chromedriver/run_py_tests.py
index 8dcecfbfee3c3045a3852af1c962d7ab4b9ea1ae..9f9a8fc834a42a4f4e0d71a7489ca461656090b0 100755
--- a/chrome/test/chromedriver/run_py_tests.py
+++ b/chrome/test/chromedriver/run_py_tests.py
@@ -154,11 +154,9 @@ class ChromeDriverTest(ChromeDriverBaseTest):
while time.time() < timeout:
new_handles = self._driver.GetWindowHandles()
if len(new_handles) > len(old_handles):
- for old_handle in old_handles:
- self.assertTrue(old_handle in new_handles)
- new_handles.remove(old_handle)
- self.assertTrue(len(new_handles))
- return new_handles[0]
+ for index, old_handle in enumerate(old_handles):
+ self.assertEquals(old_handle, new_handles[index])
+ return new_handles[len(old_handles)]
time.sleep(0.01)
return None
« no previous file with comments | « chrome/test/chromedriver/commands.cc ('k') | chrome/test/chromedriver/session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698