final HttpResponse response = ch.readOutbound();
assertThat(response.getStatus(), equalTo(OK));
assertThat(response.headers().get(CONTENT_TYPE), equalTo(Transports.CONTENT_TYPE_HTML));
verifyNoCacheHeaders(response);
final HttpContent headerChunk = ch.readOutbound();
assertThat(headerChunk.content().readableBytes(), is(greaterThan(1024)));
final String header = headerChunk.content().toString(UTF_8);
assertThat(header, containsString("var c = parent.callback"));
final HttpContent chunk = ch.readOutbound();
assertThat(chunk.content().toString(UTF_8), equalTo("<script>\np(\"o\");\n</script>\r\n"));
ch.write(new MessageFrame("x"));
final HttpContent messageContent = ch.readOutbound();
assertThat(messageContent.content().toString(UTF_8), equalTo("<script>\np(\"a[\\\"x\\\"]\");\n</script>\r\n"));
}