@@ -410,18 +410,21 @@ function handleSessionTimeout(session) {
410410 closeSession ( browser ) ;
411411}
412412
413- function getTestManifest ( ) {
413+ function getTestManifest ( label = null ) {
414414 var manifest = JSON . parse ( fs . readFileSync ( options . manifestFile ) ) ;
415415
416416 const testFilter = options . testfilter . slice ( 0 ) ,
417417 xfaOnly = options . xfaOnly ;
418- if ( testFilter . length || xfaOnly ) {
418+ if ( label || testFilter . length || xfaOnly ) {
419419 manifest = manifest . filter ( function ( item ) {
420420 var i = testFilter . indexOf ( item . id ) ;
421421 if ( i !== - 1 ) {
422422 testFilter . splice ( i , 1 ) ;
423423 return true ;
424424 }
425+ if ( label && item . labels ?. includes ( label ) ) {
426+ return true ;
427+ }
425428 if ( xfaOnly && item . enableXfa ) {
426429 return true ;
427430 }
@@ -1084,8 +1087,8 @@ async function closeSession(browser) {
10841087 }
10851088}
10861089
1087- async function ensurePDFsDownloaded ( ) {
1088- const manifest = getTestManifest ( ) ;
1090+ async function ensurePDFsDownloaded ( label = null ) {
1091+ const manifest = getTestManifest ( label ) ;
10891092 await downloadManifestFiles ( manifest ) ;
10901093 try {
10911094 await verifyManifestFiles ( manifest ) ;
@@ -1119,6 +1122,8 @@ async function main() {
11191122 } else if ( options . fontTest ) {
11201123 await startUnitTest ( "/test/font/font_test.html" , "font" ) ;
11211124 } else if ( options . integration ) {
1125+ // Allows linked PDF files in integration-tests as well.
1126+ await ensurePDFsDownloaded ( "integration" ) ;
11221127 await startIntegrationTest ( ) ;
11231128 } else {
11241129 await startRefTest ( options . masterMode , options . reftest ) ;
0 commit comments