| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include <string> |
| 6 |
| 7 #include "media/capture/video/linux/camera_facing_chromeos.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 |
| 10 namespace media { |
| 11 |
| 12 TEST(CameraFacingChromeOSTest, ParseSuccessfully) { |
| 13 CameraFacingChromeOS camera_facing("fake_camera_characteristics.conf"); |
| 14 EXPECT_EQ(CameraFacingChromeOS::LensFacing::BACK, |
| 15 camera_facing.GetCameraFacing(std::string("/dev/video2"), |
| 16 std::string("04f2:b53a"))); |
| 17 } |
| 18 |
| 19 TEST(CameraFacingChromeOSTest, ConfigFileNotExist) { |
| 20 CameraFacingChromeOS camera_facing("file_not_exist"); |
| 21 EXPECT_EQ(CameraFacingChromeOS::LensFacing::FRONT, |
| 22 camera_facing.GetCameraFacing(std::string("/dev/video2"), |
| 23 std::string("04f2:b53a"))); |
| 24 } |
| 25 |
| 26 } // namespace media |
| OLD | NEW |