diff options
author | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-27 01:12:24 +0000 |
---|---|---|
committer | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-27 01:12:24 +0000 |
commit | 97c652b98f92e060e3ed3a11d2c808d85a7e1c1c (patch) | |
tree | 869d2ba677905ea0cba67f4ee311d15846f97790 /ipc/ipc_multiprocess_test.h | |
parent | 31ad4a24b884526a51f81efa556c019dcc27657d (diff) | |
download | chromium_src-97c652b98f92e060e3ed3a11d2c808d85a7e1c1c.zip chromium_src-97c652b98f92e060e3ed3a11d2c808d85a7e1c1c.tar.gz chromium_src-97c652b98f92e060e3ed3a11d2c808d85a7e1c1c.tar.bz2 |
Make GlobalDescriptors::MaybeGet return -1 when the key is not found.
BUG=None
TEST=Unit tests should still pass.
Review URL: https://chromiumcodereview.appspot.com/10387218
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144350 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_multiprocess_test.h')
-rw-r--r-- | ipc/ipc_multiprocess_test.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ipc/ipc_multiprocess_test.h b/ipc/ipc_multiprocess_test.h new file mode 100644 index 0000000..5364eeb --- /dev/null +++ b/ipc/ipc_multiprocess_test.h @@ -0,0 +1,23 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef IPC_IPC_MULTIPROCESS_TEST_H_ +#define IPC_IPC_MULTIPROCESS_TEST_H_ +#pragma once + +#include "base/test/multiprocess_test.h" + +// Use this macro when your sub-process is using an IPCChannel to communicate +// with the test process. +// See comment below for MultiProcessTestIPCSetUp() on why this is needed. +#define MULTIPROCESS_IPC_TEST_MAIN(test_main) \ + MULTIPROCESS_TEST_MAIN_WITH_SETUP(test_main, MultiProcessTestIPCSetUp) + +// Setup function used by MULTIPROCESS_IPC_TEST_MAIN. +// Registers the IPC channel as a global descriptor in the child process. This +// is needed on POSIX as the IPCChannel when created looks for a specific global +// descriptor to establish the connection to the parent process. +void MultiProcessTestIPCSetUp(); + +#endif // IPC_IPC_MULTIPROCESS_TEST_H_ |