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

Unified Diff: content/renderer/media/media_stream_constraints_util.cc

Issue 2393923002: Add unit tests for webrtc_media_stream_adapter.cc (Closed)
Patch Set: Renamed test function Created 4 years, 2 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
« no previous file with comments | « no previous file | content/renderer/media/media_stream_video_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/media_stream_constraints_util.cc
diff --git a/content/renderer/media/media_stream_constraints_util.cc b/content/renderer/media/media_stream_constraints_util.cc
index 3150c94c547d767f3d137758dba962bc0bf73c36..8c886bd68bd45f077d0f1c84428837c097282fe5 100644
--- a/content/renderer/media/media_stream_constraints_util.cc
+++ b/content/renderer/media/media_stream_constraints_util.cc
@@ -17,6 +17,7 @@ template <typename P, typename T>
bool ScanConstraintsForExactValue(const blink::WebMediaConstraints& constraints,
P picker,
T* value) {
+ DCHECK(!constraints.isNull());
const auto& the_field = constraints.basic().*picker;
if (the_field.hasExact()) {
*value = the_field.exact();
@@ -36,6 +37,7 @@ template <typename P, typename T>
bool ScanConstraintsForMaxValue(const blink::WebMediaConstraints& constraints,
P picker,
T* value) {
+ DCHECK(!constraints.isNull());
const auto& the_field = constraints.basic().*picker;
if (the_field.hasMax()) {
*value = the_field.max();
@@ -63,6 +65,7 @@ template <typename P, typename T>
bool ScanConstraintsForMinValue(const blink::WebMediaConstraints& constraints,
P picker,
T* value) {
+ DCHECK(!constraints.isNull());
const auto& the_field = constraints.basic().*picker;
if (the_field.hasMin()) {
*value = the_field.min();
« no previous file with comments | « no previous file | content/renderer/media/media_stream_video_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698