Index: chrome_frame/test/chrome_frame_test_utils.cc |
=================================================================== |
--- chrome_frame/test/chrome_frame_test_utils.cc (revision 47420) |
+++ chrome_frame/test/chrome_frame_test_utils.cc (working copy) |
@@ -139,15 +139,19 @@ |
if (path.empty()) { |
path = FormatCommandForApp(executable, argument); |
if (path.empty()) { |
- DLOG(ERROR) << "Failed to find executable: " << executable; |
+ LOG(ERROR) << "Failed to find executable: " << executable; |
} else { |
CommandLine cmdline = CommandLine::FromString(path); |
- base::LaunchApp(cmdline, false, false, &process); |
+ if (!base::LaunchApp(cmdline, false, false, &process)) { |
+ LOG(ERROR) << "LaunchApp failed: " << ::GetLastError(); |
+ } |
} |
} else { |
CommandLine cmdline((FilePath(path))); |
cmdline.AppendLooseValue(argument); |
- base::LaunchApp(cmdline, false, false, &process); |
+ if (!base::LaunchApp(cmdline, false, false, &process)) { |
+ LOG(ERROR) << "LaunchApp failed: " << ::GetLastError(); |
+ } |
} |
return process; |
} |
@@ -198,13 +202,19 @@ |
PROCESS_INFORMATION pi = {0}; |
IELAUNCHURLINFO info = {sizeof info, 0}; |
HMODULE h = LoadLibrary(L"ieframe.dll"); |
- if (!h) |
+ if (!h) { |
+ LOG(ERROR) << "Failed to load ieframe.dll: " << ::GetLastError(); |
return NULL; |
+ } |
launch = reinterpret_cast<IELaunchURLPtr>(GetProcAddress(h, "IELaunchURL")); |
+ CHECK(launch); |
HRESULT hr = launch(url.c_str(), &pi, &info); |
FreeLibrary(h); |
- if (SUCCEEDED(hr)) |
+ if (SUCCEEDED(hr)) { |
CloseHandle(pi.hThread); |
+ } else { |
+ LOG(ERROR) << ::StringPrintf("IELaunchURL failed: 0x%08X", hr); |
+ } |
return pi.hProcess; |
} |