diff --git a/test/driver.js b/test/driver.js index 5946561a8..7f0d651e3 100644 --- a/test/driver.js +++ b/test/driver.js @@ -519,7 +519,7 @@ var Driver = (function DriverClosure() { styleElement: xfaStyleElement, }); loadingTask.promise.then( - doc => { + async doc => { if (task.enableXfa) { task.fontRules = ""; for (const rule of xfaStyleElement.sheet.cssRules) { @@ -531,6 +531,15 @@ var Driver = (function DriverClosure() { task.optionalContentConfigPromise = doc.getOptionalContentConfig(); + if (task.optionalContent) { + const entries = Object.entries(task.optionalContent), + optionalContentConfig = + await task.optionalContentConfigPromise; + for (const [id, visible] of entries) { + optionalContentConfig.setVisibility(id, visible); + } + } + this._nextPage(task, failure); }, err => { diff --git a/test/test_manifest.json b/test/test_manifest.json index 5b4c4fdcc..3741652e1 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -5025,6 +5025,15 @@ "rounds": 1, "type": "eq" }, + { "id": "issue13931-hidden", + "file": "pdfs/issue13931.pdf", + "md5": "799d5025787115d22863ae23a3042491", + "rounds": 1, + "type": "eq", + "optionalContent": { + "7R": false + } + }, { "id": "issue2829", "file": "pdfs/issue2829.pdf", "md5": "f32b28cf8792f6ccc470446bfbb38584",