test: add -pdf-ready-to-print event to WebContents for testing (#43651)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
trop[bot] 2024-09-09 21:56:16 -05:00 committed by GitHub
parent 4b5d29201c
commit 96fe03b200
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 30 additions and 11 deletions

View file

@ -3739,6 +3739,10 @@ void WebContents::OnInputEvent(const blink::WebInputEvent& event) {
Emit("input-event", event);
}
void WebContents::PDFReadyToPrint() {
Emit("-pdf-ready-to-print");
}
void WebContents::RunJavaScriptDialog(content::WebContents* web_contents,
content::RenderFrameHost* rfh,
content::JavaScriptDialogType dialog_type,

View file

@ -478,6 +478,8 @@ class WebContents : public ExclusiveAccessContext,
void SetBackgroundColor(std::optional<SkColor> color);
void PDFReadyToPrint();
SkRegion* draggable_region() {
return force_non_draggable_ ? nullptr : draggable_region_.get();
}