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

Unified Diff: chrome/test/pyautolib/pyauto.py

Issue 10855161: Improve pyautolib errors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/webrtc_brutality_test.py ('k') | chrome/test/pyautolib/pyauto_errors.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/pyautolib/pyauto.py
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py
index 1d7b46ffe97f2c97178dd8d71a725c14c8dc7815..21dbf9ceede5d36c8a962f296551011532b28f94 100755
--- a/chrome/test/pyautolib/pyauto.py
+++ b/chrome/test/pyautolib/pyauto.py
@@ -84,6 +84,7 @@ import history_info
import omnibox_info
import plugins_info
import prefs_info
+from pyauto_errors import AutomationCommandFail
from pyauto_errors import JavascriptRuntimeError
from pyauto_errors import JSONInterfaceError
from pyauto_errors import NTPThumbnailNotShownError
@@ -1103,7 +1104,10 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
additional_info))
ret_dict = json.loads(result)
if ret_dict.has_key('error'):
- raise JSONInterfaceError(ret_dict['error'])
+ if ret_dict.get('is_interface_error'):
+ raise JSONInterfaceError(ret_dict['error'])
+ else:
+ raise AutomationCommandFail(ret_dict['error'])
return ret_dict
def NavigateToURL(self, url, windex=0, tab_index=None, navigation_count=1):
« no previous file with comments | « chrome/test/functional/webrtc_brutality_test.py ('k') | chrome/test/pyautolib/pyauto_errors.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698