@@ -41,11 +41,11 @@ const responses = {
41
41
} )
42
42
} ,
43
43
'/fragment' : function ( request ) {
44
- if ( request . headers . get ( 'Accept' ) === 'text/html; fragment' ) {
44
+ if ( request . headers . get ( 'Accept' ) === 'text/fragment+html ' ) {
45
45
return new Response ( '<div id="fragment">fragment</div>' , {
46
46
status : 200 ,
47
47
headers : {
48
- 'Content-Type' : 'text/html; fragment'
48
+ 'Content-Type' : 'text/fragment+html '
49
49
}
50
50
} )
51
51
} else {
@@ -197,15 +197,15 @@ suite('include-fragment-element', function() {
197
197
198
198
test ( 'throws on non-matching Content-Type' , function ( ) {
199
199
const el = document . createElement ( 'include-fragment' )
200
- el . setAttribute ( 'accept' , 'text/html; fragment' )
200
+ el . setAttribute ( 'accept' , 'text/fragment+html ' )
201
201
el . setAttribute ( 'src' , '/hello' )
202
202
203
203
return el . data . then (
204
204
( ) => {
205
205
assert . ok ( false )
206
206
} ,
207
207
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 / )
209
209
}
210
210
)
211
211
} )
@@ -309,7 +309,7 @@ suite('include-fragment-element', function() {
309
309
310
310
test ( 'replaces with response with the right accept header' , function ( ) {
311
311
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>'
313
313
document . body . appendChild ( div )
314
314
315
315
return when ( div . firstChild , 'load' ) . then ( ( ) => {
0 commit comments