OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_frame/test/chrome_frame_test_utils.h" | 5 #include "chrome_frame/test/chrome_frame_test_utils.h" |
6 | 6 |
7 #include <atlbase.h> | 7 #include <atlbase.h> |
8 #include <atlwin.h> | 8 #include <atlwin.h> |
9 #include <iepmapi.h> | 9 #include <iepmapi.h> |
10 | 10 |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 | 315 |
316 base::ProcessHandle LaunchExecutable(const std::wstring& executable, | 316 base::ProcessHandle LaunchExecutable(const std::wstring& executable, |
317 const std::wstring& argument) { | 317 const std::wstring& argument) { |
318 base::ProcessHandle process = NULL; | 318 base::ProcessHandle process = NULL; |
319 std::wstring path = GetExecutableAppPath(executable); | 319 std::wstring path = GetExecutableAppPath(executable); |
320 if (path.empty()) { | 320 if (path.empty()) { |
321 path = FormatCommandForApp(executable, argument); | 321 path = FormatCommandForApp(executable, argument); |
322 if (path.empty()) { | 322 if (path.empty()) { |
323 DLOG(ERROR) << "Failed to find executable: " << executable; | 323 DLOG(ERROR) << "Failed to find executable: " << executable; |
324 } else { | 324 } else { |
325 CommandLine cmdline(L""); | 325 CommandLine cmdline = CommandLine::FromString(path); |
326 cmdline.ParseFromString(path); | |
327 base::LaunchApp(cmdline, false, false, &process); | 326 base::LaunchApp(cmdline, false, false, &process); |
328 } | 327 } |
329 } else { | 328 } else { |
330 CommandLine cmdline(path); | 329 CommandLine cmdline(path); |
331 cmdline.AppendLooseValue(argument); | 330 cmdline.AppendLooseValue(argument); |
332 base::LaunchApp(cmdline, false, false, &process); | 331 base::LaunchApp(cmdline, false, false, &process); |
333 } | 332 } |
334 return process; | 333 return process; |
335 } | 334 } |
336 | 335 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 ++ret; | 406 ++ret; |
408 } | 407 } |
409 } | 408 } |
410 } | 409 } |
411 } | 410 } |
412 | 411 |
413 return ret; | 412 return ret; |
414 } | 413 } |
415 | 414 |
416 } // namespace chrome_frame_test | 415 } // namespace chrome_frame_test |
OLD | NEW |