Skip to content

Commit

Permalink
[media] Enable media_unittests for all platforms
Browse files Browse the repository at this point in the history
Enable `media_unittests` for Cobalt, and list three tasks for the following unit_tests:
- StarboardRenderer: b/379934658
- BidirectionalFitReuseAllocator: b/379934533
- starboard_utils_test: b/379936173
- Disable ffmpeg: b/378909148

This PR also fixed building content_shell_apk target on android.

b/379927913
  • Loading branch information
borongc committed Nov 19, 2024
1 parent 8125775 commit 90ec308
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .github/config/android-arm.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"gpu_unittests",
"gin_unittests",
"blink_unittests",
"content_shell",
"media_unittests",
"content_shell_apk",
"system_webview_apk",
"system_webview_shell_apk",
"cobalt:gn_all"
Expand Down
3 changes: 2 additions & 1 deletion .github/config/android-arm64.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"gpu_unittests",
"gin_unittests",
"blink_unittests",
"content_shell",
"media_unittests",
"content_shell_apk",
"system_webview_apk",
"system_webview_shell_apk",
"cobalt:gn_all"
Expand Down
3 changes: 2 additions & 1 deletion .github/config/android-x86.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"gpu_unittests",
"gin_unittests",
"blink_unittests",
"content_shell",
"media_unittests",
"content_shell_apk",
"system_webview_apk",
"system_webview_shell_apk",
"cobalt:gn_all"
Expand Down
3 changes: 2 additions & 1 deletion .github/config/chromium_android-arm.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"gpu_unittests",
"gin_unittests",
"blink_unittests",
"content_shell",
"media_unittests",
"content_shell_apk",
"system_webview_apk",
"system_webview_shell_apk"
],
Expand Down
3 changes: 2 additions & 1 deletion .github/config/chromium_android-arm64.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"gpu_unittests",
"gin_unittests",
"blink_unittests",
"content_shell",
"media_unittests",
"content_shell_apk",
"system_webview_apk",
"system_webview_shell_apk"
],
Expand Down
3 changes: 2 additions & 1 deletion .github/config/chromium_android-x86.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"gpu_unittests",
"gin_unittests",
"blink_unittests",
"content_shell",
"media_unittests",
"content_shell_apk",
"system_webview_apk",
"system_webview_shell_apk"
],
Expand Down
1 change: 1 addition & 0 deletions .github/config/chromium_linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"gpu_unittests",
"gin_unittests",
"blink_unittests",
"media_unittests",
"content_shell"
],
"includes": [
Expand Down
1 change: 1 addition & 0 deletions .github/config/linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"gpu_unittests",
"gin_unittests",
"blink_unittests",
"media_unittests",
"content_shell",
"cobalt:gn_all"
],
Expand Down
3 changes: 3 additions & 0 deletions media/base/mock_filters.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ class MockPipeline : public Pipeline {
}
MOCK_METHOD2(OnSetCdm,
void(CdmContext* cdm_context, CdmAttachedCB& cdm_attached_cb));
#if BUILDFLAG(USE_STARBOARD_MEDIA)
MOCK_METHOD0(GetSetBoundsCB, SetBoundsCB());
#endif // BUILDFLAG(USE_STARBOARD_MEDIA)
};

class MockMediaResource : public MediaResource {
Expand Down
5 changes: 3 additions & 2 deletions media/media_options.gni
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ declare_args() {
media_use_libvpx = false
}

# Chrobalt doesn't use ffmpeg.
if (is_cobalt) {
media_use_ffmpeg = false
# TODO(b/378909148): Chrobalt doesn't use ffmpeg.
# Comment it as it breaks media_unittests.
#media_use_ffmpeg = false
}

# Enable usage of OpenH264 within the media library. Used for software based
Expand Down
8 changes: 4 additions & 4 deletions media/starboard/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ source_set("unit_tests") {
testonly = true
sources = []
if (use_starboard_media) {
sources += [
"bidirectional_fit_reuse_allocator_test.cc",
"starboard_utils_test.cc",
]
# TODO(b/379934658): add starboard_renderer_test.
# TODO(b/379936173): enable starboard_utils_test
# TODO(b/379934533): enable bidirectional_fit_reuse_allocator_test.
sources += []
}
configs += [ "//media:media_config" ]
deps = [
Expand Down

0 comments on commit 90ec308

Please sign in to comment.