#include "components/viz/common/surfaces/child_local_surface_id_allocator.h"
#include "components/viz/common/surfaces/parent_local_surface_id_allocator.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace viz {
namespace {
::testing::AssertionResult ParentSequenceNumberIsNotSet(
const LocalSurfaceId& local_surface_id);
::testing::AssertionResult ChildSequenceNumberIsSet(
const LocalSurfaceId& local_surface_id);
::testing::AssertionResult EmbedTokenIsValid(
const LocalSurfaceId& local_surface_id);
}
class ChildLocalSurfaceIdAllocatorTest : public testing::Test { … };
TEST_F(ChildLocalSurfaceIdAllocatorTest,
DefaultConstructorShouldNotSetLocalSurfaceIdComponents) { … }
TEST_F(ChildLocalSurfaceIdAllocatorTest,
UpdateFromParentOnlyUpdatesExpectedLocalSurfaceIdComponents) { … }
TEST_F(ChildLocalSurfaceIdAllocatorTest, UpdateFromParentEmbedTokenChanged) { … }
TEST_F(ChildLocalSurfaceIdAllocatorTest,
GenerateIdOnlyUpdatesExpectedLocalSurfaceIdComponents) { … }
TEST_F(ChildLocalSurfaceIdAllocatorTest, EmbedTokenChangeResetsChildId) { … }
namespace {
::testing::AssertionResult ParentSequenceNumberIsNotSet(
const LocalSurfaceId& local_surface_id) { … }
::testing::AssertionResult ChildSequenceNumberIsSet(
const LocalSurfaceId& local_surface_id) { … }
::testing::AssertionResult EmbedTokenIsValid(
const LocalSurfaceId& local_surface_id) { … }
}
}