Jim Blandy ff55bde7d7 Bug 1961960: Additional mochitest changes for enabling WebGPU in early beta r=webgpu-reviewers,ErichDonGubler
Add mochitests to verify that WebGPU is enabled/disabled to the
appropriate degree for the current Firefox build.

- In nightly builds, WebGPU should always be available. Specifically,
  `navigator.gpu.requestAdapter`'s promise should not be rejected.

- In early beta builds:

  - On Windows, `requestAdapter`'s promise should not be rejected.

  - On all other platforms, it should be rejected.

- In late beta and release builds, the `navigator.gpu` property should
  not be present.

In `dom/webgpu/tests/mochitest`:

- In the main `mochitest.toml` suite: change the `run-if` condition to
  match the check used in `gfxPlatform::InitWebGPUConfig`: WebGPU is
  enabled in nightly builds on all platforms, and in early beta builds
  on Windows, and is disabled under all other circumstances.

- Add a new Mochitest suite, `mochitest-disabled.toml`, to run when we
  expect `requestAdapter`'s promise to be rejected.

- Add two new tests, `test_adapter_enabled.html` and
  `test_adapter_disabled.html`, to the appropriate suites above, that
  do nothing but ensure that `requestAdapter`'s promise is
  resolved/rejected when it should be.

- In the `mochitest-no-pref.toml` suite, change the `run-if` condition
  to match the condition that determines thet `dom.webgpu.enabled`
  pref's default value.

- Add a comment to `gfxPlatform::InitWebGPUConfig` reminding people to
  update the mochitest conditions, although the test failures will
  remind them as well.

Differential Revision: https://phabricator.services.mozilla.com/D246381
2025-04-26 20:03:38 +00:00

An explanation of the Firefox Source Code Directory Structure and links to
project pages with documentation can be found at:

    https://firefox-source-docs.mozilla.org/contributing/directory_structure.html

For information on how to build Firefox from the source code and create the patch see:

    https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html

If you have a question about developing Firefox, and can't find the solution
on https://firefox-source-docs.mozilla.org/, you can try asking your question on Matrix at chat.mozilla.org in `Introduction` (https://chat.mozilla.org/#/room/#introduction:mozilla.org) channel.


Nightly development builds can be downloaded from:

    https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/
            - or -
    https://www.mozilla.org/firefox/channel/desktop/#nightly

Keep in mind that nightly builds, which are used by Firefox developers for
testing, may be buggy.
Description
Preconfigured browser for YouTube's TV interface
Readme 5.5 GiB
Languages
JavaScript 32.6%
C++ 25.1%
HTML 20.9%
C 10.6%
Python 2.8%
Other 7.6%