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/webdriver_automation.h" | 5 #include "chrome/test/webdriver/webdriver_automation.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 if (!channel_id.empty()) { | 433 if (!channel_id.empty()) { |
434 *error = new Error( | 434 *error = new Error( |
435 kUnknownError, "Cannot detach an already running browser process"); | 435 kUnknownError, "Cannot detach an already running browser process"); |
436 return; | 436 return; |
437 } | 437 } |
438 #if defined(OS_WIN) | 438 #if defined(OS_WIN) |
439 channel_id = "chromedriver" + GenerateRandomID(); | 439 channel_id = "chromedriver" + GenerateRandomID(); |
440 #elif defined(OS_POSIX) | 440 #elif defined(OS_POSIX) |
441 base::FilePath temp_file; | 441 base::FilePath temp_file; |
442 if (!file_util::CreateTemporaryFile(&temp_file) || | 442 if (!file_util::CreateTemporaryFile(&temp_file) || |
443 !base::Delete(temp_file, false /* recursive */)) { | 443 !base::DeleteFile(temp_file, false /* recursive */)) { |
444 *error = new Error(kUnknownError, "Could not create temporary filename"); | 444 *error = new Error(kUnknownError, "Could not create temporary filename"); |
445 return; | 445 return; |
446 } | 446 } |
447 channel_id = temp_file.value(); | 447 channel_id = temp_file.value(); |
448 #endif | 448 #endif |
449 } | 449 } |
450 if (channel_id.empty()) { | 450 if (channel_id.empty()) { |
451 std::string command_line_str; | 451 std::string command_line_str; |
452 #if defined(OS_WIN) | 452 #if defined(OS_WIN) |
453 command_line_str = WideToUTF8(command.GetCommandLineString()); | 453 command_line_str = WideToUTF8(command.GetCommandLineString()); |
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1207 } | 1207 } |
1208 | 1208 |
1209 Error* Automation::CheckMaximizeSupported() { | 1209 Error* Automation::CheckMaximizeSupported() { |
1210 const char* message = | 1210 const char* message = |
1211 "Maximize automation interface is not supported for this version of " | 1211 "Maximize automation interface is not supported for this version of " |
1212 "Chrome."; | 1212 "Chrome."; |
1213 return CheckVersion(1160, message); | 1213 return CheckVersion(1160, message); |
1214 } | 1214 } |
1215 | 1215 |
1216 } // namespace webdriver | 1216 } // namespace webdriver |
OLD | NEW |