Closed Bug 1554374 Opened 5 years ago Closed 5 years ago

Mochitests in remote/ leak when run in isolation

Categories

(Remote Protocol :: Agent, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jdescottes, Assigned: jdescottes)

Details

Attachments

(1 file)

Running any of the following tests in debug will leak windows

  • remote/test/browser/browser_page_frameNavigated.js
  • remote/test/browser/browser_page_runtime_events.js
  • remote/test/browser/browser_runtime_evaluate.js
  • remote/test/browser/browser_runtime_remote_objects.js
  • remote/test/browser/browser_runtime_callFunctionOn.js

I initially thought something was wrong with my machine, but we have similar results on try (with latest central).

Try push running only the "remote" tests:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=9d57be7c1da391e42a9422d265e79ac47f116dd1
-> leaks on all debug builds

I started a try push running all browser chrome mochitests
https://treeherder.mozilla.org/#/jobs?repo=try&revision=a303ec339887732a4c359be96f188670f41c6821
Don't have the results yet but I suspect we won't see any failure related to remote/ tests, otherwise this would fail on central as well.

All those tests share start with the same snippet:

  // Open a test page, to prevent debugging the random default page
  await BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_URI);

  // Start the CDP server
  await RemoteAgent.listen(Services.io.newURI("http://localhost:9222"));

  // Retrieve the chrome-remote-interface library object
  const CDP = await getCDP();

  // Connect to the server
  const client = await CDP({
    target(list) {
      // Ensure debugging the right target, i.e. the one for our test tab.
      return list.find(target => target.url == TEST_URI);
    },
  });
  ok(true, "CDP client has been instantiated");

This should avoid the test failures in debug.

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/60dca41daf70
ContentProcess domains should call super.destructor r=ato
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: