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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #elif defined(OS_MACOSX) | 42 #elif defined(OS_MACOSX) |
43 temp_value->SetString("platform", "mac"); | 43 temp_value->SetString("platform", "mac"); |
44 #elif defined(OS_CHROMEOS) | 44 #elif defined(OS_CHROMEOS) |
45 temp_value->SetString("platform", "chromeos"); | 45 temp_value->SetString("platform", "chromeos"); |
46 #elif defined(OS_LINUX) | 46 #elif defined(OS_LINUX) |
47 temp_value->SetString("platform", "linux"); | 47 temp_value->SetString("platform", "linux"); |
48 #else | 48 #else |
49 temp_value->SetString("platform", "unknown"); | 49 temp_value->SetString("platform", "unknown"); |
50 #endif | 50 #endif |
51 | 51 |
52 temp_value->SetBoolean("cssSelectorsEnabled", true); | |
53 temp_value->SetBoolean("javascriptEnabled", true); | 52 temp_value->SetBoolean("javascriptEnabled", true); |
54 temp_value->SetBoolean("takesScreenshot", true); | 53 temp_value->SetBoolean("takesScreenshot", true); |
| 54 temp_value->SetBoolean("handlesAlerts", true); |
| 55 temp_value->SetBoolean("databaseEnabled", false); |
| 56 temp_value->SetBoolean("locationContextEnabled", false); |
| 57 temp_value->SetBoolean("applicationCacheEnabled", false); |
| 58 temp_value->SetBoolean("browserConnectionEnabled", false); |
| 59 temp_value->SetBoolean("cssSelectorsEnabled", true); |
| 60 temp_value->SetBoolean("webStorageEnabled", false); |
| 61 temp_value->SetBoolean("rotatable", false); |
| 62 temp_value->SetBoolean("acceptSslCerts", false); |
| 63 // Even when ChromeDriver does not OS-events, the input simulation produces |
| 64 // the same effect for most purposes (except IME). |
| 65 temp_value->SetBoolean("nativeEvents", true); |
55 | 66 |
56 // Custom non-standard session info. | 67 // Custom non-standard session info. |
57 temp_value->SetWithoutPathExpansion( | 68 temp_value->SetWithoutPathExpansion( |
58 "chrome.chromedriverVersion", | 69 "chrome.chromedriverVersion", |
59 Value::CreateStringValue(chrome::kChromeVersion)); | 70 Value::CreateStringValue(chrome::kChromeVersion)); |
60 temp_value->SetWithoutPathExpansion( | 71 temp_value->SetWithoutPathExpansion( |
61 "chrome.nativeEvents", | 72 "chrome.nativeEvents", |
62 Value::CreateBooleanValue(session_->options().use_native_events)); | 73 Value::CreateBooleanValue(session_->options().use_native_events)); |
63 | 74 |
64 response->SetValue(temp_value); | 75 response->SetValue(temp_value); |
65 } | 76 } |
66 | 77 |
67 void SessionWithID::ExecuteDelete(Response* const response) { | 78 void SessionWithID::ExecuteDelete(Response* const response) { |
68 // Session manages its own lifetime, so do not call delete. | 79 // Session manages its own lifetime, so do not call delete. |
69 session_->Terminate(); | 80 session_->Terminate(); |
70 } | 81 } |
71 | 82 |
72 } // namespace webdriver | 83 } // namespace webdriver |
OLD | NEW |