OLD | NEW |
1 // Copyright (c) 2010 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" |
11 #include "chrome/app/chrome_command_ids.h" | 11 #include "chrome/app/chrome_command_ids.h" |
(...skipping 16 matching lines...) Expand all Loading... |
28 } | 28 } |
29 | 29 |
30 bool SessionWithID::DoesDelete() { | 30 bool SessionWithID::DoesDelete() { |
31 return true; | 31 return true; |
32 } | 32 } |
33 | 33 |
34 void SessionWithID::ExecuteGet(Response* const response) { | 34 void SessionWithID::ExecuteGet(Response* const response) { |
35 DictionaryValue *temp_value = new DictionaryValue(); | 35 DictionaryValue *temp_value = new DictionaryValue(); |
36 | 36 |
37 temp_value->SetString("browserName", "chrome"); | 37 temp_value->SetString("browserName", "chrome"); |
38 temp_value->SetString("version", session_->GetVersion()); | 38 temp_value->SetString("version", session_->GetBrowserVersion()); |
39 | 39 |
40 #if defined(OS_WIN) | 40 #if defined(OS_WIN) |
41 temp_value->SetString("platform", "windows"); | 41 temp_value->SetString("platform", "windows"); |
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 |
(...skipping 14 matching lines...) Expand all Loading... |
63 // Session manages its own lifetime, so do not call delete. | 63 // Session manages its own lifetime, so do not call delete. |
64 session_->Terminate(); | 64 session_->Terminate(); |
65 response->SetStatus(kSuccess); | 65 response->SetStatus(kSuccess); |
66 } | 66 } |
67 | 67 |
68 bool SessionWithID::RequiresValidTab() { | 68 bool SessionWithID::RequiresValidTab() { |
69 return false; | 69 return false; |
70 } | 70 } |
71 | 71 |
72 } // namespace webdriver | 72 } // namespace webdriver |
OLD | NEW |