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

Side by Side Diff: mojo/embedder/embedder_unittest.cc

Issue 264563005: Enable Mojo on iOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/all.gyp ('k') | mojo/mojo.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/embedder/embedder.h" 5 #include "mojo/embedder/embedder.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 // 3. "FOO" 287 // 3. "FOO"
288 // 4. "Bar"+mp1 288 // 4. "Bar"+mp1
289 // 5. (close) 289 // 5. (close)
290 // 6. (close) 290 // 6. (close)
291 // 7. "baz" 291 // 7. "baz"
292 // 8. (closed) 292 // 8. (closed)
293 // 9. "quux"+mp2 293 // 9. "quux"+mp2
294 // 10. (close) 294 // 10. (close)
295 // 11. (wait/cl.) 295 // 11. (wait/cl.)
296 // 12. (wait/cl.) 296 // 12. (wait/cl.)
297
298 // The multiprocess unittests don't build (and are not relevant) on iOS.
299 #if 0
297 TEST_F(EmbedderTest, MultiprocessChannels) { 300 TEST_F(EmbedderTest, MultiprocessChannels) {
298 Init(); 301 Init();
299 mojo::test::MultiprocessTestHelper multiprocess_test_helper; 302 mojo::test::MultiprocessTestHelper multiprocess_test_helper;
300 multiprocess_test_helper.StartChild("MultiprocessChannelsClient"); 303 multiprocess_test_helper.StartChild("MultiprocessChannelsClient");
301 304
302 { 305 {
303 ScopedTestChannel server_channel( 306 ScopedTestChannel server_channel(
304 test_io_thread()->task_runner(), 307 test_io_thread()->task_runner(),
305 multiprocess_test_helper.server_platform_handle.Pass()); 308 multiprocess_test_helper.server_platform_handle.Pass());
306 MojoHandle server_mp = server_channel.bootstrap_message_pipe(); 309 MojoHandle server_mp = server_channel.bootstrap_message_pipe();
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 EXPECT_STREQ(kFoo, buffer); 497 EXPECT_STREQ(kFoo, buffer);
495 498
496 // 11. Wait on |mp1| (which should eventually fail) and then close it. 499 // 11. Wait on |mp1| (which should eventually fail) and then close it.
497 EXPECT_EQ(MOJO_RESULT_FAILED_PRECONDITION, 500 EXPECT_EQ(MOJO_RESULT_FAILED_PRECONDITION,
498 MojoWait(mp1, MOJO_WAIT_FLAG_READABLE, MOJO_DEADLINE_INDEFINITE)); 501 MojoWait(mp1, MOJO_WAIT_FLAG_READABLE, MOJO_DEADLINE_INDEFINITE));
499 EXPECT_EQ(MOJO_RESULT_OK, MojoClose(mp1)); 502 EXPECT_EQ(MOJO_RESULT_OK, MojoClose(mp1));
500 } 503 }
501 504
502 EXPECT_TRUE(test::Shutdown()); 505 EXPECT_TRUE(test::Shutdown());
503 } 506 }
507 #endif
504 508
505 // TODO(vtl): Test immediate write & close. 509 // TODO(vtl): Test immediate write & close.
506 // TODO(vtl): Test broken-connection cases. 510 // TODO(vtl): Test broken-connection cases.
507 511
508 } // namespace 512 } // namespace
509 } // namespace embedder 513 } // namespace embedder
510 } // namespace mojo 514 } // namespace mojo
OLDNEW
« no previous file with comments | « build/all.gyp ('k') | mojo/mojo.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698