Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Unified Diff: chrome_frame/test/chrome_frame_test_utils.cc

Issue 2099005: Adding a bit of logging to track down the reason for recent "LaunchBrowser(br... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698