OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 temp_value->SetBoolean("rotatable", false); | 61 temp_value->SetBoolean("rotatable", false); |
62 temp_value->SetBoolean("acceptSslCerts", false); | 62 temp_value->SetBoolean("acceptSslCerts", false); |
63 // Even when ChromeDriver does not OS-events, the input simulation produces | 63 // Even when ChromeDriver does not OS-events, the input simulation produces |
64 // the same effect for most purposes (except IME). | 64 // the same effect for most purposes (except IME). |
65 temp_value->SetBoolean("nativeEvents", true); | 65 temp_value->SetBoolean("nativeEvents", true); |
66 | 66 |
67 // Custom non-standard session info. | 67 // Custom non-standard session info. |
68 temp_value->SetWithoutPathExpansion( | 68 temp_value->SetWithoutPathExpansion( |
69 "chrome.chromedriverVersion", | 69 "chrome.chromedriverVersion", |
70 Value::CreateStringValue(chrome::kChromeVersion)); | 70 Value::CreateStringValue(chrome::kChromeVersion)); |
71 temp_value->SetWithoutPathExpansion( | |
72 "chrome.nativeEvents", | |
73 Value::CreateBooleanValue(session_->capabilities().native_events)); | |
74 | 71 |
75 response->SetValue(temp_value); | 72 response->SetValue(temp_value); |
76 } | 73 } |
77 | 74 |
78 void SessionWithID::ExecuteDelete(Response* const response) { | 75 void SessionWithID::ExecuteDelete(Response* const response) { |
79 // Session manages its own lifetime, so do not call delete. | 76 // Session manages its own lifetime, so do not call delete. |
80 session_->Terminate(); | 77 session_->Terminate(); |
81 } | 78 } |
82 | 79 |
83 bool SessionWithID::ShouldRunPreAndPostCommandHandlers() { | 80 bool SessionWithID::ShouldRunPreAndPostCommandHandlers() { |
84 return false; | 81 return false; |
85 } | 82 } |
86 | 83 |
87 } // namespace webdriver | 84 } // namespace webdriver |
OLD | NEW |