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

Unified Diff: ppapi/proxy/ppapi_proxy_test.cc

Issue 11196002: Fix ppapi TwoWayTest so that it constructs a unique IPC::ChannelHandle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 | « ppapi/proxy/plugin_var_tracker_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppapi_proxy_test.cc
diff --git a/ppapi/proxy/ppapi_proxy_test.cc b/ppapi/proxy/ppapi_proxy_test.cc
index bf139bbf66f414c8b0630874326dc28596c50ca8..06658e3c17af4b88589a9a2ad9e9be5387548267 100644
--- a/ppapi/proxy/ppapi_proxy_test.cc
+++ b/ppapi/proxy/ppapi_proxy_test.cc
@@ -4,10 +4,13 @@
#include "ppapi/proxy/ppapi_proxy_test.h"
+#include <sstream>
+
#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/message_loop_proxy.h"
#include "base/observer_list.h"
+#include "base/process_util.h"
#include "ipc/ipc_sync_channel.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/private/ppb_proxy_private.h"
@@ -415,8 +418,11 @@ void TwoWayTest::SetUp() {
io_thread_.StartWithOptions(options);
plugin_thread_.Start();
- IPC::ChannelHandle handle;
- handle.name = "TwoWayTestChannel";
+ // Construct the IPC handle name using the process ID so we can safely run
+ // multiple |TwoWayTest|s concurrently.
+ std::ostringstream handle_name;
+ handle_name << "TwoWayTestChannel" << base::GetCurrentProcId();
+ IPC::ChannelHandle handle(handle_name.str());
base::WaitableEvent remote_harness_set_up(true, false);
plugin_thread_.message_loop_proxy()->PostTask(
FROM_HERE,
« no previous file with comments | « ppapi/proxy/plugin_var_tracker_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698