Closed Bug 1490443 Opened 6 years ago Closed 6 years ago

[wpt-sync] Sync PR 12952 - Added mechanisms for default policy

Categories

(Core :: DOM: Security, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream][domsecurity-backlog])

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

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

Orsi Batiz <orsibatiz@google.com> wrote:
>  Added mechanisms for default policy
>  
>  With a default policy defined, assignments implicitly call createXXX on the default policy
>  Added ScriptState* to the accessors visible from JavaScript
>  Tests were updated to check string assignment when trusted-types are needed before and after the default policy is defined
>  
>  Bug: 739170
>  Change-Id: I9bb841d69f324b841602d41abd71f753a9858af8
>  
>  Reviewed-on: https://chromium-review.googlesource.com/1207530
>  WPT-Export-Revision: d7e49570bbf43fad04649dfdc900e57d563c128c
Component: web-platform-tests → DOM: Security
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream][domsecurity-backlog]
Whiteboard: [wptsync downstream][domsecurity-backlog] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream][domsecurity-backlog]
Whiteboard: [wptsync downstream][domsecurity-backlog] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream][domsecurity-backlog]
Whiteboard: [wptsync downstream][domsecurity-backlog] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream][domsecurity-backlog]
Whiteboard: [wptsync downstream][domsecurity-backlog] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream][domsecurity-backlog]
PR 12952 applied with additional changes from upstream: d646c3ce22d218a53c365c9c8cd47315175dc6c9
Whiteboard: [wptsync downstream][domsecurity-backlog] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream][domsecurity-backlog]
Whiteboard: [wptsync downstream][domsecurity-backlog] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream][domsecurity-backlog]
Whiteboard: [wptsync downstream][domsecurity-backlog] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream][domsecurity-backlog]
PR 12952 applied with additional changes from upstream: d9b6e84708d8ca0870b65656e30cf595969db524
Whiteboard: [wptsync downstream][domsecurity-backlog] → [wptsync downstream error][domsecurity-backlog]
Whiteboard: [wptsync downstream error][domsecurity-backlog] → [wptsync downstream][domsecurity-backlog]
Whiteboard: [wptsync downstream][domsecurity-backlog] → [wptsync downstream error][domsecurity-backlog]
Whiteboard: [wptsync downstream error][domsecurity-backlog] → [wptsync downstream][domsecurity-backlog]
Ran 35 tests and 183 subtests
OK     : 29
PASS   : 9
FAIL   : 174
TIMEOUT: 3
ERROR  : 3

Existing tests that now have a worse result (e.g. they used to PASS and now FAIL):
/trusted-types/block-string-assignment-to-Element-setAttribute.tentative.html: ERROR
/trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html: ERROR
/trusted-types/block-string-assignment-to-Window-open.tentative.html: ERROR

New tests that have failures or other problems:
/trusted-types/TrustedTypePolicyFactory-createPolicy-defaultTests.tentative.html
    default policy has to be exposed: FAIL
/trusted-types/Window-TrustedTypes.tentative.html
    factory construction fails: FAIL
/trusted-types/block-string-assignment-to-DOMParser-parseFromString.tentative.html
    'document.innerText = string' assigned via default policy (successful HTML transformation).: FAIL
/trusted-types/block-string-assignment-to-DOMWindowTimers-setTimeout-setInterval.tentative.html
    `setTimeout(string)`, `setInterval(string)` via default policy (successful Script transformation).: FAIL
/trusted-types/block-string-assignment-to-Document-write.tentative.html
    document.write with html assigned via policy (successful URL transformation).: FAIL
/trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html
    `insertAdjacentHTML(null)` assigned via default policy does not throw.: FAIL
    `insertAdjacentHTML(string)` assigned via default policy (successful HTML transformation).: FAIL
/trusted-types/block-string-assignment-to-Element-outerHTML.tentative.html
    `outerHTML = null` assigned via default policy does not throw: FAIL
    `outerHTML = string` assigned via default policy (successful HTML transformation).: FAIL
/trusted-types/block-string-assignment-to-Range-createContextualFragment.tentative.html
    `range.createContextualFragment(string)` assigned via default policy (successful HTML transformation).: FAIL
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/2dce7619208c
[wpt PR 12952] - Added mechanisms for default policy, a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/cbf9026e31e5
[wpt PR 12952] - Update wpt metadata, a=testonly
https://hg.mozilla.org/mozilla-central/rev/2dce7619208c
https://hg.mozilla.org/mozilla-central/rev/cbf9026e31e5
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.