mirror of
https://github.com/servo/servo.git
synced 2025-09-30 08:39:16 +01:00
Propagate destination through load_data (#37020)
This way, we don't always set the destination to Document (which is as the spec is written today). Instead, we set it it in the load_data, depending on which context we load it from. Doing so allows us to set the `Destination::IFrame` for navigations in iframes, enabling all frame-related CSP checks. While we currently block iframes when `frame-src` or `child-src` is set, their respective tests don't pass yet. That's because we don't yet handle the cases where we fire the correct `load` event. Also update one WPT test to correctly fail, rather than erroring. That's because it was using the wrong JS test variable. Part of #4577 Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com> Co-authored-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
a028291466
commit
ed469fe72f
7 changed files with 17 additions and 14 deletions
2
tests/wpt/meta/MANIFEST.json
vendored
2
tests/wpt/meta/MANIFEST.json
vendored
|
@ -567585,7 +567585,7 @@
|
|||
]
|
||||
],
|
||||
"frame-src-blocked.sub.html": [
|
||||
"a4957f8715c4bdc0db9473caee3fc9f2e767fd71",
|
||||
"76fcc2cbb536ba9ec0c8741ad9fe9af470165d32",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
[frame-src-blocked.sub.html]
|
||||
expected: ERROR
|
||||
[Expecting logs: ["PASS IFrame #1 generated a load event.","violated-directive=frame-src"\]]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[frame-src-cross-origin-same-document-navigation.window.html]
|
||||
expected: OK
|
||||
expected: TIMEOUT
|
||||
[frame-src-cross-origin-same-document-navigation]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
|
|
@ -18,17 +18,17 @@
|
|||
}, false);
|
||||
|
||||
function alert_assert(msg) {
|
||||
t_alert.step(function() {
|
||||
t_log.step(function() {
|
||||
if (msg.match(/^FAIL/i)) {
|
||||
assert_unreached(msg);
|
||||
t_alert.done();
|
||||
t_log.done();
|
||||
}
|
||||
for (var i = 0; i < expected_alerts.length; i++) {
|
||||
if (expected_alerts[i] == msg) {
|
||||
assert_equals(expected_alerts[i], msg);
|
||||
expected_alerts.splice(i, 1);
|
||||
if (expected_alerts.length == 0) {
|
||||
t_alert.done();
|
||||
t_log.done();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue