chromium/gpu/command_buffer/service/command_buffer_service_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.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

// Tests for the command parser.

#include <stddef.h>

#include <memory>

#include "base/check_op.h"
#include "gpu/command_buffer/client/client_test_helper.h"
#include "gpu/command_buffer/service/command_buffer_service.h"
#include "gpu/command_buffer/service/mocks.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace gpu {

_;
DoAll;
Mock;
Return;
Sequence;
SetArgPointee;

// Test fixture for CommandBufferService test - Creates a mock
// AsyncAPIInterface, and a fixed size memory buffer. Also provides a simple API
// to create a CommandBufferService.
class CommandBufferServiceTest : public testing::Test,
                                 public CommandBufferServiceClient {};

// Tests initialization conditions.
TEST_F(CommandBufferServiceTest, TestInit) {}

TEST_F(CommandBufferServiceTest, TestEmpty) {}

// Tests simple commands.
TEST_F(CommandBufferServiceTest, TestSimple) {}

// Tests having multiple commands in the buffer.
TEST_F(CommandBufferServiceTest, TestMultipleCommands) {}

// Tests that the parser will wrap correctly at the end of the buffer.
TEST_F(CommandBufferServiceTest, TestWrap) {}

// Tests error conditions.
TEST_F(CommandBufferServiceTest, TestError) {}

TEST_F(CommandBufferServiceTest, SetBuffer) {}

TEST_F(CommandBufferServiceTest, InvalidSetBuffer) {}

TEST_F(CommandBufferServiceTest, Token) {}

TEST_F(CommandBufferServiceTest, CanSetParseError) {}

class CommandBufferServicePauseExecutionTest : public CommandBufferServiceTest {};

TEST_F(CommandBufferServicePauseExecutionTest, CommandsProcessed) {}

TEST_F(CommandBufferServicePauseExecutionTest, PauseExecution) {}

class CommandBufferServiceUnscheduleExecutionTest
    : public CommandBufferServiceTest {};

TEST_F(CommandBufferServiceUnscheduleExecutionTest, Unschedule) {}

}  // namespace gpu