Skip to content

Commit

Permalink
Merge pull request mozilla#18623 from timvandermeij/uimanager-test
Browse files Browse the repository at this point in the history
[Editor] Move setting `window.uiManager` back to the test code
  • Loading branch information
timvandermeij authored Aug 19, 2024
2 parents b47c7ec + db06011 commit 79dce53
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/display/editor/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,6 @@ class AnnotationEditorUIManager {
this.isShiftKeyDown = false;

if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("TESTING")) {
window.uiManager = this;
Object.defineProperty(this, "reset", {
value: () => {
this.selectAll();
Expand Down
8 changes: 7 additions & 1 deletion test/integration/highlight_editor_spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,13 @@ describe("Highlight Editor", () => {
"tracemonkey.pdf",
".annotationEditorLayer",
null,
null,
{
eventBusSetup: eventBus => {
eventBus.on("annotationeditoruimanager", ({ uiManager }) => {
window.uiManager = uiManager;
});
},
},
{
highlightEditorColors: "red=#AB0000",
supportsCaretBrowsingMode: true,
Expand Down
8 changes: 7 additions & 1 deletion test/integration/stamp_editor_spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,13 @@ describe("Stamp Editor", () => {
"empty.pdf",
".annotationEditorLayer",
null,
null,
{
eventBusSetup: eventBus => {
eventBus.on("annotationeditoruimanager", ({ uiManager }) => {
window.uiManager = uiManager;
});
},
},
{
enableAltText: true,
enableUpdatedAddImage: true,
Expand Down

0 comments on commit 79dce53

Please sign in to comment.