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:
parent
341a0b6d47
commit
e037c5711d
2 changed files with 2 additions and 11 deletions
|
@ -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();
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue