Closed Bug 1589487 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 19768 - Reland "[Trusted Types] Remove TrustedURL."

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

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

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

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

John Budorick <jbudorick@chromium.org> wrote:

Reland "[Trusted Types] Remove TrustedURL."

This reverts commit a84f1c65c3511283481a5a737a4b51d0abae7a92.

Reason for revert: wrong revert

Original change's description:

Revert "[Trusted Types] Remove TrustedURL."

This reverts commit 005483fe14c968325e6c8735eb6077049ee997ef.

Reason for revert: \<INSERT REASONING HERE>
../../third_party/blink/renderer/core/page/scrolling/text_fragment_anchor_test.cc(8,10): fatal error: 'third_party/blink/renderer/bindings/core/v8/usv_string_or_trusted_url.h' file not found
#include "third_party/blink/renderer/bindings/core/v8/usv_string_or_trusted_url.h"

Original change's description:

[Trusted Types] Remove TrustedURL.

The current Trusted Types spec no longer supports TrustedURL. This CL adapts
to the spec.

Bug: 1002555
Change-Id: I35c6d8a257046558f155b9f38289457b14dcb1d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1834142
Commit-Queue: Daniel Vogelheim \<vogelheim@chromium.org>
Reviewed-by: Mike West \<mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706886}

TBR=vogelheim@chromium.org,mkwst@chromium.org

Change-Id: I9012ad7c3f9f01389ab1aa7a90d5beb7873eab2c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1002555
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1866974
Reviewed-by: Lan Wei \<lanwei@chromium.org>
Commit-Queue: Lan Wei \<lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706979}

TBR=vogelheim@chromium.org,lanwei@chromium.org,mkwst@chromium.org

Change-Id: Idfd715701037a3b3dfabe2adbb8f74b2e98625a0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1002555
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1865686
Reviewed-by: John Budorick \<jbudorick@chromium.org>
Commit-Queue: John Budorick \<jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706986}

PR 19768 applied with additional changes from upstream: 801a2b3b5e1cd0192f31890ddf9ee7b4d0ad9e89, 245e6d14b874f106d30c4d9ecaa58f7d71cd6238, 27f34057e456cd7deac1b6c5d5a69d49d181ca91, 776c49d09c52ec0770b847892380f96b09655b14, e6f15e377e293ff7d2d73a3b167e4c2bcf4771bc
Component: web-platform-tests → DOM: Security
Product: Testing → Core

GitHub CI Results

wpt.fyi PR Results Base Results

Ran 54 tests and 363 subtests

Firefox

OK : 39
PASS : 18
FAIL : 204
TIMEOUT: 4
ERROR : 6
NOTRUN : 12

Chrome

OK : 41
PASS : 67
FAIL : 181
TIMEOUT: 4
ERROR : 4
NOTRUN : 12

Safari

OK : 39
PASS : 19
FAIL : 203
TIMEOUT: 5
ERROR : 5
NOTRUN : 12

Existing tests that now have a worse result

/trusted-types/Location-assign.tentative.html: Firefox: OK->MISSING, Chrome: OK->MISSING, Safari: OK->MISSING

/trusted-types/default-policy-report-only.tentative.html
a.href no default policy: Firefox: PASS->MISSING, Chrome: PASS->MISSING, Safari: PASS->MISSING

/trusted-types/Location-href.tentative.html: Firefox: OK->MISSING, Chrome: OK->MISSING, Safari: OK->MISSING

/trusted-types/Location-replace.tentative.html: Firefox: OK->MISSING, Chrome: OK->MISSING, Safari: OK->MISSING

/trusted-types/Window-open.tentative.html: Firefox: OK->MISSING, Chrome: OK->MISSING, Safari: OK->MISSING

Other new tests that's don't pass

/trusted-types/TrustedTypePolicy-createXXX.tentative.html
TestPolicyTrustedHTML3 (TrustedHTML: s => { throw new Error() }): Firefox: MISSING, Chrome: FAIL, Safari: MISSING
TestPolicyTrustedScript7 (TrustedScript: s => aGlobalFunction(s)): Firefox: MISSING, Chrome: FAIL, Safari: MISSING
TestPolicyTrustedHTML5 (TrustedHTML: s => aGlobalVarForSideEffectTesting + s): Firefox: MISSING, Chrome: FAIL, Safari: MISSING
TestPolicyTrustedURL5 (TrustedURL: function () { [native code] }): Firefox: MISSING, Chrome: MISSING, Safari: MISSING
TestPolicyTrustedURL6 (TrustedURL: s => anotherGlobalFunction(s)): Firefox: MISSING, Chrome: MISSING, Safari: MISSING
TestPolicyTrustedScriptURL5 (TrustedScriptURL: function () { [native code] }): Firefox: MISSING, Chrome: FAIL, Safari: MISSING
TestPolicyTrustedScript0 (TrustedScript: s => s): Firefox: MISSING, Chrome: FAIL, Safari: MISSING
TestPolicyTrustedURL4 (TrustedURL: s => s + "#" + aGlobalVarForSideEffectTesting): Firefox: MISSING, Chrome: MISSING, Safari: MISSING
TestPolicyTrustedHTML1 (TrustedHTML: s => null): Firefox: MISSING, Chrome: FAIL, Safari: MISSING
TestPolicyTrustedHTML0 (TrustedHTML: s => s): Firefox: MISSING, Chrome: FAIL, Safari: MISSING
TestPolicyTrustedURL3 (TrustedURL: s => { throw new Error() }): Firefox: MISSING, Chrome: MISSING, Safari: MISSING
TestPolicyTrustedScriptURL1 (TrustedScriptURL: s => null): Firefox: MISSING, Chrome: FAIL, Safari: MISSING
TestPolicyTrustedScriptURL6 (TrustedScriptURL: s => anotherGlobalFunction(s)): Firefox: MISSING, Chrome: FAIL, Safari: MISSING
TestPolicyTrustedScript1 (TrustedScript: s => null): Firefox: MISSING, Chrome: FAIL, Safari: MISSING
TestPolicyTrustedHTML7 (TrustedHTML: s => aGlobalFunction(s)): Firefox: MISSING, Chrome: FAIL, Safari: MISSING
TestPolicyTrustedHTML4 (TrustedHTML: s => { aGlobalVarForSideEffectTesting = s; return s }): Firefox: MISSING, Chrome: FAIL, Safari: MISSING
TestPolicyTrustedHTML2 (TrustedHTML: s => "well, " + s): Firefox: MISSING, Chrome: FAIL, Safari: MISSING
TestPolicyTrustedScriptURL0 (TrustedScriptURL: s => s): Firefox: MISSING, Chrome: FAIL, Safari: MISSING
TestPolicyTrustedScriptURL2 (TrustedScriptURL: s => s + "#duck"): Firefox: MISSING, Chrome: FAIL, Safari: MISSING
TestPolicyTrustedScript5 (TrustedScript: s => aGlobalVarForSideEffectTesting + s): Firefox: MISSING, Chrome: FAIL, Safari: MISSING
TestPolicyTrustedScript3 (TrustedScript: s => { throw new Error() }): Firefox: MISSING, Chrome: FAIL, Safari: MISSING
TestPolicyTrustedURL0 (TrustedURL: s => s): Firefox: MISSING, Chrome: MISSING, Safari: MISSING
TestPolicyTrustedScriptURL4 (TrustedScriptURL: s => s + "#" + aGlobalVarForSideEffectTesting): Firefox: MISSING, Chrome: FAIL, Safari: MISSING
TestPolicyTrustedHTML6 (TrustedHTML: function () { [native code] }): Firefox: MISSING, Chrome: FAIL, Safari: MISSING
TestPolicyTrustedScript4 (TrustedScript: s => { aGlobalVarForSideEffectTesting = s; return s }): Firefox: MISSING, Chrome: FAIL, Safari: MISSING
TestPolicyTrustedURL2 (TrustedURL: s => s + "#duck"): Firefox: MISSING, Chrome: MISSING, Safari: MISSING
TestPolicyTrustedScript6 (TrustedScript: function () { [native code] }): Firefox: MISSING, Chrome: FAIL, Safari: MISSING
TestPolicyTrustedURL1 (TrustedURL: s => null): Firefox: MISSING, Chrome: MISSING, Safari: MISSING
TestPolicyTrustedScriptURL3 (TrustedScriptURL: s => { throw new Error() }): Firefox: MISSING, Chrome: FAIL, Safari: MISSING
TestPolicyTrustedScript2 (TrustedScript: s => "well, " + s): Firefox: MISSING, Chrome: FAIL, Safari: MISSING

/trusted-types/block-string-assignment-to-Location-href.tentative.html
location.href = null throws: Firefox: MISSING, Chrome: MISSING, Safari: MISSING
location.href = string throws: Firefox: MISSING, Chrome: MISSING, Safari: MISSING
location.href assigned via policy (successful URL transformation).: Firefox: MISSING, Chrome: MISSING, Safari: MISSING

/trusted-types/block-string-assignment-to-Location-assign.tentative.html
location.assign = null throws: Firefox: MISSING, Chrome: MISSING, Safari: MISSING
location.assign = string throws: Firefox: MISSING, Chrome: MISSING, Safari: MISSING
location.assign via policy (successful URL transformation).: Firefox: MISSING, Chrome: MISSING, Safari: MISSING

/trusted-types/Element-setAttribute.tentative.html
script.src assigned via policy (successful script transformation): Firefox: FAIL, Chrome: FAIL, Safari: FAIL

/trusted-types/TrustedTypePolicyFactory-getPropertyType.tentative.html
sanity check trustedTypes.getPropertyType for the HTML script element.: Firefox: FAIL, Chrome: FAIL, Safari: FAIL

/trusted-types/block-string-assignment-to-Location-replace.tentative.html
location.replace = string throws: Firefox: MISSING, Chrome: MISSING, Safari: MISSING
location.replace via policy (successful URL transformation).: Firefox: MISSING, Chrome: MISSING, Safari: MISSING
location.replace = null throws: Firefox: MISSING, Chrome: MISSING, Safari: MISSING

/trusted-types/trusted-types-reporting.tentative.https.html
Trusted Type violation report: assign string to script url: Firefox: NOTRUN, Chrome: NOTRUN, Safari: NOTRUN
Trusted Type violation report: assign trusted script to script; no report: Firefox: NOTRUN, Chrome: NOTRUN, Safari: NOTRUN
Trusted Type violation report: sample for script.src assignment: Firefox: NOTRUN, Chrome: NOTRUN, Safari: NOTRUN

/trusted-types/block-text-node-insertion-into-script-element.tentative.html
Regression test: Bypass via appendChild into live script element: Firefox: MISSING, Chrome: PASS, Safari: MISSING
Regression test: Bypass via insertAdjacentText, initial comment: Firefox: MISSING, Chrome: PASS, Safari: MISSING
Regression test: Bypass via appendChild into off-document script element: Firefox: MISSING, Chrome: PASS, Safari: MISSING

Whiteboard: [wptsync downstream] → [wptsync downstream][domsecurity-backlog]
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d26b600995ce
[wpt PR 19768] - Reland "[Trusted Types] Remove TrustedURL.", a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/b1104eb942ce
[wpt PR 19768] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.