Protect __webDriverComplete global from web content introspection

NEW
Unassigned

Status

Testing
Marionette
P3
normal
9 months ago
3 months ago

People

(Reporter: ato, Unassigned)

Tracking

Version 3
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

9 months ago
This is a follow-up to bug https://bugzilla.mozilla.org/show_bug.cgi?id=1353074, which makes the unloadHandler safe for web content introspection by cloning it into the sandbox.

Making the same change for the __webDriverComplete callback is harder because it is being used by the simpletest harness.  If we clone it into the content sandbox, we cannot reuse it again as we do in sandbox.createSimpleTest:

> sandbox.createSimpleTest = function (window, harness) {
>   let sb = sandbox.create(window);
>   sb = sandbox.augment(sb, harness);
>   sb[FINISH] = () => sb[COMPLETE](harness.generate_results());
>   return sb;
> };

A relevant test to run is testing/marionette/harness/marionette_harness/tests/unit/test_simpletest_sanity.py.
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.