diff --git a/src/display/editor/tools.js b/src/display/editor/tools.js index 59381da66e34f..888672d59d61b 100644 --- a/src/display/editor/tools.js +++ b/src/display/editor/tools.js @@ -817,6 +817,7 @@ class AnnotationEditorUIManager { this.isShiftKeyDown = false; if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("TESTING")) { + window.uiManager = this; Object.defineProperty(this, "reset", { value: () => { this.selectAll(); diff --git a/test/integration/highlight_editor_spec.mjs b/test/integration/highlight_editor_spec.mjs index c61663e0330f4..635c81843a9c1 100644 --- a/test/integration/highlight_editor_spec.mjs +++ b/test/integration/highlight_editor_spec.mjs @@ -997,17 +997,7 @@ describe("Highlight Editor", () => { "tracemonkey.pdf", ".annotationEditorLayer", null, - async page => { - await page.evaluate(async () => { - await window.PDFViewerApplication.initializedPromise; - window.PDFViewerApplication.eventBus.on( - "annotationeditoruimanager", - ({ uiManager }) => { - window.uiManager = uiManager; - } - ); - }); - }, + null, { highlightEditorColors: "red=#AB0000", supportsCaretBrowsingMode: true,