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/session_with_id.h" | 5 #include "chrome/test/webdriver/commands/session_with_id.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 temp_value->SetString("platform", "chromeos"); | 44 temp_value->SetString("platform", "chromeos"); |
45 #elif defined(OS_LINUX) | 45 #elif defined(OS_LINUX) |
46 temp_value->SetString("platform", "linux"); | 46 temp_value->SetString("platform", "linux"); |
47 #else | 47 #else |
48 temp_value->SetString("platform", "unknown"); | 48 temp_value->SetString("platform", "unknown"); |
49 #endif | 49 #endif |
50 | 50 |
51 temp_value->SetBoolean("javascriptEnabled", true); | 51 temp_value->SetBoolean("javascriptEnabled", true); |
52 | 52 |
53 // Custom non-standard session info. | 53 // Custom non-standard session info. |
54 temp_value->SetString("chrome.chromedriverVersion", "1.0"); | 54 temp_value->SetWithoutPathExpansion( |
55 temp_value->SetString("chrome.automationVersion", chrome::kChromeVersion); | 55 "chrome.chromedriverVersion", Value::CreateStringValue("1.0")); |
56 temp_value->SetBoolean("chrome.nativeEvents", session_->use_native_events()); | 56 temp_value->SetWithoutPathExpansion( |
| 57 "chrome.automationVersion", |
| 58 Value::CreateStringValue(chrome::kChromeVersion)); |
| 59 temp_value->SetWithoutPathExpansion( |
| 60 "chrome.nativeEvents", |
| 61 Value::CreateBooleanValue(session_->use_native_events())); |
57 | 62 |
58 response->SetValue(temp_value); | 63 response->SetValue(temp_value); |
59 } | 64 } |
60 | 65 |
61 void SessionWithID::ExecuteDelete(Response* const response) { | 66 void SessionWithID::ExecuteDelete(Response* const response) { |
62 // Session manages its own lifetime, so do not call delete. | 67 // Session manages its own lifetime, so do not call delete. |
63 session_->Terminate(); | 68 session_->Terminate(); |
64 } | 69 } |
65 | 70 |
66 } // namespace webdriver | 71 } // namespace webdriver |
OLD | NEW |