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

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

Issue 10534163: First pass at refactoring pyautolib in preparation for removing proxy dependencies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Applied Nirnimesh's suggestions. Created 8 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
Index: chrome/test/functional/test_pyauto.py
diff --git a/chrome/test/functional/test_pyauto.py b/chrome/test/functional/test_pyauto.py
index 6742ab96e670c3b6a1220e033b3456a79a41824f..acff46b6721d24ffb23b79eeb11d631d2357ee1b 100755
--- a/chrome/test/functional/test_pyauto.py
+++ b/chrome/test/functional/test_pyauto.py
@@ -42,6 +42,15 @@ class PyAutoTest(pyauto.PyUITest):
pyauto_errors.JSONInterfaceError,
lambda: self.FindInPage('some text', windex=1)) # invalid window
+ def testJSONInterfaceTimeout(self):
+ """Verify that an exception is raised when the JSON interface times out."""
+ self.ClearEventQueue()
+ self.AddDomEventObserver('foo')
+ self.assertRaises(
+ pyauto_errors.JSONInterfaceError,
+ lambda: self.GetNextEvent(timeout=2000)) # event queue is empty
+
+
if __name__ == '__main__':
pyauto_functional.Main()

Powered by Google App Engine
This is Rietveld 408576698