Closed Bug 1647907 Opened 4 years ago Closed 4 years ago

[wpt-sync] Sync PR 24321 - [Trusted Types] JS event tracking for policy creation

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox80 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Yifan Luo <lyf@google.com> wrote:

[Trusted Types] JS event tracking for policy creation

Add a new event listener beforecreatepolicy to
TrustedTypePolicyFactory::createPolicy which allow
people to track or block the creation process for
Trusted Types.

Bug: 1075601
Change-Id: Ib885e7adc740999ba0e39037b7f4a90af6ff6aef

Reviewed-on: https://chromium-review.googlesource.com/2260594
WPT-Export-Revision: 19626ba984d0396afd15bcc71eca5a1d7b7ecc88

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

CI Results

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

Total 2 tests and 59 subtests

Status Summary

Firefox

OK : 2
PASS: 2
FAIL: 61

Chrome

OK : 2
PASS: 56
FAIL: 7

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-blocking.html: OK [GitHub], SKIP [Gecko-android-em-7.0-x86_64-debug-geckoview, Gecko-android-em-7.0-x86_64-opt-geckoview, 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] (Chrome: OK, Safari: OK)
Block only default Trusted Type policy creation.: FAIL (Chrome: FAIL, Safari: FAIL)
Policy creation called before addEventListener function will not reached the listener.: FAIL (Chrome: FAIL, Safari: FAIL)
Block Trusted Type policy creation by event listener.: FAIL (Chrome: FAIL, Safari: FAIL)
Trusted Type policy creation.: FAIL (Chrome: FAIL, Safari: FAIL)
/trusted-types/idlharness.tentative.window.html: OK [GitHub], SKIP [Gecko-android-em-7.0-x86_64-debug-geckoview, Gecko-android-em-7.0-x86_64-opt-geckoview, 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] (Chrome: OK, Safari: OK)
TrustedTypePolicy interface: operation createScriptURL(USVString): FAIL (Chrome: PASS, 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: PASS, Safari: FAIL)
TrustedTypePolicy interface: existence and properties of interface object: FAIL (Chrome: PASS, Safari: FAIL)
TrustedScript interface object name: FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicy interface: calling createScriptURL(USVString) on window.trustedTypes.createPolicy("SomeName", { createHTML: s => s }) with too few arguments must throw TypeError: 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: calling createScript(DOMString) on window.trustedTypes.createPolicy("SomeName", { createHTML: s => s }) with too few arguments must throw TypeError: FAIL (Chrome: PASS, 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: PASS, 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)
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: FAIL, 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)
Stringification of window.trustedTypes.createPolicy("SomeName1", { createHTML: s => s }).createHTML("A string"): FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicy interface: window.trustedTypes.createPolicy("SomeName", { createHTML: s => s }) must inherit property "createScriptURL(USVString)" with the proper type: FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicyFactory interface: calling createPolicy(DOMString, optional TrustedTypePolicyOptions) on window.trustedTypes with too few arguments must throw TypeError: 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: PASS, 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: PASS, 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: PASS, 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: PASS, Safari: FAIL)
TrustedTypePolicy interface: attribute name: FAIL (Chrome: PASS, Safari: FAIL)
TrustedTypePolicyFactory interface: operation createPolicy(DOMString, optional TrustedTypePolicyOptions): FAIL (Chrome: FAIL, Safari: FAIL)
TrustedTypePolicyFactory interface: existence and properties of interface object: FAIL (Chrome: FAIL, Safari: FAIL)
TrustedTypePolicyFactory interface: window.trustedTypes must inherit property "createPolicy(DOMString, optional TrustedTypePolicyOptions)" with the proper type: FAIL (Chrome: PASS, Safari: FAIL)

Tests Disabled in Gecko Infrastructure

/trusted-types/TrustedTypePolicyFactory-blocking.html: OK [GitHub], SKIP [Gecko-android-em-7.0-x86_64-debug-geckoview, Gecko-android-em-7.0-x86_64-opt-geckoview, 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] (Chrome: OK, Safari: OK)
/trusted-types/idlharness.tentative.window.html: OK [GitHub], SKIP [Gecko-android-em-7.0-x86_64-debug-geckoview, Gecko-android-em-7.0-x86_64-opt-geckoview, 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] (Chrome: OK, Safari: OK)

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b236b3bd3524 [wpt PR 24321] - [Trusted Types] JS event tracking for policy creation, a=testonly
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
You need to log in before you can comment on or make changes to this bug.