#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <stdint.h>
#include <string.h>
#include <algorithm>
#include <memory>
#include <string>
#include <vector>
#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
#include "build/blink_buildflags.h"
#include "build/build_config.h"
#include "mojo/core/embedder/embedder.h"
#include "mojo/core/test/mojo_test_base.h"
#include "mojo/public/c/system/core.h"
#include "mojo/public/c/system/types.h"
#include "mojo/public/cpp/system/message_pipe.h"
namespace mojo {
namespace core {
namespace {
const MojoHandleSignals kAllSignals = …;
static const char kHelloWorld[] = …;
class MessagePipeTest : public test::MojoTestBase { … };
FuseMessagePipeTest;
TEST_F(MessagePipeTest, WriteData) { … }
TEST_F(MessagePipeTest, Basic) { … }
TEST_F(MessagePipeTest, CloseWithQueuedIncomingMessages) { … }
TEST_F(MessagePipeTest, BasicWaiting) { … }
#if BUILDFLAG(USE_BLINK)
const size_t kPingPongHandlesPerIteration = …;
const size_t kPingPongIterations = …;
DEFINE_TEST_CLIENT_TEST_WITH_PIPE(HandlePingPong, MessagePipeTest, h) { … }
TEST_F(MessagePipeTest, DataPipeConsumerHandlePingPong) { … }
TEST_F(MessagePipeTest, DataPipeProducerHandlePingPong) { … }
#if BUILDFLAG(IS_IOS)
#define MAYBE_SharedBufferHandlePingPong …
#else
#define MAYBE_SharedBufferHandlePingPong …
#endif
TEST_F(MessagePipeTest, MAYBE_SharedBufferHandlePingPong) { … }
#endif
TEST_F(FuseMessagePipeTest, Basic) { … }
TEST_F(FuseMessagePipeTest, FuseAfterPeerWrite) { … }
TEST_F(FuseMessagePipeTest, NoFuseAfterWrite) { … }
TEST_F(FuseMessagePipeTest, NoFuseSelf) { … }
TEST_F(FuseMessagePipeTest, FuseInvalidArguments) { … }
TEST_F(FuseMessagePipeTest, FuseAfterPeerClosure) { … }
TEST_F(FuseMessagePipeTest, FuseAfterPeerWriteAndClosure) { … }
TEST_F(MessagePipeTest, ClosePipesStressTest) { … }
}
}
}