From: Emmanuel Odeke Date: Sun, 4 Dec 2016 02:45:50 +0000 (-0800) Subject: html/template: lock in application/json as valid JS test X-Git-Tag: go1.8beta2~97 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d54b60a2b2470ea42559b58995e86ff20dd70471;p=gostls13.git html/template: lock in application/json as valid JS test CL https://go-review.googlesource.com/33899 added application/json as a mimeType for valid JS. Let's lock that fix in with a test. Updates #18159 Change-Id: Ic4dfd8929aebfc5410f796688f081ca06630f672 Reviewed-on: https://go-review.googlesource.com/33901 TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick Reviewed-by: Nodir Turakulov Run-TryBot: Brad Fitzpatrick --- diff --git a/src/html/template/js_test.go b/src/html/template/js_test.go index 58fc37ae3a..7484f60b54 100644 --- a/src/html/template/js_test.go +++ b/src/html/template/js_test.go @@ -341,6 +341,7 @@ func TestIsJsMimeType(t *testing.T) { {"application/javascript;version=1.8;foo=bar", true}, {"application/javascript/version=1.8", false}, {"text/javascript", true}, + {"application/json", true}, } for _, test := range tests {