New Feature: Add ResourceTiming, Request.Initiator stack traces, and network tests (#2151)#3245
Merged
New Feature: Add ResourceTiming, Request.Initiator stack traces, and network tests (#2151)#3245
Conversation
Port missing upstream tests for network.spec.ts: - Request.headers: should define Browser in user agent header - Request.initiator: should return the initiator - Response.buffer: should throw if the response does not have a body - Response.statusText: handles missing status text - Response.timing: returns timing information - raw network headers: Same-origin set-cookie navigation - raw network headers: Same-origin set-cookie subresource - raw network headers: Cross-origin set-cookie Also adds supporting library changes: - ResourceTiming class and Timing property on IResponse/Response - CallFrame and InitiatorStackTrace classes - Stack property on Initiator - Test fixtures: initiator.html and initiator.js Co-Authored-By: Claude Opus 4.6 <[email protected]>
BidiHttpResponse was not setting the Timing property, causing NullReferenceException in ReturnsTimingInformation test on Firefox. Maps FetchTimingInfo fields to ResourceTiming matching upstream behavior. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Local ignores should never be added for upstream test failures. Co-Authored-By: Claude Opus 4.6 <[email protected]>
ASP.NET Core Kestrel does not support sending empty HTTP reason phrases - it defaults to 'OK' for status 200 regardless of ReasonPhrase setting. Co-Authored-By: Claude Opus 4.6 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
IResponse.Timingproperty — AddsResourceTimingclass with timing information (e.g.,ReceiveHeadersEnd) for network responses, with support for both CDP and BiDi protocolsInitiator.Stackproperty — AddsInitiatorStackTraceandCallFrameclasses to expose the full initiator call stack on requests, enabling tracing of script-initiated network requests back to their sourcenetwork.spec.ts: request headers, request initiator, response buffer/status/timing, and raw network headers (set-cookie) testsinitiator.htmlandinitiator.jsCloses #2151
Test plan
HandlesMissingStatusTextadded to local expectations (ASP.NET Core Kestrel defaults empty ReasonPhrase to "OK")🤖 Generated with Claude Code