From 49922313bd7d5deb2479001f9646e7fa23d7ec25 Mon Sep 17 00:00:00 2001 From: "sky@chromium.org" Date: Mon, 31 Jan 2011 17:37:54 +0000 Subject: Couple of changes in hopes of finally making ShareProcessesOnRestore not flakey. Here's the set of changes: . Before getting the process count we wait for the PROCESS_LAUNCHER thread to go idle. On linux we push process shutdown to the PROCESS_LAUNCHER thread. So, it's important we wait for this thread to process all requests before getting the process count. . Makes TabRestore take a boolean indicating if it succeeded. . Change IDC_NEW_TAB from waiting for INITIAL_NEW_TAB_UI_LOAD to waiting until the tab loads. INITIAL_NEW_TAB_UI_LOAD isn't really a good indication that the new tab has finished loading. A key part of making this test not flakey is http://codereview.chromium.org/6398005/, but that'll be landed separately. BUG=52022 TEST=none Review URL: http://codereview.chromium.org/6263018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73156 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/worker/worker_uitest.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'chrome/worker') diff --git a/chrome/worker/worker_uitest.cc b/chrome/worker/worker_uitest.cc index 6c01b66..c76333c 100644 --- a/chrome/worker/worker_uitest.cc +++ b/chrome/worker/worker_uitest.cc @@ -92,7 +92,9 @@ class WorkerTest : public UILayoutTest { int cur_process_count; for (int i = 0; i < 10; ++i) { - cur_process_count = GetBrowserProcessCount(); + cur_process_count = 0; + if (!GetBrowserProcessCount(&cur_process_count)) + return false; if (cur_process_count == number_of_processes) return true; -- cgit v1.1