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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 #else | 49 #else |
50 temp_value->SetString("platform", "unknown"); | 50 temp_value->SetString("platform", "unknown"); |
51 #endif | 51 #endif |
52 | 52 |
53 temp_value->SetBoolean("cssSelectorsEnabled", true); | 53 temp_value->SetBoolean("cssSelectorsEnabled", true); |
54 temp_value->SetBoolean("javascriptEnabled", true); | 54 temp_value->SetBoolean("javascriptEnabled", true); |
55 temp_value->SetBoolean("takesScreenshot", true); | 55 temp_value->SetBoolean("takesScreenshot", true); |
56 | 56 |
57 // Custom non-standard session info. | 57 // Custom non-standard session info. |
58 temp_value->SetWithoutPathExpansion( | 58 temp_value->SetWithoutPathExpansion( |
59 "chrome.chromedriverVersion", Value::CreateStringValue("1.0")); | 59 "chrome.chromedriverVersion", |
60 temp_value->SetWithoutPathExpansion( | |
61 "chrome.automationVersion", | |
62 Value::CreateStringValue(chrome::kChromeVersion)); | 60 Value::CreateStringValue(chrome::kChromeVersion)); |
63 temp_value->SetWithoutPathExpansion( | 61 temp_value->SetWithoutPathExpansion( |
64 "chrome.nativeEvents", | 62 "chrome.nativeEvents", |
65 Value::CreateBooleanValue(session_->use_native_events())); | 63 Value::CreateBooleanValue(session_->options().use_native_events)); |
66 | 64 |
67 response->SetValue(temp_value); | 65 response->SetValue(temp_value); |
68 } | 66 } |
69 | 67 |
70 void SessionWithID::ExecuteDelete(Response* const response) { | 68 void SessionWithID::ExecuteDelete(Response* const response) { |
71 // Session manages its own lifetime, so do not call delete. | 69 // Session manages its own lifetime, so do not call delete. |
72 session_->Terminate(); | 70 session_->Terminate(); |
73 } | 71 } |
74 | 72 |
75 } // namespace webdriver | 73 } // namespace webdriver |
OLD | NEW |