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

This commit is contained in:
Shelley Vohr 2024-09-10 00:59:19 +02:00 committed by GitHub
parent f427e05d82
commit a4938311cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 30 additions and 11 deletions

View file

@ -3744,6 +3744,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 final : public ExclusiveAccessContext,
void SetBackgroundColor(std::optional<SkColor> color);
void PDFReadyToPrint();
SkRegion* draggable_region() {
return force_non_draggable_ ? nullptr : draggable_region_.get();
}