chromium/media/base/container_names_unittest.cc

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

#include <stdint.h>

#include "base/files/file_util.h"
#include "media/base/container_names.h"
#include "media/base/test_data_util.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace media {

namespace container_names {

// Using a macros to simplify tests. Since EXPECT_EQ outputs the second argument
// as a string when it fails, this lets the output identify what item actually
// failed.
#define VERIFY(buffer, name)

// Test that small buffers are handled correctly.
TEST(ContainerNamesTest, CheckSmallBuffer) {}

#define BYTE_ORDER_MARK

// Note that the comparisons need at least 12 bytes, so make sure the buffer is
// at least that size.
const char kAmrBuffer[12] =;
uint8_t kAsfBuffer[] =;
const char kAss1Buffer[] =;
const char kAss2Buffer[] =;
uint8_t kCafBuffer[] =;
const char kDtshdBuffer[12] =;
const char kDxaBuffer[16] =;
const char kFlacBuffer[12] =;
uint8_t kFlvBuffer[12] =;
uint8_t kIrcamBuffer[] =;
const char kRm1Buffer[12] =;
const char kRm2Buffer[12] =;
uint8_t kWtvBuffer[] =;
uint8_t kBug263073Buffer[] =;
uint8_t kBug584401Buffer[] =;
uint8_t kBug585243Buffer[] =;

// Test that containers that start with fixed strings are handled correctly.
// This is to verify that the TAG matches the first 4 characters of the string.
TEST(ContainerNamesTest, CheckFixedStrings) {}

// Determine the container type of a specified file.
void TestFile(MediaContainerName expected, const base::FilePath& filename) {}

TEST(ContainerNamesTest, FileCheckOGG) {}

TEST(ContainerNamesTest, FileCheckWAV) {}

TEST(ContainerNamesTest, FileCheckMOV) {}

TEST(ContainerNamesTest, FileCheckWEBM) {}

TEST(ContainerNamesTest, FileCheckMP3) {}

TEST(ContainerNamesTest, FileCheckAC3) {}

TEST(ContainerNamesTest, FileCheckAAC) {}

TEST(ContainerNamesTest, FileCheckAIFF) {}

TEST(ContainerNamesTest, FileCheckASF) {}

TEST(ContainerNamesTest, FileCheckAVI) {}

TEST(ContainerNamesTest, FileCheckEAC3) {}

TEST(ContainerNamesTest, FileCheckFLAC) {}

TEST(ContainerNamesTest, FileCheckFLV) {}

TEST(ContainerNamesTest, FileCheckH261) {}

TEST(ContainerNamesTest, FileCheckH263) {}

TEST(ContainerNamesTest, FileCheckMJPEG) {}

TEST(ContainerNamesTest, FileCheckMPEG2PS) {}

TEST(ContainerNamesTest, FileCheckMPEG2TS) {}

TEST(ContainerNamesTest, FileCheckRM) {}

TEST(ContainerNamesTest, FileCheckSWF) {}

// Try a few non containers.
TEST(ContainerNamesTest, FileCheckUNKNOWN) {}

}  // namespace container_names

}  // namespace media