1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 14:48:08 +02:00

[Editor] Add the uiManager to the window object when testing

This commit is contained in:
Calixte Denizet 2024-08-07 18:06:14 +02:00
parent 341a0b6d47
commit e037c5711d
2 changed files with 2 additions and 11 deletions

View file

@ -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();

View file

@ -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,