Ensure tests check the return of SpawnChild() when they may wait without timeouts

Ensure that the result of SpawnChild() is consistently checked for unittests.
If an child fails to launch, SpawnChild() will return
base::kNullProcessHandle. Waiting on this handle is equivalent to waiting for
any child to terminate - and if there are no children, this may wait
indefinitely, causing the whole test executable to timeout after 10 minutes.

BUG=none
TEST=none


Review URL: http://codereview.chromium.org/7304008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91430 0039d316-1c4b-4281-b951-d872f2087c98


CrOS-Libchrome-Original-Commit: e84a4ee48635252679b4903a5b08ec6e863dbd63
diff --git a/base/shared_memory_unittest.cc b/base/shared_memory_unittest.cc
index edcbb50..9472101 100644
--- a/base/shared_memory_unittest.cc
+++ b/base/shared_memory_unittest.cc
@@ -383,6 +383,7 @@
   ProcessHandle handles[kNumTasks];
   for (int index = 0; index < kNumTasks; ++index) {
     handles[index] = SpawnChild("SharedMemoryTestMain", false);
+    ASSERT_TRUE(handles[index]);
   }
 
   int exit_code = 0;