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

Unified Diff: content/renderer/pepper/pepper_broker_impl_unittest.cc

Issue 10378057: Broker out PPAPI handle duplication (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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: content/renderer/pepper/pepper_broker_impl_unittest.cc
===================================================================
--- content/renderer/pepper/pepper_broker_impl_unittest.cc (revision 136613)
+++ content/renderer/pepper/pepper_broker_impl_unittest.cc (working copy)
@@ -25,21 +25,19 @@
// Initialization should fail.
TEST_F(PepperBrokerImplTest, InitFailure) {
PepperBrokerDispatcherWrapper dispatcher_wrapper;
- base::ProcessHandle broker_process_handle = base::kNullProcessHandle;
IPC::ChannelHandle invalid_channel; // Invalid by default.
// An invalid handle should result in a failure (false) without a LOG(FATAL),
// such as the one in CreatePipe(). Call it twice because without the invalid
// handle check, the posix code would hit a one-time path due to a static
// variable and go through the LOG(FATAL) path.
- EXPECT_FALSE(dispatcher_wrapper.Init(broker_process_handle, invalid_channel));
- EXPECT_FALSE(dispatcher_wrapper.Init(broker_process_handle, invalid_channel));
+ EXPECT_FALSE(dispatcher_wrapper.Init(invalid_channel));
+ EXPECT_FALSE(dispatcher_wrapper.Init(invalid_channel));
}
// On valid ChannelHandle, initialization should succeed.
TEST_F(PepperBrokerImplTest, InitSuccess) {
PepperBrokerDispatcherWrapper dispatcher_wrapper;
- base::ProcessHandle broker_process_handle = base::kNullProcessHandle;
const char kChannelName[] = "PepperPluginDelegateImplTestChannelName";
#if defined(OS_POSIX)
int fds[2] = {-1, -1};
@@ -52,7 +50,7 @@
IPC::ChannelHandle valid_channel(kChannelName);
#endif // defined(OS_POSIX));
- EXPECT_TRUE(dispatcher_wrapper.Init(broker_process_handle, valid_channel));
+ EXPECT_TRUE(dispatcher_wrapper.Init(valid_channel));
#if defined(OS_POSIX)
EXPECT_EQ(0, ::close(fds[0]));
« no previous file with comments | « content/renderer/pepper/pepper_broker_impl.cc ('k') | content/renderer/pepper/pepper_plugin_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698