Chromium Code Reviews| Index: media/formats/mp4/dolby_vision_unittest.cc |
| diff --git a/media/formats/mp4/dolby_vision_unittest.cc b/media/formats/mp4/dolby_vision_unittest.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e5426079cab7478c238709f534b8ab951304b99c |
| --- /dev/null |
| +++ b/media/formats/mp4/dolby_vision_unittest.cc |
| @@ -0,0 +1,42 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
|
wolenetz
2017/01/25 23:42:42
s/2016/2017/ here and elsewhere in totally new sou
wolenetz
2017/01/25 23:42:42
These test cases test for unsupported (and not eve
erickung1
2017/02/03 18:18:32
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "media/formats/mp4/dolby_vision.h" |
| + |
| +#include "testing/gtest/include/gtest/gtest.h" |
| + |
| +namespace media { |
| +namespace mp4 { |
| + |
| +class DolbyVisionConfigurationTest : public testing::Test {}; |
| + |
| +TEST_F(DolbyVisionConfigurationTest, Profile5Test) { |
| + DolbyVisionConfiguration dv_config; |
| + uint8_t data[] = {0x00, 0x00, 0x0A, 0x05}; |
| + |
| + dv_config.Parse(data, sizeof(data)); |
| + |
| + EXPECT_EQ(dv_config.codec_profile, DOLBYVISION_PROFILE5); |
| +} |
| + |
| +TEST_F(DolbyVisionConfigurationTest, Profile6WithBLTest) { |
| + DolbyVisionConfiguration dv_config; |
| + uint8_t data[] = {0x00, 0x00, 0x0C, 0x07}; |
| + |
| + dv_config.Parse(data, sizeof(data)); |
| + |
| + EXPECT_EQ(dv_config.codec_profile, DOLBYVISION_PROFILE6); |
| +} |
| + |
| +TEST_F(DolbyVisionConfigurationTest, Profile3Test) { |
| + DolbyVisionConfiguration dv_config; |
| + uint8_t data[] = {0x00, 0x00, 0x06, 0x07}; |
| + |
| + dv_config.Parse(data, sizeof(data)); |
| + |
| + EXPECT_EQ(dv_config.codec_profile, DOLBYVISION_PROFILE3); |
| +} |
| + |
| +} // namespace mp4 |
| +} // namespace media |