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

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

Issue 2315363003: [chromedriver] Ensure GetLog works even if the current tab is closed. (Closed)
Patch Set: rebase and remove unused variable Created 4 years, 3 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/session_commands.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/test/run_py_tests.py
diff --git a/chrome/test/chromedriver/test/run_py_tests.py b/chrome/test/chromedriver/test/run_py_tests.py
index f8f0302260db2f029309f0ad111b3411c17762c9..d6ef6153da554e1d7d9e5fbeffc544911753de93 100755
--- a/chrome/test/chromedriver/test/run_py_tests.py
+++ b/chrome/test/chromedriver/test/run_py_tests.py
@@ -852,6 +852,15 @@ class ChromeDriverTest(ChromeDriverBaseTestWithWebServer):
self.assertEqual('console-api', new_logs[0][0]['source'])
self.assertTrue('RepeatedError' in new_logs[0][0]['message'])
+ def testGetLogOnClosedWindow(self):
+ self._driver.Load(self.GetHttpUrlForFile('/chromedriver/page_test.html'))
+ self._driver.FindElement('id', 'link').Click()
+ self._driver.CloseWindow()
+ try:
+ self._driver.GetLog('browser')
+ except chromedriver.ChromeDriverException as e:
+ self.fail('exception while calling GetLog on a closed tab: ' + e.message)
+
def testAutoReporting(self):
self.assertFalse(self._driver.IsAutoReporting())
self._driver.SetAutoReporting(True)
« no previous file with comments | « chrome/test/chromedriver/session_commands.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698