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

Side by Side Diff: mojo/edk/system/message_pipe_dispatcher_unittest.cc

Issue 1352913002: Remove Windows support from the EDK. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « mojo/edk/system/BUILD.gn ('k') | mojo/edk/system/multiprocess_message_pipe_unittest.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // NOTE(vtl): Some of these tests are inherently flaky (e.g., if run on a 5 // NOTE(vtl): Some of these tests are inherently flaky (e.g., if run on a
6 // heavily-loaded system). Sorry. |test::EpsilonDeadline()| may be increased to 6 // heavily-loaded system). Sorry. |test::EpsilonDeadline()| may be increased to
7 // increase tolerance and reduce observed flakiness (though doing so reduces the 7 // increase tolerance and reduce observed flakiness (though doing so reduces the
8 // meaningfulness of the test). 8 // meaningfulness of the test).
9 9
10 #include "mojo/edk/system/message_pipe_dispatcher.h" 10 #include "mojo/edk/system/message_pipe_dispatcher.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 // Try writing to |d0|; should fail (other end closed). 331 // Try writing to |d0|; should fail (other end closed).
332 buffer[0] = 345678901; 332 buffer[0] = 345678901;
333 EXPECT_EQ(MOJO_RESULT_FAILED_PRECONDITION, 333 EXPECT_EQ(MOJO_RESULT_FAILED_PRECONDITION,
334 d0->WriteMessage(UserPointer<const void>(buffer), kBufferSize, 334 d0->WriteMessage(UserPointer<const void>(buffer), kBufferSize,
335 nullptr, MOJO_WRITE_MESSAGE_FLAG_NONE)); 335 nullptr, MOJO_WRITE_MESSAGE_FLAG_NONE));
336 336
337 EXPECT_EQ(MOJO_RESULT_OK, d0->Close()); 337 EXPECT_EQ(MOJO_RESULT_OK, d0->Close());
338 } 338 }
339 } 339 }
340 340
341 #if defined(OS_WIN) 341 TEST(MessagePipeDispatcherTest, BasicThreaded) {
342 // http://crbug.com/396386
343 #define MAYBE_BasicThreaded DISABLED_BasicThreaded
344 #else
345 #define MAYBE_BasicThreaded BasicThreaded
346 #endif
347 TEST(MessagePipeDispatcherTest, MAYBE_BasicThreaded) {
348 test::Stopwatch stopwatch; 342 test::Stopwatch stopwatch;
349 int32_t buffer[1]; 343 int32_t buffer[1];
350 const uint32_t kBufferSize = static_cast<uint32_t>(sizeof(buffer)); 344 const uint32_t kBufferSize = static_cast<uint32_t>(sizeof(buffer));
351 uint32_t buffer_size; 345 uint32_t buffer_size;
352 MojoDeadline elapsed; 346 MojoDeadline elapsed;
353 bool did_wait; 347 bool did_wait;
354 MojoResult result; 348 MojoResult result;
355 uint32_t context; 349 uint32_t context;
356 HandleSignalsState hss; 350 HandleSignalsState hss;
357 351
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 EXPECT_EQ(total_messages_written, total_messages_read); 674 EXPECT_EQ(total_messages_written, total_messages_read);
681 EXPECT_EQ(total_bytes_written, total_bytes_read); 675 EXPECT_EQ(total_bytes_written, total_bytes_read);
682 676
683 EXPECT_EQ(MOJO_RESULT_OK, d_write->Close()); 677 EXPECT_EQ(MOJO_RESULT_OK, d_write->Close());
684 EXPECT_EQ(MOJO_RESULT_OK, d_read->Close()); 678 EXPECT_EQ(MOJO_RESULT_OK, d_read->Close());
685 } 679 }
686 680
687 } // namespace 681 } // namespace
688 } // namespace system 682 } // namespace system
689 } // namespace mojo 683 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/BUILD.gn ('k') | mojo/edk/system/multiprocess_message_pipe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698