| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chromedriver/commands.h" | 5 #include "chrome/test/chromedriver/commands.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 } | 71 } |
| 72 | 72 |
| 73 Status ExecuteQuit( | 73 Status ExecuteQuit( |
| 74 SessionMap* session_map, | 74 SessionMap* session_map, |
| 75 Session* session, | 75 Session* session, |
| 76 const base::DictionaryValue& params, | 76 const base::DictionaryValue& params, |
| 77 scoped_ptr<base::Value>* value) { | 77 scoped_ptr<base::Value>* value) { |
| 78 CHECK(session_map->Remove(session->id)); | 78 CHECK(session_map->Remove(session->id)); |
| 79 return session->chrome->Quit(); | 79 return session->chrome->Quit(); |
| 80 } | 80 } |
| 81 |
| 82 Status ExecuteGet( |
| 83 Session* session, |
| 84 const base::DictionaryValue& params, |
| 85 scoped_ptr<base::Value>* value) { |
| 86 std::string url; |
| 87 if (!params.GetString("url", &url)) |
| 88 return Status(kUnknownError, "'url' must be a string"); |
| 89 return session->chrome->Load(url); |
| 90 } |
| OLD | NEW |