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 <weizhong@google.com>
Commit-Queue: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1229618}

--

wpt-commits: aff9e54e2b07b57885c89e8d2175570946a9e5bc
wpt-pr: 43376
  • Loading branch information
Mason Freed authored and moz-wptsync-bot committed Dec 1, 2023
1 parent 8dcf789 commit 98bfcc3
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!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 98bfcc3

Please sign in to comment.