| Index: third_party/WebKit/Source/modules/mediastream/MediaConstraintsImpl.cpp
|
| diff --git a/third_party/WebKit/Source/modules/mediastream/MediaConstraintsImpl.cpp b/third_party/WebKit/Source/modules/mediastream/MediaConstraintsImpl.cpp
|
| index 39fac457fd7c4a97d9e9e19b84159eb537c2b912..ee8148fb7b52fc73a0bb5768f49e01e67328534b 100644
|
| --- a/third_party/WebKit/Source/modules/mediastream/MediaConstraintsImpl.cpp
|
| +++ b/third_party/WebKit/Source/modules/mediastream/MediaConstraintsImpl.cpp
|
| @@ -354,7 +354,10 @@ static void parseOldStyleNames(const WebVector<WebMediaConstraint>& oldNames, We
|
| result.googPayloadPadding.setExact(toBoolean(constraint.m_value));
|
| } else if (constraint.m_name.equals(kTestConstraint1)
|
| || constraint.m_name.equals(kTestConstraint2)) {
|
| - // These constraints are only for testing parsing. Ignore them.
|
| + // These constraints are only for testing parsing.
|
| + // Values 0 and 1 are legal, all others are a ConstraintError.
|
| + if (!constraint.m_value.equals("0") && !constraint.m_value.equals("1"))
|
| + errorState.throwConstraintError("Illegal value for constraint", constraint.m_name);
|
| } else {
|
| // TODO(hta): UMA stats for unknown constraints passed.
|
| // https://crbug.com/576613
|
|
|