mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Fix scripting test related to keystroke event
This commit is contained in:
parent
88236e1163
commit
880ac6037c
1 changed files with 15 additions and 1 deletions
|
@ -1168,11 +1168,25 @@ describe("Scripting", function () {
|
||||||
value: "3F?",
|
value: "3F?",
|
||||||
change: "0",
|
change: "0",
|
||||||
name: "Keystroke",
|
name: "Keystroke",
|
||||||
willCommit: true,
|
willCommit: false,
|
||||||
selStart: 3,
|
selStart: 3,
|
||||||
selEnd: 3,
|
selEnd: 3,
|
||||||
});
|
});
|
||||||
expect(send_queue.has(refId)).toEqual(false);
|
expect(send_queue.has(refId)).toEqual(false);
|
||||||
|
|
||||||
|
await sandbox.dispatchEventInSandbox({
|
||||||
|
id: refId,
|
||||||
|
value: "3F?0",
|
||||||
|
name: "Keystroke",
|
||||||
|
willCommit: true,
|
||||||
|
selStart: 4,
|
||||||
|
selEnd: 4,
|
||||||
|
});
|
||||||
|
expect(send_queue.has(refId)).toEqual(true);
|
||||||
|
expect(send_queue.get(refId)).toEqual({
|
||||||
|
id: refId,
|
||||||
|
valueAsString: "3F?0",
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue