1
0
Fork 0
firefox/devtools/client/debugger/test/mochitest/integration-tests
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00
..
1-reload-same-original.js Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
2-reload-replaced-original.js Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
3-reload-changed-generated.js Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00
README.md Adding upstream version 140.0. 2025-06-25 09:37:52 +02:00

Integration tests folder

This folder contains all the sub tests ran by the integration tests. The integration tests are in the parent folder and are named browser_dbg-integration-*.js. Each time you execute one of the integration tests, all the sub tests implemented in this folder will be ran. Sub tests will be ran in a precise order, this is why the module names are prefixed by a number.

Sub tests are javascript files which have all typical test helpers available in their scope:

  • devtools/client/shared/test/shared-head.js
  • devtools/client/debugger/test/mochitest/shared-head.js

They should call the addIntegrationTask() method to register a new sub test:

addIntegrationTask(async function testMyNewIntegrationSubTest(
  testServer,
  testUrl,
  { isCompressed }
) {
  info("My new integration sub test");

  // `testServer` is a reference to the fake http server returned by `createVersionizedHttpTestServer()`.
  // This can be useful to better control the actual content delivered by the server.

  // `testUrl` is the URL of the test page the the debugger currently inspects. 

  // The third argument is the environment object, that helps know which particular integration test currently runs.
  // You may have different assertions based on the actual test that runs.
});