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

Unified Diff: chrome/test/pyautolib/pyautolib.cc

Issue 10383216: Replaced EXPECT_TRUE with a LOG(WARNING) for automation commands to provide more information... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Switched to LOG(FATAL). Created 8 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/pyautolib/pyautolib.cc
diff --git a/chrome/test/pyautolib/pyautolib.cc b/chrome/test/pyautolib/pyautolib.cc
index 33814ac6a2d82a14a1d03041b42812c1375ab53b..91ba9712acb7d89033e137f067dfa901ea46fdd0 100644
--- a/chrome/test/pyautolib/pyautolib.cc
+++ b/chrome/test/pyautolib/pyautolib.cc
@@ -363,16 +363,22 @@ std::string PyUITestBase::_SendJSONRequest(int window_index,
const std::string& request,
int timeout) {
std::string response;
+ bool response_status;
if (window_index < 0) { // Do not need to target a browser window.
- EXPECT_TRUE(automation()->SendJSONRequest(request, timeout, &response));
+ response_status = automation()->SendJSONRequest(request, timeout,
+ &response);
} else {
scoped_refptr<BrowserProxy> browser_proxy =
automation()->GetBrowserWindow(window_index);
EXPECT_TRUE(browser_proxy.get());
if (browser_proxy.get()) {
- EXPECT_TRUE(browser_proxy->SendJSONRequest(request, timeout, &response));
+ response_status = browser_proxy->SendJSONRequest(request, timeout,
+ &response);
}
}
+ if (!response_status) {
+ LOG(FATAL) << "Automation failed: " << request;
Nirnimesh 2012/05/16 19:55:17 No, do not make it fatal. There are tests to verif
+ }
return response;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698