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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/webdriver/commands/session_with_id.cc
===================================================================
--- chrome/test/webdriver/commands/session_with_id.cc (revision 0)
+++ chrome/test/webdriver/commands/session_with_id.cc (revision 0)
@@ -0,0 +1,48 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/test/webdriver/commands/session_with_id.h"
+
+#include <sstream>
+#include <string>
+
+#include "base/values.h"
+#include "chrome/app/chrome_dll_resource.h"
+#include "chrome/common/chrome_constants.h"
+#include "chrome/common/chrome_switches.h"
+
+namespace webdriver {
+
+void SessionWithID::ExecuteGet(Response* const response) {
+ DictionaryValue *temp_value = new DictionaryValue();
+
+ temp_value->SetString(std::string("browserName"),
+ std::string("chrome"));
+ temp_value->SetString(std::string("version"),
+ std::string(chrome::kChromeVersion));
+
+#ifdef OS_MACOSX
+ temp_value->SetString(std::string("platform"), std::string("mac"));
+#elif OS_WIN32
+ temp_value->SetString(std::string("platform"), std::string("windows"));
+#elif OS_LINUX && !OS_CHROMEOS
+ temp_value->SetString(std::string("platform"), std::string("linux"));
+#elif OS_CHROMEOS
+ temp_value->SetString(std::string("platform"), std::string("chromeos"));
+#else
+ temp_value->SetString(std::string("platform"), std::string("unknown"));
+#endif
+
+ temp_value->SetBoolean(std::string("javascriptEnabled"), true);
+
+ response->set_status(kSuccess);
+ response->set_value(temp_value);
+}
+
+void SessionWithID::ExecuteDelete(Response* const response) {
+ Singleton<SessionManager>::get()->Delete(session_->id());
+ response->set_status(kSuccess);
+}
+} // namespace webdriver
+
Property changes on: chrome/test/webdriver/commands/session_with_id.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« 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