Web Inspector: Timelines - Cannot export on about:blank - suggested filename containi...
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Mar 2019 02:33:38 +0000 (02:33 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Mar 2019 02:33:38 +0000 (02:33 +0000)
commit3382e685dd45360e98406aa0c4efeb8582531f33
tree6fc143bec3372902f2cff2453a084b4289370de6
parent65deed48818e0308fa8c18062d7d851d725a5548
Web Inspector: Timelines - Cannot export on about:blank - suggested filename containing a colon silently fails
https://bugs.webkit.org/show_bug.cgi?id=196109

Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

* UserInterface/Base/FileUtilities.js:
(WI.FileUtilities.sanitizeFilename):
(WI.FileUtilities.inspectorURLForFilename):
New utility functions.

* UserInterface/Test.html:
Include FileUtilities.

* UserInterface/Base/Main.js:
* UserInterface/Controllers/AuditManager.js:
(WI.AuditManager.prototype.export):
* UserInterface/Debug/ProtocolTrace.js:
(WI.ProtocolTrace.prototype.get saveData):
(WI.ProtocolTrace):
* UserInterface/Views/ConsoleMessageView.js:
(WI.ConsoleMessageView.prototype._handleContextMenu):
(WI.ConsoleMessageView):
* UserInterface/Views/ContextMenuUtilities.js:
* UserInterface/Views/HeapSnapshotContentView.js:
(WI.HeapSnapshotContentView.prototype._exportSnapshot):
* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype.get saveData):
(WI.LogContentView.prototype._handleContextMenuEvent):
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype._exportHAR):
* UserInterface/Views/RecordingContentView.js:
(WI.RecordingContentView.prototype._exportRecording):
(WI.RecordingContentView.prototype._exportReduction):
* UserInterface/Views/ScriptContentView.js:
(WI.ScriptContentView.prototype.get saveData):
* UserInterface/Views/ShaderProgramContentView.js:
(WI.ShaderProgramContentView.prototype.get saveData):
* UserInterface/Views/TextContentView.js:
(WI.TextContentView.prototype.get saveData):
* UserInterface/Views/TextResourceContentView.js:
(WI.TextResourceContentView.prototype.get saveData):
* UserInterface/Views/TimelineRecordingContentView.js:
(WI.TimelineRecordingContentView.prototype._exportTimelineRecording):
Update "web-inspector:///" URL building code to use the utility.

LayoutTests:

* inspector/unit-tests/file-utilities-expected.txt: Added.
* inspector/unit-tests/file-utilities.html: Added.
Tests for FileUtilities.js

* inspector/unit-tests/object-utilities.html:
* inspector/unit-tests/promise-utilities.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243355 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector/unit-tests/file-utilities-expected.txt [new file with mode: 0644]
LayoutTests/inspector/unit-tests/file-utilities.html [new file with mode: 0644]
LayoutTests/inspector/unit-tests/object-utilities.html
LayoutTests/inspector/unit-tests/promise-utilities.html
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Base/FileUtilities.js
Source/WebInspectorUI/UserInterface/Base/Main.js
Source/WebInspectorUI/UserInterface/Controllers/AuditManager.js
Source/WebInspectorUI/UserInterface/Debug/ProtocolTrace.js
Source/WebInspectorUI/UserInterface/Test.html
Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js
Source/WebInspectorUI/UserInterface/Views/ContextMenuUtilities.js
Source/WebInspectorUI/UserInterface/Views/HeapSnapshotContentView.js
Source/WebInspectorUI/UserInterface/Views/LogContentView.js
Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js
Source/WebInspectorUI/UserInterface/Views/RecordingContentView.js
Source/WebInspectorUI/UserInterface/Views/ScriptContentView.js
Source/WebInspectorUI/UserInterface/Views/ShaderProgramContentView.js
Source/WebInspectorUI/UserInterface/Views/TextContentView.js
Source/WebInspectorUI/UserInterface/Views/TextResourceContentView.js
Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js