| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2008 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2008 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #include "webrtc/base/gunit.h" | |
| 12 #include "webrtc/media/base/videocommon.h" | 11 #include "webrtc/media/base/videocommon.h" |
| 12 #include "webrtc/rtc_base/gunit.h" |
| 13 | 13 |
| 14 namespace cricket { | 14 namespace cricket { |
| 15 | 15 |
| 16 TEST(VideoCommonTest, TestCanonicalFourCC) { | 16 TEST(VideoCommonTest, TestCanonicalFourCC) { |
| 17 // Canonical fourccs are not changed. | 17 // Canonical fourccs are not changed. |
| 18 EXPECT_EQ(FOURCC_I420, CanonicalFourCC(FOURCC_I420)); | 18 EXPECT_EQ(FOURCC_I420, CanonicalFourCC(FOURCC_I420)); |
| 19 // The special FOURCC_ANY value is not changed. | 19 // The special FOURCC_ANY value is not changed. |
| 20 EXPECT_EQ(FOURCC_ANY, CanonicalFourCC(FOURCC_ANY)); | 20 EXPECT_EQ(FOURCC_ANY, CanonicalFourCC(FOURCC_ANY)); |
| 21 // Aliases are translated to the canonical equivalent. | 21 // Aliases are translated to the canonical equivalent. |
| 22 EXPECT_EQ(FOURCC_I420, CanonicalFourCC(FOURCC_IYUV)); | 22 EXPECT_EQ(FOURCC_I420, CanonicalFourCC(FOURCC_IYUV)); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 format2 = format; | 85 format2 = format; |
| 86 format2.interval /= 2; | 86 format2.interval /= 2; |
| 87 EXPECT_TRUE(format.IsPixelRateLess(format2)); | 87 EXPECT_TRUE(format.IsPixelRateLess(format2)); |
| 88 | 88 |
| 89 format2 = format; | 89 format2 = format; |
| 90 format2.width *= 2; | 90 format2.width *= 2; |
| 91 EXPECT_TRUE(format.IsPixelRateLess(format2)); | 91 EXPECT_TRUE(format.IsPixelRateLess(format2)); |
| 92 } | 92 } |
| 93 | 93 |
| 94 } // namespace cricket | 94 } // namespace cricket |
| OLD | NEW |