Protect __webDriverComplete global from web content introspection

NEW
Unassigned

Status

enhancement
P2
normal
2 years ago
a year ago

People

(Reporter: ato, Unassigned)

Tracking

(Blocks 1 bug)

Version 3
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years 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
(Reporter)

Updated

a year ago
Blocks: webdriver
Priority: P3 → P2
You need to log in before you can comment on or make changes to this bug.