| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "build/build_config.h" | 6 #include "build/build_config.h" |
| 7 #include "content/browser/webrtc/webrtc_webcam_browsertest.h" | 7 #include "content/browser/webrtc/webrtc_webcam_browsertest.h" |
| 8 #include "content/public/common/content_switches.h" | 8 #include "content/public/common/content_switches.h" |
| 9 #include "content/public/test/browser_test_utils.h" | 9 #include "content/public/test/browser_test_utils.h" |
| 10 #include "content/public/test/content_browser_test.h" | 10 #include "content/public/test/content_browser_test.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 namespace { | 34 namespace { |
| 35 | 35 |
| 36 static const char kImageCaptureHtmlFile[] = "/media/image_capture_test.html"; | 36 static const char kImageCaptureHtmlFile[] = "/media/image_capture_test.html"; |
| 37 | 37 |
| 38 // TODO(mcasas): enable real-camera tests by disabling the Fake Device for | 38 // TODO(mcasas): enable real-camera tests by disabling the Fake Device for |
| 39 // platforms where the ImageCaptureCode is landed, https://crbug.com/656810 | 39 // platforms where the ImageCaptureCode is landed, https://crbug.com/656810 |
| 40 static struct TargetCamera { | 40 static struct TargetCamera { |
| 41 bool use_fake; | 41 bool use_fake; |
| 42 } const kTestParameters[] = { | 42 } const kTestParameters[] = { |
| 43 {true}, | 43 {true}, |
| 44 #if !defined(OS_LINUX) | 44 #if defined(OS_LINUX) |
| 45 {false} | 45 {false} |
| 46 #endif | 46 #endif |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 } // namespace | 49 } // namespace |
| 50 | 50 |
| 51 // This class is the content_browsertests for Image Capture API, which allows | 51 // This class is the content_browsertests for Image Capture API, which allows |
| 52 // for capturing still images out of a MediaStreamTrack. Is a | 52 // for capturing still images out of a MediaStreamTrack. Is a |
| 53 // WebRtcWebcamBrowserTest to be able to use a physical camera. | 53 // WebRtcWebcamBrowserTest to be able to use a physical camera. |
| 54 class WebRtcImageCaptureBrowserTest | 54 class WebRtcImageCaptureBrowserTest |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 IN_PROC_BROWSER_TEST_P(WebRtcImageCaptureBrowserTest, MAYBE_GrabFrame) { | 126 IN_PROC_BROWSER_TEST_P(WebRtcImageCaptureBrowserTest, MAYBE_GrabFrame) { |
| 127 embedded_test_server()->StartAcceptingConnections(); | 127 embedded_test_server()->StartAcceptingConnections(); |
| 128 ASSERT_TRUE(RunImageCaptureTestCase("testCreateAndGrabFrame()")); | 128 ASSERT_TRUE(RunImageCaptureTestCase("testCreateAndGrabFrame()")); |
| 129 } | 129 } |
| 130 | 130 |
| 131 INSTANTIATE_TEST_CASE_P(, | 131 INSTANTIATE_TEST_CASE_P(, |
| 132 WebRtcImageCaptureBrowserTest, | 132 WebRtcImageCaptureBrowserTest, |
| 133 testing::ValuesIn(kTestParameters)); | 133 testing::ValuesIn(kTestParameters)); |
| 134 | 134 |
| 135 } // namespace content | 135 } // namespace content |
| OLD | NEW |