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

Unified Diff: chrome/test/webdriver/chromedriver_tests.py

Issue 7139001: In chromedriver, add /log url (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 6 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/webdriver/automation.cc ('k') | chrome/test/webdriver/commands/create_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/webdriver/chromedriver_tests.py
diff --git a/chrome/test/webdriver/chromedriver_tests.py b/chrome/test/webdriver/chromedriver_tests.py
index 94f15928e52866fc34e6044da3164ef9520670f3..28892e2c6bdab1c577d9cacefb42394ed6891882 100755
--- a/chrome/test/webdriver/chromedriver_tests.py
+++ b/chrome/test/webdriver/chromedriver_tests.py
@@ -503,6 +503,31 @@ class ElementEqualityTest(unittest.TestCase):
self.assertTrue(result['value'])
+class LoggingTest(unittest.TestCase):
+
+ def setUp(self):
+ self._launcher = ChromeDriverLauncher(root_path=os.path.dirname(__file__))
+
+ def tearDown(self):
+ self._launcher.Kill()
+
+ def testNoVerboseLogging(self):
+ self._driver = WebDriver(self._launcher.GetURL(), {})
+ self._driver.execute_script('console.log("HI")')
+ request_url = self._launcher.GetURL() + '/log'
+ req = SendRequest(request_url, method='GET')
+ log = req.read()
+ self.assertTrue(':INFO:' not in log, ':INFO: in log: ' + log)
+
+ def testVerboseLogging(self):
+ self._driver = WebDriver(self._launcher.GetURL(), {'chrome.verbose': True})
+ self._driver.execute_script('console.log("HI")')
+ request_url = self._launcher.GetURL() + '/log'
+ req = SendRequest(request_url, method='GET')
+ log = req.read()
+ self.assertTrue(':INFO:' in log, ':INFO: not in log: ' + log)
+
+
"""Chrome functional test section. All implementation tests of ChromeDriver
should go above.
« no previous file with comments | « chrome/test/webdriver/automation.cc ('k') | chrome/test/webdriver/commands/create_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698