Index: chrome/test/chromedriver/commands.cc |
diff --git a/chrome/test/chromedriver/commands.cc b/chrome/test/chromedriver/commands.cc |
index 756bf549c702f9dd4fbd1ac13dc8a4eaaa47426b..af71207cadbeb775634f65905cbec78f5d5133b8 100644 |
--- a/chrome/test/chromedriver/commands.cc |
+++ b/chrome/test/chromedriver/commands.cc |
@@ -194,6 +194,12 @@ void ExecuteSessionCommandOnSessionThread( |
<< (result.length() ? " " + result : ""); |
} |
+ if (status.IsOk() && session->auto_reporting_enabled) { |
+ std::string message = session->GetFirstBrowserError(); |
+ if (!message.empty()) |
+ status = Status(kUnknownError, message); |
+ } |
+ |
cmd_task_runner->PostTask( |
FROM_HERE, |
base::Bind(callback_on_cmd, status, base::Passed(&value), session->id)); |