Web Inspector: Inspecting a Main Resource that is JS/JSON does not format / syntax...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Mar 2017 20:57:11 +0000 (20:57 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Mar 2017 20:57:11 +0000 (20:57 +0000)
commit3a75b6ffcf6c3f315f39c78b29a1e8231d073aa5
treeaa53bb4bb0ba62d5f17649fc8ae7ef73ee665c12
parent873706322a5f2f69da208a66a87c3843e0da4b17
Web Inspector: Inspecting a Main Resource that is JS/JSON does not format / syntax highlight it properly
https://bugs.webkit.org/show_bug.cgi?id=166862
<rdar://problem/29835977>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-03-28
Reviewed by Brian Burg.

Source/WebInspectorUI:

* UserInterface/Models/Resource.js:
(WebInspector.Resource.prototype.get syntheticMIMEType):
Don't override the mime type for Document resources. They should always
have a mime type and we should use whatever it is.

LayoutTests:

* http/tests/inspector/network/resource-mime-type-expected.txt: Added.
* http/tests/inspector/network/resource-mime-type.html: Added.
Test resource mime types for different resources.

* http/tests/inspector/network/resources/json.php: Added.
* http/tests/inspector/network/resources/script.js: Added.
* http/tests/inspector/network/resources/script.txt: Added.
* http/tests/inspector/network/resources/stylesheet.css: Added.
* http/tests/inspector/network/resources/stylesheet.txt: Added.
* http/tests/resources/square20.jpg: Added.
Resources for various requests and different mime types.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@214492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/network/resource-mime-type-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/inspector/network/resource-mime-type.html [new file with mode: 0644]
LayoutTests/http/tests/inspector/network/resources/json.php [new file with mode: 0644]
LayoutTests/http/tests/inspector/network/resources/script.js [new file with mode: 0644]
LayoutTests/http/tests/inspector/network/resources/script.txt [new file with mode: 0644]
LayoutTests/http/tests/inspector/network/resources/stylesheet.css [new file with mode: 0644]
LayoutTests/http/tests/inspector/network/resources/stylesheet.txt [new file with mode: 0644]
LayoutTests/http/tests/resources/square20.jpg [new file with mode: 0644]
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/Resource.js