From 7bb65bab7ffd6cf65083c59115c87f30d38c4c55 Mon Sep 17 00:00:00 2001 From: Aki Sasaki Date: Thu, 30 Jul 2020 12:25:10 -0700 Subject: [PATCH] fix reftests after #12107 The f1040-annotations reftest started hanging after #12107. We traced this to `TypeError: can't access property "getOrCreateValue", storage is undefined`. We essentially need to add `annotationStorage` to the parameters in test/driver.js. --- src/pdf.js | 3 +++ test/driver.js | 1 + 2 files changed, 4 insertions(+) diff --git a/src/pdf.js b/src/pdf.js index c6a6d1338..3c156119c 100644 --- a/src/pdf.js +++ b/src/pdf.js @@ -50,6 +50,7 @@ import { VerbosityLevel, } from "./shared/util.js"; import { AnnotationLayer } from "./display/annotation_layer.js"; +import { AnnotationStorage } from "./display/annotation_storage.js"; import { apiCompatibilityParams } from "./display/api_compatibility.js"; import { GlobalWorkerOptions } from "./display/worker_options.js"; import { renderTextLayer } from "./display/text_layer.js"; @@ -156,6 +157,8 @@ export { VerbosityLevel, // From "./display/annotation_layer.js": AnnotationLayer, + // From "./display/annotation_storage.js": + AnnotationStorage, // From "./display/api_compatibility.js": apiCompatibilityParams, // From "./display/worker_options.js": diff --git a/test/driver.js b/test/driver.js index ddc89ce76..6a9e701e0 100644 --- a/test/driver.js +++ b/test/driver.js @@ -220,6 +220,7 @@ var rasterizeAnnotationLayer = (function rasterizeAnnotationLayerClosure() { linkService: new pdfjsViewer.SimpleLinkService(), imageResourcesPath, renderInteractiveForms, + annotationStorage: new pdfjsLib.AnnotationStorage(), }; pdfjsLib.AnnotationLayer.render(parameters);