| Index: chrome/test/nacl/nacl_browsertest_util.cc
|
| diff --git a/chrome/test/nacl/nacl_browsertest_util.cc b/chrome/test/nacl/nacl_browsertest_util.cc
|
| index 1b2730f454f272fa3c792c4620ebef78919c8882..24e8494aed459517bc5d8b684e975ebbcb9a410d 100644
|
| --- a/chrome/test/nacl/nacl_browsertest_util.cc
|
| +++ b/chrome/test/nacl/nacl_browsertest_util.cc
|
| @@ -25,26 +25,14 @@ typedef content::TestMessageHandler::MessageResponse MessageResponse;
|
| MessageResponse StructuredMessageHandler::HandleMessage(
|
| const std::string& json) {
|
| base::JSONReader reader(base::JSON_ALLOW_TRAILING_COMMAS);
|
| - // Automation messages are stringified before they are sent because the
|
| - // automation channel cannot handle arbitrary objects. This means we
|
| - // need to decode the json twice to get the original message.
|
| std::unique_ptr<base::Value> value = reader.ReadToValue(json);
|
| if (!value.get())
|
| return InternalError("Could parse automation JSON: " + json +
|
| " because " + reader.GetErrorMessage());
|
|
|
| - std::string temp;
|
| - if (!value->GetAsString(&temp))
|
| - return InternalError("Message was not a string: " + json);
|
| -
|
| - value = reader.ReadToValue(temp);
|
| - if (!value.get())
|
| - return InternalError("Could not parse message JSON: " + temp +
|
| - " because " + reader.GetErrorMessage());
|
| -
|
| base::DictionaryValue* msg;
|
| if (!value->GetAsDictionary(&msg))
|
| - return InternalError("Message was not an object: " + temp);
|
| + return InternalError("Message was not an object: " + json);
|
|
|
| std::string type;
|
| if (!msg->GetString("type", &type))
|
|
|