Merge pull request #18574 from calixteman/add_window_uimanager_test

[Editor] Add the uiManager to the window object when testing
This commit is contained in:
calixteman 2024-08-07 19:17:24 +02:00 committed by GitHub
commit 3cad8d1c27
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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,