| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/test/webdriver/commands/webdriver_command.h" | 5 #include "chrome/test/webdriver/commands/webdriver_command.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 Error* error = session_->BeforeExecuteCommand(); | 44 Error* error = session_->BeforeExecuteCommand(); |
| 45 if (error) { | 45 if (error) { |
| 46 response->SetError(error); | 46 response->SetError(error); |
| 47 return false; | 47 return false; |
| 48 } | 48 } |
| 49 response->SetField("sessionId", Value::CreateStringValue(session_id)); | 49 response->SetField("sessionId", Value::CreateStringValue(session_id)); |
| 50 return true; | 50 return true; |
| 51 } | 51 } |
| 52 | 52 |
| 53 void WebDriverCommand::Finish() { |
| 54 scoped_ptr<Error> error(session_->AfterExecuteCommand()); |
| 55 if (error.get()) { |
| 56 LOG(WARNING) << "Command did not finish successfully: " |
| 57 << error->GetErrorMessage(); |
| 58 } |
| 59 } |
| 60 |
| 53 } // namespace webdriver | 61 } // namespace webdriver |
| OLD | NEW |