Commit 5c2680d6 authored by Chris Cunningham's avatar Chris Cunningham Committed by Commit Bot

Add tests for blink/renderer/modules/media_capabilities/

Module was historically pretty simple boilerplate. Recently we've added
new ML backends and complicated logic to organize all the backend
callbacks. New unit tests cover all orderings and combinations of
backend behavior.

This also adds a unit test against floating point truncation.
Bug: 1024399, 1049339

Change-Id: I9b9f90f3ba7cc799d0294ddb1ee3ac116399ad4f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2088494
Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
Reviewed-by: default avatarMounir Lamouri <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#754671}
parent d9c02cf5
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Copyright (c) 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......
......@@ -311,6 +311,7 @@ jumbo_source_set("unit_tests") {
"manifest/manifest_parser_unittest.cc",
"manifest/manifest_type_converters_unittest.cc",
"media/webmediaplayer_util_unittest.cc",
"media_capabilities/media_capabilities_test.cc",
"media_controls/elements/media_control_animated_arrow_container_element_test.cc",
"media_controls/elements/media_control_display_cutout_fullscreen_button_element_test.cc",
"media_controls/elements/media_control_input_element_test.cc",
......@@ -465,9 +466,13 @@ jumbo_source_set("unit_tests") {
deps = [
":modules",
":modules_testing",
"//base",
"//base/test:test_support",
"//build:chromecast_buildflags",
"//components/schema_org/common:mojom_blink",
"//media:test_support",
"//media/mojo/mojom",
"//mojo/public/cpp/bindings",
"//net:quic_test_tools",
"//services/device/public/cpp:test_support",
"//skia",
......@@ -475,6 +480,7 @@ jumbo_source_set("unit_tests") {
"//testing/gtest",
"//third_party/blink/public:blink_headers",
"//third_party/blink/renderer/core",
"//third_party/blink/renderer/core:unit_test_support",
"//third_party/blink/renderer/modules/gamepad:unit_tests",
"//third_party/blink/renderer/modules/hid:unit_tests",
"//third_party/blink/renderer/modules/native_file_system:unit_tests",
......
......@@ -13,3 +13,12 @@ include_rules = [
"+third_party/blink/renderer/modules/mediarecorder/media_recorder_handler.h",
"+third_party/blink/renderer/modules/modules_export.h",
]
specific_include_rules = {
"media_capabilities_test\.cc": [
"+base/run_loop.h",
"+base/strings/string_number_conversions.h",
"+base/test/bind_test_util.h",
"+media/mojo/mojom/watch_time_recorder.mojom-blink.h",
],
}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment