Skip to content

Commit 062a9c7

Browse files
Connor ClarkDevtools-frontend LUCI CQ
authored andcommitted
[RPP] Don't save traces with scripts with name "EnhancedTrace"
Don't save with a different name based on presence of scripts. Bug: 427455148 Change-Id: I3c436be3e8fc90562e92e1375b826b750014da31 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7046626 Auto-Submit: Connor Clark <[email protected]> Reviewed-by: Paul Irish <[email protected]> Commit-Queue: Connor Clark <[email protected]>
1 parent 6d7e607 commit 062a9c7

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

front_end/panels/timeline/TimelinePanel.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ describeWithEnvironment('TimelinePanel', function() {
372372
sinon.assert.calledOnce(closeSpy);
373373

374374
const [fileName, contentData] = saveSpy.getCall(0).args;
375-
assert.match(fileName, /EnhancedTrace-[\d|T]+\.json\.gz$/);
375+
assert.match(fileName, /Trace-[\d|T]+\.json\.gz$/);
376376

377377
const file = await contentDataToFile(contentData);
378378
assert.isDefined(file.metadata.enhancedTraceVersion);
@@ -392,7 +392,7 @@ describeWithEnvironment('TimelinePanel', function() {
392392
sinon.assert.calledOnce(closeSpy);
393393

394394
const [fileName, contentData] = saveSpy.getCall(0).args;
395-
assert.match(fileName, /EnhancedTrace-[\d|T]+\.json\.gz$/);
395+
assert.match(fileName, /Trace-[\d|T]+\.json\.gz$/);
396396

397397
const file = await contentDataToFile(contentData);
398398
assert.isDefined(file.metadata.enhancedTraceVersion);
@@ -484,7 +484,7 @@ describeWithEnvironment('TimelinePanel', function() {
484484
sinon.assert.calledOnce(closeSpy);
485485

486486
const [fileName, contentData] = saveSpy.getCall(0).args;
487-
assert.match(fileName, /EnhancedTrace-[\d|T]+\.json$/);
487+
assert.match(fileName, /Trace-[\d|T]+\.json$/);
488488

489489
const file = await contentDataToFile(contentData);
490490
assert.isDefined(file.metadata.enhancedTraceVersion);
@@ -527,7 +527,7 @@ describeWithEnvironment('TimelinePanel', function() {
527527
sinon.assert.calledOnce(closeSpy);
528528

529529
const [fileName, contentData] = saveSpy.getCall(0).args;
530-
assert.match(fileName, /EnhancedTrace-[\d|T]+\.json$/);
530+
assert.match(fileName, /Trace-[\d|T]+\.json$/);
531531

532532
const file = await contentDataToFile(contentData);
533533
assert.isDefined(file.metadata.enhancedTraceVersion);

front_end/panels/timeline/TimelinePanel.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1468,9 +1468,8 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
14681468
metadata.enhancedTraceVersion =
14691469
includeScriptContent ? SDK.EnhancedTracesParser.EnhancedTracesParser.enhancedTraceVersion : undefined;
14701470

1471-
let fileName = (isCpuProfile ? `CPU-${isoDate}.cpuprofile` :
1472-
includeScriptContent ? `EnhancedTrace-${isoDate}.json` :
1473-
`Trace-${isoDate}.json`) as Platform.DevToolsPath.RawPathString;
1471+
let fileName =
1472+
(isCpuProfile ? `CPU-${isoDate}.cpuprofile` : `Trace-${isoDate}.json`) as Platform.DevToolsPath.RawPathString;
14741473

14751474
let blobParts: string[] = [];
14761475
if (isCpuProfile) {

0 commit comments

Comments
 (0)