File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < title > Performance Paint Timing Test: FCP due to broken image</ title >
3+ < link rel ="author " title ="Shubham Gupta " href ="mailto:shubham.gupta@chromium.org ">
4+ < body >
5+ < script src ="/resources/testharness.js "> </ script >
6+ < script src ="/resources/testharnessreport.js "> </ script >
7+ < script src ="../resources/utils.js "> </ script >
8+ < img id ='broken '> </ div >
9+ < script >
10+ setup ( { "hide_test_state" : true } ) ;
11+ promise_test ( async t => {
12+ const onload = new Promise ( r => window . addEventListener ( 'load' , r ) ) ;
13+ await onload ;
14+ return assertNoFirstContentfulPaint ( t ) . then ( ( ) => {
15+ document . getElementById ( 'broken' ) . src = '../non-existent-image.jpg' ;
16+ } ) . then ( ( ) => {
17+ return assertFirstContentfulPaint ( t ) ;
18+ } ) ;
19+ } , 'Broken image triggers First Contentful Paint.' ) ;
20+ </ script >
21+ </ body >
You can’t perform that action at this time.
0 commit comments