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 20, 2024
1 parent 4a8dced commit 9e46da9
Show file tree
Hide file tree
Showing 10 changed files with 20 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
5 changes: 4 additions & 1 deletion media/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,10 @@ test("media_unittests") {
]

if (is_cobalt) {
deps += ["//media/starboard:unit_tests"]
# TODO(b/379934658): add starboard_renderer_test.
# TODO(b/379936173): enable starboard_utils_test.
# TODO(b/379934533): enable bidirectional_fit_reuse_allocator_test.
# deps += ["//media/starboard:unit_tests"]
}

data = [
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: 0 additions & 5 deletions media/media_options.gni
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,6 @@ declare_args() {
media_use_libvpx = false
}

# Chrobalt doesn't use ffmpeg.
if (is_cobalt) {
media_use_ffmpeg = false
}

# Enable usage of OpenH264 within the media library. Used for software based
# encoding of H264 content.
media_use_openh264 = true
Expand Down

0 comments on commit 9e46da9

Please sign in to comment.