Commit 4e195c92 authored by Stefano Sanfilippo's avatar Stefano Sanfilippo Committed by Commit Bot

[Trusted Types] Test current behavior of eval(TT) in WPTs.

We follow the spec as it is right now, there is no need for TODOs and disabled tests.

Bug: 940927
Change-Id: I32fffb519ce8e2cca8fe94389d9fa6d82da2c08c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1795322Reviewed-by: default avatarDaniel Vogelheim <vogelheim@chromium.org>
Commit-Queue: Daniel Vogelheim <vogelheim@chromium.org>
Auto-Submit: Stefano Sanfilippo <ssanfilippo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695126}
parent 463dd05b
...@@ -6207,9 +6207,6 @@ crbug.com/1000768 [ Linux ] external/wpt/geolocation-API/idlharness.window.html ...@@ -6207,9 +6207,6 @@ crbug.com/1000768 [ Linux ] external/wpt/geolocation-API/idlharness.window.html
crbug.com/1000768 [ Linux ] external/wpt/web-share/idlharness.https.window.html [ Pass Failure ] crbug.com/1000768 [ Linux ] external/wpt/web-share/idlharness.https.window.html [ Pass Failure ]
crbug.com/1000768 [ Linux ] external/wpt/storage/idlharness.https.any.html [ Pass Failure ] crbug.com/1000768 [ Linux ] external/wpt/storage/idlharness.https.any.html [ Pass Failure ]
# Partial fix to avoid a regression on eval(string) with Trusted Types enabled in Chrome 77.
crbug.com/992424 external/wpt/trusted-types/block-eval.tentative.html [ Failure ]
# Sheriff 2019-09-06 # Sheriff 2019-09-06
crbug.com/998399 [ Linux ] virtual/omt-worker-fetch/external/wpt/service-workers/service-worker/worker-interception.https.html [ Pass Timeout ] crbug.com/998399 [ Linux ] virtual/omt-worker-fetch/external/wpt/service-workers/service-worker/worker-interception.https.html [ Pass Timeout ]
......
...@@ -21,9 +21,7 @@ ...@@ -21,9 +21,7 @@
test(t => { test(t => {
let a = 0; let a = 0;
assert_throws(new EvalError(), _ => { eval(p.createScript('a="Hello transformed string"'));
eval(p.createScript('a="Hello transformed string"'));
});
assert_equals(a, 0); assert_equals(a, 0);
}, "eval with TrustedScript throws (script-src blocks)."); }, "eval with TrustedScript throws (script-src blocks).");
</script> </script>
......
...@@ -89,7 +89,6 @@ ...@@ -89,7 +89,6 @@
.then(promise_violation("script-src")) .then(promise_violation("script-src"))
.then(promise_flush()); .then(promise_flush());
expect_throws(_ => eval('script_run_beacon="should not run"')); expect_throws(_ => eval('script_run_beacon="should not run"'));
// TODO(ssanfilippo) This should throw, but doesn't yet. See crbug.com/992424.
eval(scriptyPolicy.createScript('script_run_beacon="i ran"')); eval(scriptyPolicy.createScript('script_run_beacon="i ran"'));
flush(); flush();
assert_not_equals(script_run_beacon, 'i ran'); // Code did not run. assert_not_equals(script_run_beacon, 'i ran'); // Code did not run.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment