Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: chrome/test/webdriver/commands/title_command.cc

Issue 6523032: Even more test cleanup. Some fixes to non-test code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <string> 5 #include <string>
6 6
7 #include "chrome/test/webdriver/commands/title_command.h" 7 #include "chrome/test/webdriver/commands/title_command.h"
8 8
9 namespace webdriver { 9 namespace webdriver {
10 10
11 TitleCommand::TitleCommand(const std::vector<std::string>& path_segments,
12 const DictionaryValue* const parameters)
13 : WebDriverCommand(path_segments, parameters) {}
14
15 TitleCommand::~TitleCommand() {}
16
17 bool TitleCommand::DoesGet() {
18 return true;
19 }
20
11 void TitleCommand::ExecuteGet(Response* const response) { 21 void TitleCommand::ExecuteGet(Response* const response) {
12 std::string title; 22 std::string title;
13 if (!session_->GetTabTitle(&title)) { 23 if (!session_->GetTabTitle(&title)) {
14 SET_WEBDRIVER_ERROR(response, "GetTabTitle failed", kInternalServerError); 24 SET_WEBDRIVER_ERROR(response, "GetTabTitle failed", kInternalServerError);
15 return; 25 return;
16 } 26 }
17 27
18 response->set_value(new StringValue(title)); 28 response->set_value(new StringValue(title));
19 response->set_status(kSuccess); 29 response->set_status(kSuccess);
20 } 30 }
21 31
32 bool TitleCommand::RequiresValidTab() {
33 return true;
34 }
35
22 } // namespace webdriver 36 } // namespace webdriver
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698