Open Bug 1589006 Opened 5 years ago Updated 2 years ago

Add API to Talos/DAMP to execute script in content processes

Categories

(DevTools :: General, task, P3)

task

Tracking

(Fission Milestone:Future)

Fission Milestone Future

People

(Reporter: jdescottes, Unassigned)

References

(Blocks 2 open bugs)

Details

(Whiteboard: dt-fission-future)

DevTools performance tests (DAMP) are currently using MessageManager in order to run test scripts in the content page.

When we will be able to write Fission scenarios (blocked on Bug 1583914), we should also have an API that can execute scripts in the remote iframes.

To remain consistent with other test suites, it would be great to either reuse SpecialPowers.spawn, or if it's not possible at least make the API identical.

Kris, any suggestion here? Do you think integrating SpecialPowers with Talos is doable (and would not impact the tests performance). Or should we rather write something custom for Talos (maybe sharing bits with SpecialPowers where relevant).

Thanks.

Flags: needinfo?(kmaglione+bmo)
Whiteboard: dt-fission → dt-fission-reserve

Enabling Talos is a prerequisite for enabling Fission in Nightly (M6).

Fission Milestone: --- → M6

I was playing around with adding SpecialPowers to talos in order to directly reuse SpecialPowers.spawn.

I loaded it by adding '${talos}/../../specialpowers' to the list of extensions loaded when running DAMP [1]. After that we can get SpecialPowers actors during DAMP tests, but as soon as SpecialPowers tries to load testing-common dependencies (in my case at https://searchfox.org/mozilla-central/rev/131338e5017bc0283d86fb73844407b9a2155c98/testing/specialpowers/content/SpecialPowersChild.jsm#1699), the operation fails.

I don't think we'll want to load to many test modules in talos, but we will still need to provide a feature similar to SpecialPowers.spawn, and we will most likely have to create a new set of JsWindowActors for that.

[1] https://searchfox.org/mozilla-central/rev/131338e5017bc0283d86fb73844407b9a2155c98/testing/talos/talos/test.py#451

It looks like we, at run time, generate a chrome.manifest file to register the testing-common resources here, at least for mochitests: https://searchfox.org/mozilla-central/rev/652014ca1183c56bc5f04daf01af180d4e50a91c/testing/mochitest/runtests.py#1302-1304

I'm not opposed to making these sorts of things available in Talos (they'd probably make writing certain things much easier), however, it's important that we avoid overhead and secondary effects from these modules during the measurement windows.

Perhaps a logical place to register the testing-common stuff is here within the talos-powers extension:

https://searchfox.org/mozilla-central/rev/652014ca1183c56bc5f04daf01af180d4e50a91c/testing/talos/talos/talos-powers/api.js#387

dt-fission-reserve bugs do not need to block Fission Nightly (M6).

Fission Milestone: M6 → ---

Tracking dt-fission-reserve bugs for Fission MVP until we know whether they really need to block Fission or not.

Fission Milestone: --- → MVP

Loading SpecialPowers for DAMP specifically might be OK, but I'd be reluctant to load it for talos tests in general, since it's pretty heavyweight and would interfere with things like page load metrics.

I'd lean towards just adding the functionality you need to talos-powers, and probably using SpecialPowersSandbox.jsm for the bits you can.

Flags: needinfo?(kmaglione+bmo)

Moving old "dt-fission-reserve" bugs to "dt-fission-future" because they don't block Fission MVP.

Fission Milestone: MVP → Future
Whiteboard: dt-fission-reserve → dt-fission-future
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.