| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "modules/mediastream/MediaConstraintsImpl.h" | 5 #include "modules/mediastream/MediaConstraintsImpl.h" |
| 6 #include "modules/mediastream/MediaTrackConstraints.h" | 6 #include "modules/mediastream/MediaTrackConstraints.h" |
| 7 #include "public/platform/WebMediaConstraints.h" | 7 #include "public/platform/WebMediaConstraints.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 ASSERT_EQ(2U, output.advanced().size()); | 244 ASSERT_EQ(2U, output.advanced().size()); |
| 245 MediaTrackConstraintSet element1 = output.advanced()[0]; | 245 MediaTrackConstraintSet element1 = output.advanced()[0]; |
| 246 MediaTrackConstraintSet element2 = output.advanced()[1]; | 246 MediaTrackConstraintSet element2 = output.advanced()[1]; |
| 247 | 247 |
| 248 ASSERT_TRUE(output.hasFacingMode()); | 248 ASSERT_TRUE(output.hasFacingMode()); |
| 249 ASSERT_TRUE(output.facingMode().isString()); | 249 ASSERT_TRUE(output.facingMode().isString()); |
| 250 EXPECT_EQ("ideal", output.facingMode().getAsString()); | 250 EXPECT_EQ("ideal", output.facingMode().getAsString()); |
| 251 | 251 |
| 252 ASSERT_TRUE(element1.hasFacingMode()); | 252 ASSERT_TRUE(element1.hasFacingMode()); |
| 253 ASSERT_TRUE(element1.facingMode().isConstrainDOMStringParameters()); | 253 ASSERT_TRUE(element1.facingMode().isConstrainDOMStringParameters()); |
| 254 EXPECT_EQ("ideal", element1.facingMode() | 254 EXPECT_EQ("ideal", |
| 255 .getAsConstrainDOMStringParameters() | 255 element1.facingMode() |
| 256 .ideal() | 256 .getAsConstrainDOMStringParameters() |
| 257 .getAsString()); | 257 .ideal() |
| 258 .getAsString()); |
| 258 | 259 |
| 259 ASSERT_TRUE(element2.hasFacingMode()); | 260 ASSERT_TRUE(element2.hasFacingMode()); |
| 260 ASSERT_TRUE(element2.facingMode().isString()); | 261 ASSERT_TRUE(element2.facingMode().isString()); |
| 261 EXPECT_EQ("exact", element2.facingMode().getAsString()); | 262 EXPECT_EQ("exact", element2.facingMode().getAsString()); |
| 262 } | 263 } |
| 263 | 264 |
| 264 } // namespace blink | 265 } // namespace blink |
| OLD | NEW |