Closed Bug 1485131 Opened 6 years ago Closed 6 years ago

[wpt-sync] Sync PR 12602 - createPolicy made synchronous TrustedTypePolicyFactory modified to keep track of created policies

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Orsi Batiz <orsibatiz@google.com> wrote:
>  createPolicy made synchronous TrustedTypePolicyFactory modified to keep track of created policies
>  
>  createPolicy in TrustedTypePolicyFactory made synchronous
>  Tests revisited and changed from async_tests to tests
>  Function getPolicyNames() added to TrustedTypePolicyFactory
>  Policies with the same name are not allowed anymore
>  tests for names added in TrustedTypePolicyFactory-createPolicy-nameTests
>  .tentative.html
>  
>  Bug: 739170
>  Change-Id: Ie4e2702994a8674e65376b7bf4b42d4c41e9cec4
>  
>  Reviewed-on: https://chromium-review.googlesource.com/1181362
>  WPT-Export-Revision: 2393b03de9c6b5b703de22543846387fa761fd03
PR 12602 applied with additional changes from upstream: fa06664dc85df3024762f5e082e05aa293f90d88, 8da098cb12eeaa1e869e1173b6c4dadbce95062e, fd1fcca70c03cea6e89a75e507c2ce5042494725
Component: web-platform-tests → DOM: Security
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Hey :jgraham,

Is there something we need to do here or do we just put this in the backlog? Is this breaking merging code or something?

Thanks
Flags: needinfo?(james)
I don't know why it keeps flip-flopping the error state on this PR, but no there's nothing you need to do. The bug is automatically resolved when the upstream PR is merged into central. The bug is useful to examine any new failures that are introduced as a result of the upstream test changes (and maybe to file followups to fix any problems), but otherwise doesn't require action.
Flags: needinfo?(james)
Ran 23 tests and 106 subtests
OK     : 20
PASS   : 2
FAIL   : 104
TIMEOUT: 3

New tests that have failures or other problems:
/trusted-types/DOMParser-parseFromString.tentative.html
    document.innerText assigned via policy (successful HTML transformation).: FAIL
/trusted-types/Document-write.tentative.html
    document.write with html assigned via policy (successful URL transformation).: FAIL
/trusted-types/Element-insertAdjacentHTML.tentative.html
    insertAdjacentHTML with html assigned via policy (successful HTML transformation).: FAIL
/trusted-types/Element-outerHTML.tentative.html
    outerHTML with html assigned via policy (successful HTML transformation).: FAIL
/trusted-types/HTMLElement-generic.tentative.html
    a.href assigned via policy (successful URL transformation): FAIL
    area.href assigned via policy (successful URL transformation): FAIL
    base.href assigned via policy (successful URL transformation): FAIL
    div.innerHTML assigned via policy (successful HTML transformation): FAIL
    embed.src assigned via policy (successful ScriptURL transformation): FAIL
    frame.src assigned via policy (successful URL transformation): FAIL
    iframe.src assigned via policy (successful URL transformation): FAIL
    iframe.srcdoc assigned via policy (successful HTML transformation): FAIL
    img.src assigned via policy (successful URL transformation): FAIL
    input.src assigned via policy (successful URL transformation): FAIL
    link.href assigned via policy (successful URL transformation): FAIL
    object.codeBase assigned via policy (successful URL transformation): FAIL
    object.data assigned via policy (successful URL transformation): FAIL
    script.src assigned via policy (successful ScriptURL transformation): FAIL
    source.src assigned via policy (successful URL transformation): FAIL
    track.src assigned via policy (successful URL transformation): FAIL
    video.src assigned via policy (successful URL transformation): FAIL
/trusted-types/Location-assign.tentative.html
    location.assign via policy (successful URL transformation).: FAIL
/trusted-types/Location-href.tentative.html
    location.href assigned via policy (successful URL transformation).: FAIL
/trusted-types/Location-replace.tentative.html
    location.replace via policy (successful URL transformation).: FAIL
/trusted-types/Range-createContextualFragment.tentative.html
    range.createContextualFragment assigned via policy (successful HTML transformation).: FAIL
/trusted-types/TrustedTypePolicyFactory-createPolicy-createXYZTests.tentative.html
    createHTML defined - calling undefined callbacks throws: FAIL
    createScript defined - calling undefined callbacks throws: FAIL
    createScriptURL defined - calling undefined callbacks throws: FAIL
    createURL defined - calling undefined callbacks throws: FAIL
    html - calling undefined callback throws: FAIL
    html = callback that throws: FAIL
    html = identity function: FAIL
    html = identity function, global string changed: FAIL
    html = null: FAIL
    html = string + global string: FAIL
    html = this bound to an object: FAIL
    html = this without bind: FAIL
    script - calling undefined callback throws: FAIL
    script = callback that throws: FAIL
    script = identity function: FAIL
    script = identity function, global string changed: FAIL
    script = null: FAIL
    script = string + global string: FAIL
    script = this bound to an object: FAIL
    script = this without bind: FAIL
    script_url - calling undefined callback throws: FAIL
    script_url = callback that throws: FAIL
    script_url = identity function: FAIL
    script_url = identity function, global string changed: FAIL
    script_url = null: FAIL
    script_url = string + global string: FAIL
    script_url = this bound to an object: FAIL
    script_url = this without bind: FAIL
    url - calling undefined callback throws: FAIL
    url = callback that throws: FAIL
    url = identity function: FAIL
    url = identity function, global string changed: FAIL
    url = null: FAIL
    url = string + global string: FAIL
    url = this bound to an object: FAIL
    url = this without bind: FAIL
/trusted-types/TrustedTypePolicyFactory-createPolicy-nameTests.tentative.html
    Retrieving policy names: FAIL
    policy.name = name: FAIL
/trusted-types/Window-TrustedTypes.tentative.html
    factory = window.TrustedTypes: FAIL
/trusted-types/Window-open.tentative.html
    document.open via policy (successful URL transformation).: FAIL
    window.open via policy (successful URL transformation).: FAIL
/trusted-types/block-string-assignment-to-DOMParser-parseFromString.tentative.html
    'document.innerText = null' throws: FAIL
    `document.innerText = string` throws.: FAIL
    document.innerText assigned via policy (successful HTML transformation).: FAIL
/trusted-types/block-string-assignment-to-Document-write.tentative.html
    `document.write(null)` throws: FAIL
    `document.write(string)` throws: FAIL
    document.write with html assigned via policy (successful URL transformation).: FAIL
/trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html
    `insertAdjacentHTML(null)` throws.: FAIL
    `insertAdjacentHTML(string)` throws.: FAIL
    insertAdjacentHTML with html assigned via policy (successful HTML transformation).: FAIL
/trusted-types/block-string-assignment-to-Element-outerHTML.tentative.html
    `outerHTML = null` throws.: FAIL
    `outerHTML = string` throws.: FAIL
    outerHTML with html assigned via policy (successful HTML transformation).: FAIL
/trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html
    a.href accepts only TrustedURL: FAIL
    area.href accepts only TrustedURL: FAIL
    base.href accepts only TrustedURL: FAIL
    div.innerHTML accepts only TrustedHTML: FAIL
    embed.src accepts only TrustedScriptURL: FAIL
    frame.src accepts only TrustedURL: FAIL
    iframe.src accepts only TrustedURL: FAIL
    iframe.srcdoc accepts only TrustedHTML: FAIL
    img.src accepts only TrustedURL: FAIL
    input.src accepts only TrustedURL: FAIL
    link.href accepts only TrustedURL: FAIL
    object.codeBase accepts only TrustedURL: FAIL
    object.data accepts only TrustedURL: FAIL
    script.src accepts only TrustedScriptURL: FAIL
    source.src accepts only TrustedURL: FAIL
    track.src accepts only TrustedURL: FAIL
    video.src accepts only TrustedURL: FAIL
/trusted-types/block-string-assignment-to-Location-assign.tentative.html: TIMEOUT
/trusted-types/block-string-assignment-to-Location-href.tentative.html: TIMEOUT
/trusted-types/block-string-assignment-to-Location-replace.tentative.html: TIMEOUT
/trusted-types/block-string-assignment-to-Range-createContextualFragment.tentative.html
    `range.createContextualFragment(null)` throws.: FAIL
    `range.createContextualFragment(string)` throws.: FAIL
    range.createContextualFragment assigned via policy (successful HTML transformation).: FAIL
/trusted-types/block-string-assignment-to-Window-open.tentative.html
    `document.open(null)` throws.: FAIL
    `document.open(string)` throws.: FAIL
    `window.open(null)` throws.: FAIL
    `window.open(string)` throws.: FAIL
    document.open via policy (successful URL transformation).: FAIL
    window.open via policy (successful URL transformation).: FAIL
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e905197a76c8
[wpt PR 12602] - TrustedTypes: Added TrustedTypes.getPolicyNames & minor changes, a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/2cfc065370d8
[wpt PR 12602] - Update wpt metadata, a=testonly
https://hg.mozilla.org/mozilla-central/rev/e905197a76c8
https://hg.mozilla.org/mozilla-central/rev/2cfc065370d8
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.