Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Unified Diff: media/cdm/cenc_utils_unittest.cc

Issue 2228213002: EME: Specify the correct size for PSSH boxes in tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/cdm/cenc_utils_unittest.cc
diff --git a/media/cdm/cenc_utils_unittest.cc b/media/cdm/cenc_utils_unittest.cc
index c124cbd2d21d686473636b8e22f522af38a29593..1b038ff4457bc1ee6c54d5ed6c340cb2f685f6c1 100644
--- a/media/cdm/cenc_utils_unittest.cc
+++ b/media/cdm/cenc_utils_unittest.cc
@@ -7,6 +7,8 @@
#include <stddef.h>
#include <stdint.h>
+#include <limits>
+
#include "base/logging.h"
#include "base/macros.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -54,6 +56,7 @@ class CencUtilsTest : public testing::Test {
box->reserve(size);
// Add size.
+ DCHECK(size < std::numeric_limits<uint8_t>::max());
box->push_back(0);
box->push_back(0);
box->push_back(0);

Powered by Google App Engine
This is Rietveld 408576698