| Index: third_party/WebKit/LayoutTests/http/tests/inspector/tracing/timeline-receive-response-event.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/tracing/timeline-receive-response-event.html b/third_party/WebKit/LayoutTests/http/tests/inspector/tracing/timeline-receive-response-event.html
|
| index 06ef735b8a95098525f33bffb33e897a31ea5878..c20c40a9bb05c90045061eb6765ed79b361e6bcb 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/inspector/tracing/timeline-receive-response-event.html
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/inspector/tracing/timeline-receive-response-event.html
|
| @@ -33,12 +33,21 @@ function test()
|
| var recordTypes = TimelineModel.TimelineModel.RecordType;
|
| var typesToDump = new Set([recordTypes.ResourceSendRequest, recordTypes.ResourceReceiveResponse, recordTypes.ResourceReceivedData, recordTypes.ResourceFinish,
|
| recordTypes.EventDispatch, recordTypes.FunctionCall]);
|
| + let hasAlreadyDumptReceivedDataFor = new Map();
|
| function dumpEvent(traceEvent, level)
|
| {
|
| // Ignore stray paint & rendering events for better stability.
|
| var categoryName = Timeline.TimelineUIUtils.eventStyle(traceEvent).category.name;
|
| if (categoryName !== "loading" && categoryName !== "scripting")
|
| return;
|
| + if (traceEvent.name === 'ResourceReceivedData') {
|
| + const requestId = traceEvent.args['data']['requestId'];
|
| + // Dump only the first ResourceReceivedData for a request for stability.
|
| + if (hasAlreadyDumptReceivedDataFor[requestId])
|
| + return;
|
| + hasAlreadyDumptReceivedDataFor[requestId] = true;
|
| + }
|
| +
|
| // Here and below: pretend coalesced record are just not there, as coalescation is time dependent and, hence, not stable.
|
| // Filter out InjectedScript function call because they happen out of sync.
|
| if (typesToDump.has(traceEvent.name) && (traceEvent.name !== "FunctionCall" || traceEvent.args["data"]["url"]))
|
|
|