tast/video: Use media-internals for hw accelerator usage check

This CL adds a new function checkIfURLUsesPlatformVideoDecoder()
that digs into chrome://media-internals to find out if a given
URL is being played back with is_platform_video_decoder set or
not -- which is equivalent to hw decoding acceleration or not.

Callsites are updated to pass play.(No)VerifyHWAcceleratorUsed
to TestPlay(); when set to verify, TestPlay() will load the JS
code in the new file chrome_media_internals_utils.js and use it
to figure out if the video was played using an accelerator; the
error histograms are also checked in this case just like ToT
does. This CL removes the logic for reading use-histograms
before and after the test logic since it's not needed anymore.

BUG=chromium:1009335
TEST=tast -verbose run -build=true 100.127.97.100 video.Play* on nocturne

Change-Id: I8d859e38b7c8948b7c3f5993ff5ec65d48cb2a58
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/tast-tests/+/1832413
Tested-by: Miguel Casas <[email protected]>
Reviewed-by: Eric Caruso <[email protected]>
Commit-Queue: Miguel Casas <[email protected]>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/tast-tests/+/1850692
Reviewed-by: Hirokazu Honda <[email protected]>
Commit-Queue: Hirokazu Honda <[email protected]>
Tested-by: Hirokazu Honda <[email protected]>
17 files changed
tree: 0751f74992d4ccb6e6e9a113269ebb55fae0aa07
  1. helpers/
  2. src/
  3. tools/
  4. .gitignore
  5. OWNERS
  6. PRESUBMIT.cfg
  7. README.md
README.md

Tast (tests)

This repository contains integration tests that are run by Tast.

Directory structure

  • helpers/ - Source code for binaries executed by tests.
    • local/ - Helpers for local tests that are compiled and installed to /usr/local/libexec/tast/helpers/local/cros by the tast-local-helpers-cros package.
  • src/chromiumos/tast/
    • local/ - Code related to local (i.e. on-device or “client”) tests.
      • bundles/ - Local test bundles.
        • cros/ - The “cros” local test bundle, containing standard Chrome OS tests. Tests are packaged by category.
      • ... - Packages used only by local tests.
    • remote/ - Code related to remote (i.e. off-device or “server”) tests.
      • bundles/ - Remote test bundles.
        • cros/ - The “cros” remote test bundle, containing standard Chrome OS tests. Tests are packaged by category.
      • ... - Packages used only by remote tests.

Shared code, the main tast executable, the local_test_runner and remote_test_runner executables responsible for running bundles, and documentation are located in the tast repository.

GoDoc