-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[dotnet] [bidi] Implement browsing context download events #16382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dotnet] [bidi] Implement browsing context download events #16382
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
User description
https://w3c.github.io/webdriver-bidi/#event-browsingContext-downloadWillBegin
https://w3c.github.io/webdriver-bidi/#event-browsingContext-downloadEnd
💥 What does this PR do?
Fix
downloadWillBeginevent signature, implementdownloadEndevent. Adding tests.🔄 Types of changes
PR Type
Enhancement
Description
Fix
downloadWillBeginevent signature to use proper event argsImplement new
downloadEndevent with polymorphic event argsAdd comprehensive tests for both download events
Create JSON converters for proper serialization
Diagram Walkthrough
File Walkthrough
BrowsingContext.cs
Update download event method signaturesdotnet/src/webdriver/BiDi/BrowsingContext/BrowsingContext.cs
OnDownloadWillBeginAsyncmethod signatures to useDownloadWillBeginEventArgsOnDownloadEndAsyncmethods for both sync and async handlersBrowsingContextModule.cs
Update module download event subscriptionsdotnet/src/webdriver/BiDi/BrowsingContext/BrowsingContextModule.cs
OnDownloadWillBeginAsyncmethod signatures to use proper eventargs
OnDownloadEndAsyncmethods subscribing tobrowsingContext.downloadEndDownloadEndEventArgs.cs
Create download end event args classesdotnet/src/webdriver/BiDi/BrowsingContext/DownloadEndEventArgs.cs
DownloadEndEventArgsDownloadCanceledEventArgsandDownloadCompleteEventArgsderived types
DownloadWillBeginEventArgs.cs
Create download will begin event argsdotnet/src/webdriver/BiDi/BrowsingContext/DownloadWillBeginEventArgs.cs
DownloadWillBeginEventArgsrecord with suggested filenameIBaseNavigationInfointerface for navigation contextDownloadEndEventArgsConverter.cs
Create polymorphic download end converterdotnet/src/webdriver/BiDi/Communication/Json/Converters/Polymorphic/DownloadEndEventArgsConverter.cs
DownloadEndEventArgscanceledandcompletestatus discriminatorsBroker.cs
Register download end event converterdotnet/src/webdriver/BiDi/Communication/Broker.cs
DownloadEndEventArgsConverterfor polymorphic JSONserialization
BiDiJsonSerializerContext.cs
Register download event types for serializationdotnet/src/webdriver/BiDi/Communication/Json/BiDiJsonSerializerContext.cs
BrowsingContextEventsTest.cs
Add download events integration testsdotnet/test/common/BiDi/BrowsingContext/BrowsingContextEventsTest.cs
downloadWillBeginevent with file download simulationdownloadEndevent verifying completion and filepath