chromium/ipc/ipc_message_attachment_set_posix_unittest.cc

// Copyright 2011 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This test is POSIX only.

#include "ipc/ipc_message_attachment_set.h"

#include <fcntl.h>
#include <stddef.h>
#include <unistd.h>

#include "base/posix/eintr_wrapper.h"
#include "build/build_config.h"
#include "ipc/ipc_platform_file_attachment_posix.h"
#include "testing/gtest/include/gtest/gtest.h"

#if BUILDFLAG(IS_FUCHSIA)
#include <lib/fdio/fdio.h>
#endif

namespace IPC {
namespace {

// Get a safe file descriptor for test purposes.
int GetSafeFd() {}

// Returns true if fd was already closed.  Closes fd if not closed.
bool VerifyClosed(int fd) {}

int GetFdAt(MessageAttachmentSet* set, int id) {}

// The MessageAttachmentSet will try and close some of the descriptor numbers
// which we given it. This is the base descriptor value. It's great enough such
// that no real descriptor will accidentally be closed.
static const int kFDBase =;

TEST(MessageAttachmentSet, BasicAdd) {}

TEST(MessageAttachmentSet, BasicAddAndClose) {}
TEST(MessageAttachmentSet, MaxSize) {}

TEST(MessageAttachmentSet, WalkInOrder) {}

TEST(MessageAttachmentSet, WalkWrongOrder) {}

#if BUILDFLAG(IS_ANDROID)
#define MAYBE_DontClose
#else
#define MAYBE_DontClose
#endif
TEST(MessageAttachmentSet, MAYBE_DontClose) {}

TEST(MessageAttachmentSet, DoClose) {}

}  // namespace
}  // namespace IPC