Skip to content

Commit

Permalink
Bug 1919248: transform WPT <to-javascript-url-script-src.html>'s asyn…
Browse files Browse the repository at this point in the history
…c sub-tests to promise-tests and remove checking the securitypolicyevent's target element. r=smaug

Gecko doesn't set the securitypolicyevent violation's target element,
which prevented the async tests from passing with Gecko.
Setting the violation's target element isn't specified (
w3c/webappsec-csp#687).

Promise-based tests allow removing checking the target element, because
the tests are run in sequence
(https://web-platform-tests.org/writing-tests/testharness-api.html#promise-tests).

Differential Revision: https://phabricator.services.mozilla.com/D227160

UltraBlame original commit: b941985be92395c909b233ecfbba356f6d0db149
  • Loading branch information
marco-c committed Nov 1, 2024
1 parent 572b54f commit b654fff
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 146 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
(
test
element
resolve
)
{
assert_equals
Expand Down Expand Up @@ -114,17 +115,6 @@
=
>
{
if
(
e
.
target
!
=
element
)
return
;
assert_equals
(
e
Expand Down Expand Up @@ -184,13 +174,16 @@
(
)
;
test
.
done
resolve
(
)
;
}
{
once
:
true
}
)
)
;
Expand Down Expand Up @@ -277,12 +270,20 @@
)
;
}
async_test
promise_test
(
t
=
>
{
return
new
Promise
(
resolve
=
>
{
var
i
=
Expand Down Expand Up @@ -312,6 +313,7 @@
(
t
i
resolve
)
;
document
Expand All @@ -324,6 +326,8 @@
)
;
}
)
}
"
<
iframe
Expand All @@ -345,12 +349,20 @@
"
)
;
async_test
promise_test
(
t
=
>
{
return
new
Promise
(
resolve
=
>
{
var
i
=
Expand All @@ -367,6 +379,7 @@
(
t
i
resolve
)
;
navigate_to_javascript_onload
Expand All @@ -385,6 +398,8 @@
)
;
}
)
}
"
<
iframe
Expand All @@ -406,12 +421,20 @@
"
)
;
async_test
promise_test
(
t
=
>
{
return
new
Promise
(
resolve
=
>
{
var
i
=
Expand Down Expand Up @@ -462,6 +485,7 @@
(
t
i
resolve
)
;
navigate_to_javascript_onload
Expand All @@ -480,6 +504,8 @@
)
;
}
)
}
"
<
iframe
Expand Down Expand Up @@ -510,12 +536,20 @@
"
)
;
async_test
promise_test
(
t
=
>
{
return
new
Promise
(
resolve
=
>
{
var
i
=
Expand Down Expand Up @@ -564,6 +598,7 @@
(
t
i
resolve
)
;
navigate_to_javascript_onload
Expand All @@ -582,6 +617,8 @@
)
;
}
)
}
"
<
iframe
Expand Down

0 comments on commit b654fff

Please sign in to comment.