Index: media/gpu/BUILD.gn |
diff --git a/media/gpu/BUILD.gn b/media/gpu/BUILD.gn |
index 2bd2fe0af0253f48b0c5aee6aea84c801dbd1f1d..4247b9f856e2f1a4f2bb9361a3011ef83f584cf3 100644 |
--- a/media/gpu/BUILD.gn |
+++ b/media/gpu/BUILD.gn |
@@ -523,6 +523,41 @@ if (is_chromeos) { |
} |
} |
+source_set("unit_tests") { |
+ testonly = true |
+ deps = [ |
+ "//base", |
+ "//media/base:test_support", |
+ "//media/gpu", |
+ "//testing/gtest", |
+ ] |
+ sources = [ |
+ "h264_decoder_unittest.cc", |
+ ] |
+ |
+ # The following sources are only used in chrome os and windows but they are |
kcwu
2017/03/20 08:28:09
IIUC, we can add them to sources unconditionally.
Owen Lin
2017/03/20 09:29:27
Done.
|
+ # actually platform independent. |
+ if (!is_chromeos && !is_win) { |
+ sources += [ |
+ "accelerated_video_decoder.h", |
+ "h264_decoder.cc", |
+ "h264_decoder.h", |
+ "h264_dpb.cc", |
+ "h264_dpb.h", |
+ ] |
+ } |
+ |
+ if (is_android) { |
+ deps += [ |
+ # The test needs the java dependencies to add the java classes for their |
+ # native counterparts to the test apk. |
+ ":android_video_decode_accelerator_unittests", |
+ "//media/base/android:media_java", |
+ "//ui/android:ui_java", |
+ ] |
+ } |
+} |
+ |
test("video_decode_accelerator_service_unittest") { |
sources = [ |
"ipc/service/gpu_jpeg_decode_accelerator_unittest.cc", |