tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit ef753365efe7cf5dba0766a0ec4954848cc68c43
parent 0ccab1afc3775c6fa748725589d2c88fec5ba008
Author: Julian Descottes <jdescottes@mozilla.com>
Date:   Sat, 29 Nov 2025 10:37:40 +0000

Bug 1941780 - [bidi] Use bypassCSP when calling executeInGlobal/WithBindings r=Sasha

Depends on D274097

Differential Revision: https://phabricator.services.mozilla.com/D274005

Diffstat:
Mremote/shared/Realm.sys.mjs | 2++
Mremote/test/puppeteer/test/TestExpectations.json | 7-------
Mtesting/web-platform/meta/webdriver/tests/bidi/script/call_function/csp_tentative.py.ini | 30+++---------------------------
Mtesting/web-platform/meta/webdriver/tests/bidi/script/evaluate/csp_tentative.py.ini | 30+++---------------------------
4 files changed, 8 insertions(+), 61 deletions(-)

diff --git a/remote/shared/Realm.sys.mjs b/remote/shared/Realm.sys.mjs @@ -286,6 +286,7 @@ export class WindowRealm extends Realm { executeInGlobal(expression) { this.#enableRealmAutomationFeatures(); return this.#globalObjectReference.executeInGlobal(expression, { + bypassCSP: true, url: this.#window.document.baseURI, }); } @@ -327,6 +328,7 @@ export class WindowRealm extends Realm { __bidi_this: this.#createDebuggerObject(thisParameter), }, { + bypassCSP: true, url: this.#window.document.baseURI, } ); diff --git a/remote/test/puppeteer/test/TestExpectations.json b/remote/test/puppeteer/test/TestExpectations.json @@ -1529,13 +1529,6 @@ "comment": "TODO: add a comment explaining why this expectation is required (include links to issues)" }, { - "testIdPattern": "[waittask.spec] waittask specs Frame.waitForFunction should work with strict CSP policy", - "platforms": ["darwin", "linux", "win32"], - "parameters": ["firefox", "webDriverBiDi"], - "expectations": ["FAIL"], - "comment": "TODO: add a comment explaining why this expectation is required (include links to issues)" - }, - { "testIdPattern": "[worker.spec] Workers can be closed", "platforms": ["darwin", "linux", "win32"], "parameters": ["chrome", "webDriverBiDi"], diff --git a/testing/web-platform/meta/webdriver/tests/bidi/script/call_function/csp_tentative.py.ini b/testing/web-platform/meta/webdriver/tests/bidi/script/call_function/csp_tentative.py.ini @@ -1,36 +1,12 @@ [csp_tentative.py] - [test_default_src_unsafe_inline[eval\]] - expected: FAIL - - [test_default_src_unsafe_inline[new Function\]] - expected: FAIL - [test_default_src_unsafe_inline[promise eval\]] + bug: https://github.com/w3c/webdriver-bidi/issues/1024 expected: FAIL [test_default_src_unsafe_inline[async eval\]] - expected: FAIL - - [test_default_src_unsafe_inline[eval from inline script\]] - expected: FAIL - - [test_default_src_unsafe_inline[eval from preload script\]] + bug: https://github.com/w3c/webdriver-bidi/issues/1024 expected: FAIL [test_default_src_unsafe_inline[async eval from preload script\]] - expected: FAIL - - [test_default_src_unsafe_inline[eval from event handler\]] - expected: FAIL - - [test_default_src_unsafe_inline[nested eval\]] - expected: FAIL - - [test_default_src_unsafe_inline[nested new Function\]] - expected: FAIL - - [test_default_src_unsafe_inline[new Function nested in eval\]] - expected: FAIL - - [test_default_src_unsafe_inline[eval nested in new Function\]] + bug: https://github.com/w3c/webdriver-bidi/issues/1024 expected: FAIL diff --git a/testing/web-platform/meta/webdriver/tests/bidi/script/evaluate/csp_tentative.py.ini b/testing/web-platform/meta/webdriver/tests/bidi/script/evaluate/csp_tentative.py.ini @@ -1,36 +1,12 @@ [csp_tentative.py] - [test_default_src_unsafe_inline[eval\]] - expected: FAIL - - [test_default_src_unsafe_inline[new Function\]] - expected: FAIL - [test_default_src_unsafe_inline[promise eval\]] + bug: https://github.com/w3c/webdriver-bidi/issues/1024 expected: FAIL [test_default_src_unsafe_inline[async eval\]] - expected: FAIL - - [test_default_src_unsafe_inline[eval from inline script\]] - expected: FAIL - - [test_default_src_unsafe_inline[eval from preload script\]] + bug: https://github.com/w3c/webdriver-bidi/issues/1024 expected: FAIL [test_default_src_unsafe_inline[async eval from preload script\]] - expected: FAIL - - [test_default_src_unsafe_inline[eval from event handler\]] - expected: FAIL - - [test_default_src_unsafe_inline[nested eval\]] - expected: FAIL - - [test_default_src_unsafe_inline[nested new Function\]] - expected: FAIL - - [test_default_src_unsafe_inline[new Function nested in eval\]] - expected: FAIL - - [test_default_src_unsafe_inline[eval nested in new Function\]] + bug: https://github.com/w3c/webdriver-bidi/issues/1024 expected: FAIL