| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "content/renderer/media/media_stream_audio_processor_options.h" | 7 #include "content/renderer/media/media_stream_audio_processor_options.h" |
| 8 #include "content/renderer/media/media_stream_constraints_util.h" | 8 #include "content/renderer/media/media_stream_constraints_util.h" |
| 9 #include "content/renderer/media/media_stream_video_source.h" | 9 #include "content/renderer/media/media_stream_video_source.h" |
| 10 #include "content/renderer/media/mock_constraint_factory.h" | 10 #include "content/renderer/media/mock_constraint_factory.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 const int test_value = 327; | 82 const int test_value = 327; |
| 83 | 83 |
| 84 constraint_factory.basic().width.setExact(test_value); | 84 constraint_factory.basic().width.setExact(test_value); |
| 85 blink::WebMediaConstraints constraints = | 85 blink::WebMediaConstraints constraints = |
| 86 constraint_factory.CreateWebMediaConstraints(); | 86 constraint_factory.CreateWebMediaConstraints(); |
| 87 | 87 |
| 88 int value; | 88 int value; |
| 89 EXPECT_TRUE(GetConstraintValueAsInteger( | 89 EXPECT_TRUE(GetConstraintValueAsInteger( |
| 90 constraints, &blink::WebMediaTrackConstraintSet::width, &value)); | 90 constraints, &blink::WebMediaTrackConstraintSet::width, &value)); |
| 91 EXPECT_EQ(test_value, value); | 91 EXPECT_EQ(test_value, value); |
| 92 |
| 93 // An exact value should also be reflected as min and max. |
| 94 EXPECT_TRUE(GetConstraintMaxAsInteger( |
| 95 constraints, &blink::WebMediaTrackConstraintSet::width, &value)); |
| 96 EXPECT_EQ(test_value, value); |
| 97 EXPECT_TRUE(GetConstraintMinAsInteger( |
| 98 constraints, &blink::WebMediaTrackConstraintSet::width, &value)); |
| 99 EXPECT_EQ(test_value, value); |
| 92 } | 100 } |
| 93 | 101 |
| 94 } // namespace content | 102 } // namespace content |
| OLD | NEW |