| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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("javascriptEnabled", true); | 52 temp_value->SetBoolean("javascriptEnabled", true); |
| 53 | 53 |
| 54 // Custom non-standard session info. | 54 // Custom non-standard session info. |
| 55 temp_value->SetString("chrome.chromedriverVersion", "1.0"); | 55 temp_value->SetString("chrome.chromedriverVersion", "1.0"); |
| 56 temp_value->SetString("chrome.automationVersion", chrome::kChromeVersion); | 56 temp_value->SetString("chrome.automationVersion", chrome::kChromeVersion); |
| 57 temp_value->SetBoolean("chrome.nativeEvents", session_->use_native_events()); |
| 57 | 58 |
| 58 response->SetStatus(kSuccess); | 59 response->SetStatus(kSuccess); |
| 59 response->SetValue(temp_value); | 60 response->SetValue(temp_value); |
| 60 } | 61 } |
| 61 | 62 |
| 62 void SessionWithID::ExecuteDelete(Response* const response) { | 63 void SessionWithID::ExecuteDelete(Response* const response) { |
| 63 // Session manages its own lifetime, so do not call delete. | 64 // Session manages its own lifetime, so do not call delete. |
| 64 session_->Terminate(); | 65 session_->Terminate(); |
| 65 response->SetStatus(kSuccess); | 66 response->SetStatus(kSuccess); |
| 66 } | 67 } |
| 67 | 68 |
| 68 bool SessionWithID::RequiresValidTab() { | 69 bool SessionWithID::RequiresValidTab() { |
| 69 return false; | 70 return false; |
| 70 } | 71 } |
| 71 | 72 |
| 72 } // namespace webdriver | 73 } // namespace webdriver |
| OLD | NEW |