format-null-character.any.js (529B)
1 // META: title=EventSource: null character in response 2 var test = async_test() 3 test.step(function() { 4 var source = new EventSource("resources/message.py?message=data%3A%00%0A%0A") 5 source.onmessage = function(e) { 6 test.step(function() { 7 assert_equals("\x00", e.data) 8 source.close() 9 }, this) 10 test.done() 11 } 12 source.onerror = function() { 13 test.step(function() { assert_unreached() }) 14 test.done() 15 } 16 })