Improve handling of *linked* test-cases for the unit/integration suites (#13160)
- Actually support *linked* test-cases in the integration-tests (in the same way as the unit-tests). - Add a new `"type": "other"`-kind to the test-manifest, to support *linked* test-cases in the unit/integration-tests without requiring the PDF document in question to also be a reference-test.
This commit is contained in:
		
							parent
							
								
									1a2cdaffc5
								
							
						
					
					
						commit
						75a6b2fa13
					
				@ -392,6 +392,20 @@ var Driver = (function DriverClosure() {
 | 
				
			|||||||
        task.pageNum = task.firstPage || 1;
 | 
					        task.pageNum = task.firstPage || 1;
 | 
				
			||||||
        task.stats = { times: [] };
 | 
					        task.stats = { times: [] };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // Support *linked* test-cases for the other suites, e.g. unit- and
 | 
				
			||||||
 | 
					        // integration-tests, without needing to run them as reference-tests.
 | 
				
			||||||
 | 
					        if (task.type === "other") {
 | 
				
			||||||
 | 
					          this._log(`Skipping file "${task.file}"\n`);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          if (!task.link) {
 | 
				
			||||||
 | 
					            this._nextPage(task, 'Expected "other" test-case to be linked.');
 | 
				
			||||||
 | 
					            return;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.currentTask++;
 | 
				
			||||||
 | 
					          this._nextTask();
 | 
				
			||||||
 | 
					          return;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        this._log('Loading file "' + task.file + '"\n');
 | 
					        this._log('Loading file "' + task.file + '"\n');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        const absoluteUrl = new URL(task.file, window.location).href;
 | 
					        const absoluteUrl = new URL(task.file, window.location).href;
 | 
				
			||||||
 | 
				
			|||||||
@ -1000,7 +1000,10 @@ function main() {
 | 
				
			|||||||
  } else if (options.fontTest) {
 | 
					  } else if (options.fontTest) {
 | 
				
			||||||
    startUnitTest("/test/font/font_test.html", "font");
 | 
					    startUnitTest("/test/font/font_test.html", "font");
 | 
				
			||||||
  } else if (options.integration) {
 | 
					  } else if (options.integration) {
 | 
				
			||||||
 | 
					    // Allows linked PDF files in integration-tests as well.
 | 
				
			||||||
 | 
					    ensurePDFsDownloaded(function () {
 | 
				
			||||||
      startIntegrationTest();
 | 
					      startIntegrationTest();
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    startRefTest(options.masterMode, options.reftest);
 | 
					    startRefTest(options.masterMode, options.reftest);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user