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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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", | 59 "chrome.chromedriverVersion", |
60 Value::CreateStringValue(chrome::kChromeVersion)); | 60 base::StringValue::New(chrome::kChromeVersion)); |
61 temp_value->SetWithoutPathExpansion( | 61 temp_value->SetWithoutPathExpansion( |
62 "chrome.nativeEvents", | 62 "chrome.nativeEvents", |
63 Value::CreateBooleanValue(session_->options().use_native_events)); | 63 base::BooleanValue::New(session_->options().use_native_events)); |
64 | 64 |
65 response->SetValue(temp_value); | 65 response->SetValue(temp_value); |
66 } | 66 } |
67 | 67 |
68 void SessionWithID::ExecuteDelete(Response* const response) { | 68 void SessionWithID::ExecuteDelete(Response* const response) { |
69 // Session manages its own lifetime, so do not call delete. | 69 // Session manages its own lifetime, so do not call delete. |
70 session_->Terminate(); | 70 session_->Terminate(); |
71 } | 71 } |
72 | 72 |
73 } // namespace webdriver | 73 } // namespace webdriver |
OLD | NEW |