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

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

Issue 3064012: Base implementation of WebDriver for Chrome. This checkin includes... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/test/webdriver/commands/session_with_id.h"
6
7 #include <sstream>
8 #include <string>
9
10 #include "base/values.h"
11 #include "chrome/app/chrome_dll_resource.h"
12 #include "chrome/common/chrome_constants.h"
13 #include "chrome/common/chrome_switches.h"
14
15 namespace webdriver {
16
17 void SessionWithID::ExecuteGet(Response* const response) {
18 DictionaryValue *temp_value = new DictionaryValue();
19
20 temp_value->SetString(std::string("browserName"),
21 std::string("chrome"));
22 temp_value->SetString(std::string("version"),
23 std::string(chrome::kChromeVersion));
24
25 #ifdef OS_MACOSX
26 temp_value->SetString(std::string("platform"), std::string("mac"));
27 #elif OS_WIN32
28 temp_value->SetString(std::string("platform"), std::string("windows"));
29 #elif OS_LINUX && !OS_CHROMEOS
30 temp_value->SetString(std::string("platform"), std::string("linux"));
31 #elif OS_CHROMEOS
32 temp_value->SetString(std::string("platform"), std::string("chromeos"));
33 #else
34 temp_value->SetString(std::string("platform"), std::string("unknown"));
35 #endif
36
37 temp_value->SetBoolean(std::string("javascriptEnabled"), true);
38
39 response->set_status(kSuccess);
40 response->set_value(temp_value);
41 }
42
43 void SessionWithID::ExecuteDelete(Response* const response) {
44 Singleton<SessionManager>::get()->Delete(session_->id());
45 response->set_status(kSuccess);
46 }
47 } // namespace webdriver
48
OLDNEW
« no previous file with comments | « chrome/test/webdriver/commands/session_with_id.h ('k') | chrome/test/webdriver/commands/webdriver_command.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698