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/title_command.h" | 5 #include "chrome/test/webdriver/commands/title_command.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "chrome/test/webdriver/commands/response.h" | 9 #include "chrome/test/webdriver/commands/response.h" |
10 #include "chrome/test/webdriver/session.h" | 10 #include "chrome/test/webdriver/session.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 return true; | 22 return true; |
23 } | 23 } |
24 | 24 |
25 void TitleCommand::ExecuteGet(Response* const response) { | 25 void TitleCommand::ExecuteGet(Response* const response) { |
26 std::string title; | 26 std::string title; |
27 Error* error = session_->GetTitle(&title); | 27 Error* error = session_->GetTitle(&title); |
28 if (error) { | 28 if (error) { |
29 response->SetError(error); | 29 response->SetError(error); |
30 return; | 30 return; |
31 } | 31 } |
32 response->SetValue(new StringValue(title)); | 32 response->SetValue(base::StringValue::New(title)); |
33 } | 33 } |
34 | 34 |
35 } // namespace webdriver | 35 } // namespace webdriver |
OLD | NEW |