OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <map> | 5 #include <map> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "testing/gmock/include/gmock/gmock.h" | 24 #include "testing/gmock/include/gmock/gmock.h" |
25 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
26 | 26 |
27 using ::testing::_; | 27 using ::testing::_; |
28 using ::testing::AtLeast; | 28 using ::testing::AtLeast; |
29 using ::testing::AnyNumber; | 29 using ::testing::AnyNumber; |
30 using ::testing::DoAll; | 30 using ::testing::DoAll; |
31 using ::testing::InSequence; | 31 using ::testing::InSequence; |
32 using ::testing::Mock; | 32 using ::testing::Mock; |
33 using ::testing::Return; | 33 using ::testing::Return; |
| 34 using content::BrowserThread; |
34 | 35 |
35 // Id used to identify the capture session between renderer and | 36 // Id used to identify the capture session between renderer and |
36 // video_capture_host. | 37 // video_capture_host. |
37 static const int kDeviceId = 1; | 38 static const int kDeviceId = 1; |
38 // Id of a video capture device | 39 // Id of a video capture device |
39 static const media::VideoCaptureSessionId kTestFakeDeviceId = | 40 static const media::VideoCaptureSessionId kTestFakeDeviceId = |
40 media_stream::VideoCaptureManager::kStartOpenSessionId; | 41 media_stream::VideoCaptureManager::kStartOpenSessionId; |
41 | 42 |
42 // Define to enable test where video is dumped to file. | 43 // Define to enable test where video is dumped to file. |
43 // #define DUMP_VIDEO | 44 // #define DUMP_VIDEO |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 } | 399 } |
399 | 400 |
400 #ifdef DUMP_VIDEO | 401 #ifdef DUMP_VIDEO |
401 TEST_F(VideoCaptureHostTest, CaptureAndDumpVideoVga) { | 402 TEST_F(VideoCaptureHostTest, CaptureAndDumpVideoVga) { |
402 CaptureAndDumpVideo(640, 480, 30); | 403 CaptureAndDumpVideo(640, 480, 30); |
403 } | 404 } |
404 TEST_F(VideoCaptureHostTest, CaptureAndDump720P) { | 405 TEST_F(VideoCaptureHostTest, CaptureAndDump720P) { |
405 CaptureAndDumpVideo(1280, 720, 30); | 406 CaptureAndDumpVideo(1280, 720, 30); |
406 } | 407 } |
407 #endif | 408 #endif |
OLD | NEW |