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

Unified Diff: mojo/system/message_pipe_dispatcher_unittest.cc

Issue 324783002: Mojo: Add a MojoCreateMessagePipeOptions struct parameter to MojoCreateMessagePipe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 6 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 | « mojo/system/message_pipe_dispatcher.cc ('k') | mojo/system/multiprocess_message_pipe_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/message_pipe_dispatcher_unittest.cc
diff --git a/mojo/system/message_pipe_dispatcher_unittest.cc b/mojo/system/message_pipe_dispatcher_unittest.cc
index f68334841e91422cd39c4e2035c41dc85ebab623..2fc64693ed5ace256a9d8dd1903c0c91bd838650 100644
--- a/mojo/system/message_pipe_dispatcher_unittest.cc
+++ b/mojo/system/message_pipe_dispatcher_unittest.cc
@@ -37,9 +37,11 @@ TEST(MessagePipeDispatcherTest, Basic) {
// Run this test both with |d0| as port 0, |d1| as port 1 and vice versa.
for (unsigned i = 0; i < 2; i++) {
- scoped_refptr<MessagePipeDispatcher> d0(new MessagePipeDispatcher());
+ scoped_refptr<MessagePipeDispatcher> d0(new MessagePipeDispatcher(
+ MessagePipeDispatcher::kDefaultCreateOptions));
EXPECT_EQ(Dispatcher::kTypeMessagePipe, d0->GetType());
- scoped_refptr<MessagePipeDispatcher> d1(new MessagePipeDispatcher());
+ scoped_refptr<MessagePipeDispatcher> d1(new MessagePipeDispatcher(
+ MessagePipeDispatcher::kDefaultCreateOptions));
{
scoped_refptr<MessagePipe> mp(new MessagePipe());
d0->Init(mp, i); // 0, 1.
@@ -113,8 +115,10 @@ TEST(MessagePipeDispatcherTest, Basic) {
TEST(MessagePipeDispatcherTest, InvalidParams) {
char buffer[1];
- scoped_refptr<MessagePipeDispatcher> d0(new MessagePipeDispatcher());
- scoped_refptr<MessagePipeDispatcher> d1(new MessagePipeDispatcher());
+ scoped_refptr<MessagePipeDispatcher> d0(new MessagePipeDispatcher(
+ MessagePipeDispatcher::kDefaultCreateOptions));
+ scoped_refptr<MessagePipeDispatcher> d1(new MessagePipeDispatcher(
+ MessagePipeDispatcher::kDefaultCreateOptions));
{
scoped_refptr<MessagePipe> mp(new MessagePipe());
d0->Init(mp, 0);
@@ -153,8 +157,10 @@ TEST(MessagePipeDispatcherTest, BasicClosed) {
// Run this test both with |d0| as port 0, |d1| as port 1 and vice versa.
for (unsigned i = 0; i < 2; i++) {
- scoped_refptr<MessagePipeDispatcher> d0(new MessagePipeDispatcher());
- scoped_refptr<MessagePipeDispatcher> d1(new MessagePipeDispatcher());
+ scoped_refptr<MessagePipeDispatcher> d0(new MessagePipeDispatcher(
+ MessagePipeDispatcher::kDefaultCreateOptions));
+ scoped_refptr<MessagePipeDispatcher> d1(new MessagePipeDispatcher(
+ MessagePipeDispatcher::kDefaultCreateOptions));
{
scoped_refptr<MessagePipe> mp(new MessagePipe());
d0->Init(mp, i); // 0, 1.
@@ -261,8 +267,10 @@ TEST(MessagePipeDispatcherTest, BasicThreaded) {
// Run this test both with |d0| as port 0, |d1| as port 1 and vice versa.
for (unsigned i = 0; i < 2; i++) {
- scoped_refptr<MessagePipeDispatcher> d0(new MessagePipeDispatcher());
- scoped_refptr<MessagePipeDispatcher> d1(new MessagePipeDispatcher());
+ scoped_refptr<MessagePipeDispatcher> d0(new MessagePipeDispatcher(
+ MessagePipeDispatcher::kDefaultCreateOptions));
+ scoped_refptr<MessagePipeDispatcher> d1(new MessagePipeDispatcher(
+ MessagePipeDispatcher::kDefaultCreateOptions));
{
scoped_refptr<MessagePipe> mp(new MessagePipe());
d0->Init(mp, i); // 0, 1.
@@ -339,8 +347,10 @@ TEST(MessagePipeDispatcherTest, BasicThreaded) {
}
for (unsigned i = 0; i < 2; i++) {
- scoped_refptr<MessagePipeDispatcher> d0(new MessagePipeDispatcher());
- scoped_refptr<MessagePipeDispatcher> d1(new MessagePipeDispatcher());
+ scoped_refptr<MessagePipeDispatcher> d0(new MessagePipeDispatcher(
+ MessagePipeDispatcher::kDefaultCreateOptions));
+ scoped_refptr<MessagePipeDispatcher> d1(new MessagePipeDispatcher(
+ MessagePipeDispatcher::kDefaultCreateOptions));
{
scoped_refptr<MessagePipe> mp(new MessagePipe());
d0->Init(mp, i); // 0, 1.
@@ -513,8 +523,10 @@ TEST(MessagePipeDispatcherTest, Stress) {
static const size_t kNumWriters = 30;
static const size_t kNumReaders = kNumWriters;
- scoped_refptr<MessagePipeDispatcher> d_write(new MessagePipeDispatcher());
- scoped_refptr<MessagePipeDispatcher> d_read(new MessagePipeDispatcher());
+ scoped_refptr<MessagePipeDispatcher> d_write(new MessagePipeDispatcher(
+ MessagePipeDispatcher::kDefaultCreateOptions));
+ scoped_refptr<MessagePipeDispatcher> d_read(new MessagePipeDispatcher(
+ MessagePipeDispatcher::kDefaultCreateOptions));
{
scoped_refptr<MessagePipe> mp(new MessagePipe());
d_write->Init(mp, 0);
« no previous file with comments | « mojo/system/message_pipe_dispatcher.cc ('k') | mojo/system/multiprocess_message_pipe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698