From d54b60a2b2470ea42559b58995e86ff20dd70471 Mon Sep 17 00:00:00 2001 From: Emmanuel Odeke Date: Sat, 3 Dec 2016 18:45:50 -0800 Subject: [PATCH] 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 --- src/html/template/js_test.go | 1 + 1 file changed, 1 insertion(+) 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 { -- 2.50.0