Chromium Code Reviews| Index: chrome/test/webdriver/webdriver_dispatch.cc |
| diff --git a/chrome/test/webdriver/webdriver_dispatch.cc b/chrome/test/webdriver/webdriver_dispatch.cc |
| index a9dcd4a4ee12cfa2d5f19a4a3f464a11efd32951..27b22a33a5ed7cf3c686a0a019160000fab6cc82 100644 |
| --- a/chrome/test/webdriver/webdriver_dispatch.cc |
| +++ b/chrome/test/webdriver/webdriver_dispatch.cc |
| @@ -174,7 +174,8 @@ void PrepareHttpResponse(const Response& command_response, |
| case kMethodNotAllowed: { |
| const Value* const value = command_response.GetValue(); |
| - if (!value->IsType(Value::TYPE_LIST)) { |
| + ListValue* list_value = const_cast<Value*>(value)->AsList(); |
|
tony
2011/08/24 19:37:51
Rather than const_cast, we should just change the
tfarina
2011/08/24 20:46:51
Done.
|
| + if (!list_value) { |
| // This should never happen. |
| http_response->set_status(HttpResponse::kInternalServerError); |
| http_response->SetBody( |
| @@ -183,8 +184,6 @@ void PrepareHttpResponse(const Response& command_response, |
| return; |
| } |
| - const ListValue* const list_value = |
| - static_cast<const ListValue* const>(value); |
| std::vector<std::string> allowed_methods; |
| for (size_t i = 0; i < list_value->GetSize(); ++i) { |
| std::string method; |