Skip to content

Commit

Permalink
[PaintTiming] Let videos trigger FCP
Browse files Browse the repository at this point in the history
This CL adds a call to SetImagePainted() so that FCP fires when there we
paint a video.

Bug: 1071450
Change-Id: I9590517fd3355226096fd62079a3a4aa6eb50735
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2276244
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#784189}
  • Loading branch information
npm1 authored and chromium-wpt-export-bot committed Jun 30, 2020
1 parent 1753398 commit 17f0e36
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion paint-timing/fcp-only/fcp-video-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<script src="../resources/utils.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/media.js"></script>
<video id="video" autoplay></video>
<script>
promise_test(async t => {
Expand All @@ -14,7 +15,7 @@
await assertNoFirstContentfulPaint(t);
// Set actual video content to trigger FCP.
const video = document.getElementById('video');
video.setAttribute('src', '/media/test.mp4');
video.src = getVideoURI('/media/test');
await new Promise(resolve => {
video.oncanplay = resolve;
});
Expand Down

0 comments on commit 17f0e36

Please sign in to comment.