mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
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:
commit
3cad8d1c27
2 changed files with 2 additions and 11 deletions
|
@ -817,6 +817,7 @@ class AnnotationEditorUIManager {
|
||||||
this.isShiftKeyDown = false;
|
this.isShiftKeyDown = false;
|
||||||
|
|
||||||
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("TESTING")) {
|
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("TESTING")) {
|
||||||
|
window.uiManager = this;
|
||||||
Object.defineProperty(this, "reset", {
|
Object.defineProperty(this, "reset", {
|
||||||
value: () => {
|
value: () => {
|
||||||
this.selectAll();
|
this.selectAll();
|
||||||
|
|
|
@ -997,17 +997,7 @@ describe("Highlight Editor", () => {
|
||||||
"tracemonkey.pdf",
|
"tracemonkey.pdf",
|
||||||
".annotationEditorLayer",
|
".annotationEditorLayer",
|
||||||
null,
|
null,
|
||||||
async page => {
|
null,
|
||||||
await page.evaluate(async () => {
|
|
||||||
await window.PDFViewerApplication.initializedPromise;
|
|
||||||
window.PDFViewerApplication.eventBus.on(
|
|
||||||
"annotationeditoruimanager",
|
|
||||||
({ uiManager }) => {
|
|
||||||
window.uiManager = uiManager;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
highlightEditorColors: "red=#AB0000",
|
highlightEditorColors: "red=#AB0000",
|
||||||
supportsCaretBrowsingMode: true,
|
supportsCaretBrowsingMode: true,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue