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

Unified Diff: chrome/test/automation/proxy_launcher.cc

Issue 7870008: Wait properly for renderer crashes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win? Created 9 years, 3 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
Index: chrome/test/automation/proxy_launcher.cc
diff --git a/chrome/test/automation/proxy_launcher.cc b/chrome/test/automation/proxy_launcher.cc
index 928b84c9c97b3dd2b88ff66b64616a3c8ffb1f3c..91498ead35b2f58eb9a16f754cbcb65fce61b95d 100644
--- a/chrome/test/automation/proxy_launcher.cc
+++ b/chrome/test/automation/proxy_launcher.cc
@@ -26,6 +26,7 @@
#include "content/common/child_process_info.h"
#include "content/common/debug_flags.h"
#include "ipc/ipc_channel.h"
+#include "ipc/ipc_descriptors.h"
#include "sql/connection.h"
namespace {
@@ -109,11 +110,11 @@ bool ProxyLauncher::WaitForBrowserLaunch(bool wait_for_initial_loads) {
return false;
}
} else {
- // TODO(phajdan.jr): We should get rid of this sleep, but some tests
- // "rely" on it, e.g. AssertionTest.Assertion and CheckFalseTest.CheckFails.
- // Those tests do not wait in any way until the crash gets noticed,
- // so it's possible for the browser to exit before the tested crash happens.
+#if defined(OS_WIN)
+ // TODO(phajdan.jr): Get rid of this Sleep when logging_chrome_uitest
+ // stops "relying" on it.
base::PlatformThread::Sleep(TestTimeouts::action_timeout_ms());
+#endif
}
if (!automation()->SetFilteredInet(ShouldFilterInet())) {
@@ -467,9 +468,14 @@ bool ProxyLauncher::LaunchBrowserHelper(const LaunchState& state, bool wait,
#if defined(OS_WIN)
options.start_hidden = !state.show_window;
#elif defined(OS_POSIX)
+ int ipcfd = -1;
+ file_util::ScopedFD ipcfd_closer(&ipcfd);
+
base::file_handle_mapping_vector fds;
- if (automation_proxy_.get())
- fds = automation_proxy_->fds_to_map();
+ if (automation_proxy_.get()) {
+ ipcfd = automation_proxy_->TakeClientFileDescriptor();
+ fds.push_back(std::make_pair(ipcfd, kPrimaryIPCChannel + 3));
+ }
options.fds_to_remap = &fds;
#endif

Powered by Google App Engine
This is Rietveld 408576698