@@ -41,11 +41,11 @@ const responses = {
4141 } )
4242 } ,
4343 '/fragment' : function ( request ) {
44- if ( request . headers . get ( 'Accept' ) === 'text/html; fragment' ) {
44+ if ( request . headers . get ( 'Accept' ) === 'text/fragment+html ' ) {
4545 return new Response ( '<div id="fragment">fragment</div>' , {
4646 status : 200 ,
4747 headers : {
48- 'Content-Type' : 'text/html; fragment'
48+ 'Content-Type' : 'text/fragment+html '
4949 }
5050 } )
5151 } else {
@@ -197,15 +197,15 @@ suite('include-fragment-element', function() {
197197
198198 test ( 'throws on non-matching Content-Type' , function ( ) {
199199 const el = document . createElement ( 'include-fragment' )
200- el . setAttribute ( 'accept' , 'text/html; fragment' )
200+ el . setAttribute ( 'accept' , 'text/fragment+html ' )
201201 el . setAttribute ( 'src' , '/hello' )
202202
203203 return el . data . then (
204204 ( ) => {
205205 assert . ok ( false )
206206 } ,
207207 error => {
208- assert . match ( error , / e x p e c t e d t e x t \/ h t m l ; f r a g m e n t b u t w a s t e x t \/ h t m l ; c h a r s e t = u t f - 8 / )
208+ assert . match ( error , / e x p e c t e d t e x t \/ f r a g m e n t \+ h t m l b u t w a s t e x t \/ h t m l ; c h a r s e t = u t f - 8 / )
209209 }
210210 )
211211 } )
@@ -309,7 +309,7 @@ suite('include-fragment-element', function() {
309309
310310 test ( 'replaces with response with the right accept header' , function ( ) {
311311 const div = document . createElement ( 'div' )
312- div . innerHTML = '<include-fragment src="/fragment" accept="text/html; fragment">loading</include-fragment>'
312+ div . innerHTML = '<include-fragment src="/fragment" accept="text/fragment+html ">loading</include-fragment>'
313313 document . body . appendChild ( div )
314314
315315 return when ( div . firstChild , 'load' ) . then ( ( ) => {
0 commit comments