Skip to content

Commit

Permalink
Bug 1866876 [wpt PR 43376] - Add infra test that window.load happens …
Browse files Browse the repository at this point in the history
…before reftest capture, a=testonly

Automatic update from web-platform-tests
Add infra test that window.load happens before reftest capture

This adds a WPT infrastructure test to enforce that the harness
waits for window.load before capturing reftest images. That allows
testing like this:

```
<link rel=match href=green.html>
<script>
  window.onload = () => document.body.append('test');
</script>
```

See [1] for conversation.

[1] web-platform-tests/wpt#43310

Change-Id: I1f3f9836ca880350b294538dd2f2d58689485f7b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5064229
Reviewed-by: Weizhong Xia <weizhonggoogle.com>
Commit-Queue: Mason Freed <masonfchromium.org>
Cr-Commit-Position: refs/heads/main{#1229618}

--

wpt-commits: aff9e54e2b07b57885c89e8d2175570946a9e5bc
wpt-pr: 43376

UltraBlame original commit: 12454e2d818196a790f2711897bc1424a98ecb86
  • Loading branch information
marco-c committed Dec 7, 2023
1 parent 22e785e commit 3b4095d
Showing 1 changed file with 85 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<
!
DOCTYPE
html
>
<
title
>
rel
=
match
waits
for
window
load
<
/
title
>
<
link
rel
=
match
href
=
green
.
html
>
<
script
>
window
.
onload
=
(
)
=
>
{
const
s
=
document
.
createElement
(
'
style
'
)
;
s
.
innerText
=
'
:
root
{
background
-
color
:
green
}
'
;
document
.
body
.
appendChild
(
s
)
;
}
;
<
/
script
>

0 comments on commit 3b4095d

Please sign in to comment.