Closed Bug 1620591 Opened 1 year ago Closed 1 year ago

[wpt-sync] Sync PR 22118 - Make Trusted Types ununforgeable.

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 22118 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/22118
Details from upstream follow.

Mike West <mkwst@chromium.org> wrote:

Make Trusted Types ununforgeable.

Context: https://github.com/w3c/webappsec-trusted-types/issues/257

Bug: 1058400
Change-Id: Ie91e8ad7e8eff814e3aaa1d940ca0bc1d6c2f09e
Reviewed-on: https://chromium-review.googlesource.com/2089705
WPT-Export-Revision: 1836186929aad5ca3d523f3e575c3bc8f00bbab3

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

Ran 13 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 48 tests

Status Summary

Firefox

OK : 2
PASS: 2[GitHub] 48[Gecko-android-em-7.0-x86_64-debug-geckoview, Gecko-android-em-7.0-x86_64-opt-geckoview, Gecko-linux1804-64-asan-opt, Gecko-linux1804-64-debug, Gecko-linux1804-64-opt, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows10-64-debug, Gecko-windows10-64-opt, Gecko-windows10-64-qr-debug, Gecko-windows10-64-qr-opt, Gecko-windows7-32-debug, Gecko-windows7-32-opt]
FAIL: 61

Chrome

OK : 2
PASS: 49
FAIL: 14

Safari

OK : 2
PASS: 2
FAIL: 61

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/trusted-types/TrustedTypePolicyFactory-isXXX.tentative.html
TrustedTypePolicyFactory.isHTML requires the object to be created via policy.: FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicyFactory.isScriptURL requires the object to be created via policy.: FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicyFactory.isXXX should accept anything without throwing.: FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicyFactory.isScript requires the object to be created via policy.: FAIL (Chrome: PASS, Safari: FAIL)
/trusted-types/idlharness.tentative.window.html
TrustedTypePolicyFactory interface: operation createPolicy(DOMString, TrustedTypePolicyOptions): FAIL (Chrome: FAIL, Safari: FAIL)
TrustedTypePolicyFactory interface: existence and properties of interface prototype object's @@unscopables property: FAIL (Chrome: PASS, Safari: FAIL)
TrustedScript interface: existence and properties of interface prototype object's "constructor" property: FAIL (Chrome: PASS, Safari: FAIL)
TrustedHTML must be primary interface of window.trustedTypes.createPolicy("SomeName1", { createHTML: s => s }).createHTML("A string"): FAIL (Chrome: PASS, Safari: FAIL)
TrustedScript interface: stringifier: FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicyFactory interface object name: FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicy interface: calling createHTML(DOMString) on window.trustedTypes.createPolicy("SomeName", { createHTML: s => s }) with too few arguments must throw TypeError: FAIL (Chrome: FAIL, Safari: FAIL)
TrustedTypePolicy interface: existence and properties of interface object: FAIL (Chrome: PASS, Safari: FAIL)
TrustedScript interface object name: FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicyFactory interface object length: FAIL (Chrome: PASS, Safari: FAIL)
TrustedScript interface: existence and properties of interface prototype object's @@unscopables property: FAIL (Chrome: PASS, Safari: FAIL)
TrustedHTML interface: existence and properties of interface object: FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicy must be primary interface of window.trustedTypes.createPolicy("SomeName", { createHTML: s => s }): FAIL (Chrome: PASS, Safari: FAIL)
TrustedScriptURL must be primary interface of window.trustedTypes.createPolicy("SomeName3", { createScriptURL: s => s }).createScriptURL("A string"): FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicy interface: operation createScriptURL(DOMString): FAIL (Chrome: FAIL, Safari: FAIL)
TrustedTypePolicy interface: calling createScript(DOMString) on window.trustedTypes.createPolicy("SomeName", { createHTML: s => s }) with too few arguments must throw TypeError: FAIL (Chrome: FAIL, Safari: FAIL)
Stringification of window.trustedTypes.createPolicy("SomeName3", { createScriptURL: s => s }).createScriptURL("A string"): FAIL (Chrome: PASS, Safari: FAIL)
TrustedScriptURL interface object name: FAIL (Chrome: PASS, Safari: FAIL)
TrustedScriptURL interface: stringifier: FAIL (Chrome: PASS, Safari: FAIL)
TrustedHTML interface: existence and properties of interface prototype object's "constructor" property: FAIL (Chrome: PASS, Safari: FAIL)
TrustedHTML interface: stringifier: FAIL (Chrome: PASS, Safari: FAIL)
TrustedScriptURL interface: existence and properties of interface prototype object's @@unscopables property: FAIL (Chrome: PASS, Safari: FAIL)
TrustedScriptURL interface: existence and properties of interface object: FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicy interface: window.trustedTypes.createPolicy("SomeName", { createHTML: s => s }) must inherit property "createHTML(DOMString)" with the proper type: FAIL (Chrome: FAIL, Safari: FAIL)
TrustedScript interface object length: FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicy interface: existence and properties of interface prototype object: FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicyFactory interface: window.trustedTypes must inherit property "createPolicy(DOMString, TrustedTypePolicyOptions)" with the proper type: FAIL (Chrome: FAIL, Safari: FAIL)
Stringification of window.trustedTypes: FAIL (Chrome: PASS, Safari: FAIL)
TrustedScriptURL interface object length: FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicyFactory must be primary interface of window.trustedTypes: FAIL (Chrome: PASS, Safari: FAIL)
TrustedScriptURL interface: existence and properties of interface prototype object's "constructor" property: FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicyFactory interface: existence and properties of interface prototype object's "constructor" property: FAIL (Chrome: PASS, Safari: FAIL)
TrustedHTML interface object length: FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicyFactory interface: existence and properties of interface prototype object: FAIL (Chrome: PASS, Safari: FAIL)
TrustedHTML interface: existence and properties of interface prototype object's @@unscopables property: FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicy interface object name: FAIL (Chrome: PASS, Safari: FAIL)
TrustedHTML interface object name: FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicyFactory interface: calling createPolicy(DOMString, TrustedTypePolicyOptions) on window.trustedTypes with too few arguments must throw TypeError: FAIL (Chrome: FAIL, Safari: FAIL)
Stringification of window.trustedTypes.createPolicy("SomeName1", { createHTML: s => s }).createHTML("A string"): FAIL (Chrome: PASS, Safari: FAIL)
Stringification of window.trustedTypes.createPolicy("SomeName2", { createScript: s => s }).createScript("A string"): FAIL (Chrome: PASS, Safari: FAIL)
TrustedHTML interface: existence and properties of interface prototype object: FAIL (Chrome: PASS, Safari: FAIL)
TrustedScriptURL interface: existence and properties of interface prototype object: FAIL (Chrome: PASS, Safari: FAIL)
TrustedScript must be primary interface of window.trustedTypes.createPolicy("SomeName2", { createScript: s => s }).createScript("A string"): FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicy interface object length: FAIL (Chrome: PASS, Safari: FAIL)
Stringification of window.trustedTypes.createPolicy("SomeName", { createHTML: s => s }): FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicy interface: existence and properties of interface prototype object's "constructor" property: FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicy interface: operation createHTML(DOMString): FAIL (Chrome: FAIL, Safari: FAIL)
TrustedTypePolicy interface: existence and properties of interface prototype object's @@unscopables property: FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicy interface: operation createScript(DOMString): FAIL (Chrome: FAIL, Safari: FAIL)
TrustedScript interface: existence and properties of interface object: FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicy interface: window.trustedTypes.createPolicy("SomeName", { createHTML: s => s }) must inherit property "createScript(DOMString)" with the proper type: FAIL (Chrome: FAIL, Safari: FAIL)
TrustedScript interface: existence and properties of interface prototype object: FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicy interface: window.trustedTypes.createPolicy("SomeName", { createHTML: s => s }) must inherit property "name" with the proper type: FAIL (Chrome: FAIL, Safari: FAIL)
TrustedTypePolicy interface: calling createScriptURL(DOMString) on window.trustedTypes.createPolicy("SomeName", { createHTML: s => s }) with too few arguments must throw TypeError: FAIL (Chrome: FAIL, Safari: FAIL)
TrustedTypePolicy interface: attribute name: FAIL (Chrome: FAIL, Safari: FAIL)
TrustedTypePolicy interface: window.trustedTypes.createPolicy("SomeName", { createHTML: s => s }) must inherit property "createScriptURL(DOMString)" with the proper type: FAIL (Chrome: FAIL, Safari: FAIL)
TrustedTypePolicyFactory interface: existence and properties of interface object: FAIL (Chrome: PASS, Safari: FAIL)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/643c88e00d7f
[wpt PR 22118] - Make Trusted Types ununforgeable., a=testonly
https://hg.mozilla.org/integration/autoland/rev/0dd71569eb64
[wpt PR 22118] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
You need to log in before you can comment on or make changes to this bug.