chromium/media/formats/webm/webm_parser_unittest.cc

// Copyright 2014 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/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "media/formats/webm/webm_parser.h"

#include <stddef.h>
#include <stdint.h>

#include <memory>

#include "media/formats/webm/cluster_builder.h"
#include "media/formats/webm/webm_constants.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

InSequence;
Return;
ReturnNull;
StrictMock;
_;

namespace media {

enum {};

class MockWebMParserClient : public WebMParserClient {};

class WebMParserTest : public testing::Test {};

static std::unique_ptr<Cluster> CreateCluster(int block_count) {}

static void CreateClusterExpectations(int block_count,
                                      bool is_complete_cluster,
                                      MockWebMParserClient* client) {}

TEST_F(WebMParserTest, EmptyCluster) {}

TEST_F(WebMParserTest, EmptyClusterInSegment) {}

// Test the case where a non-list child element has a size
// that is beyond the end of the parent.
TEST_F(WebMParserTest, ChildNonListLargerThanParent) {}

// Test the case where a list child element has a size
// that is beyond the end of the parent.
TEST_F(WebMParserTest, ChildListLargerThanParent) {}

// Expecting to parse a Cluster, but get a Segment.
TEST_F(WebMParserTest, ListIdDoesNotMatch) {}

TEST_F(WebMParserTest, InvalidElementInList) {}

// Test specific case of InvalidElementInList to verify EBMLHEADER within
// known-sized cluster causes parse error.
TEST_F(WebMParserTest, InvalidEBMLHeaderInCluster) {}

// Verify that EBMLHEADER ends a preceding "unknown"-sized CLUSTER.
TEST_F(WebMParserTest, UnknownSizeClusterFollowedByEBMLHeader) {}

TEST_F(WebMParserTest, VoidAndCRC32InList) {}


TEST_F(WebMParserTest, ParseListElementWithSingleCall) {}

TEST_F(WebMParserTest, ParseListElementWithMultipleCalls) {}

TEST_F(WebMParserTest, Reset) {}

// Test the case where multiple clients are used for different lists.
TEST_F(WebMParserTest, MultipleClients) {}

// Test the case where multiple clients are used for different lists.
TEST_F(WebMParserTest, InvalidClient) {}

TEST_F(WebMParserTest, ReservedIds) {}

TEST_F(WebMParserTest, ReservedSizes) {}

TEST_F(WebMParserTest, ZeroPaddedStrings) {}

}  // namespace media