B2G/gecko/dom/network/tests/unit/test_tcpsocket.js
/**
 * Test that sending a small amount of data works, and that buffering
 * does not take place for this small amount of data.
 */
Test that sending a small amount of data works, and that buffering
does not take place for this small amount of data.
Test that sending a small amount of data works and that buffering does not take place for this small amount of data .
function sendData() {
  server.ondata = makeExpectData('serverdata', DATA_ARRAY);
  if (!sock.send(DATA_ARRAY_BUFFER)) {
    do_throw("send should not have buffered such a small amount of data");
  }
}
function sendData ( ) { server . ondata = makeExpectData ( 'serverdata' , DATA_ARRAY ) ; if ( ! sock . send ( DATA_ARRAY_BUFFER ) ) { do_throw ( "send should not have buffered such a small amount of data" ) ; } }
Test that sending a small amount of data works, and that buffering
 does not take place for this small amount of data.
Test that sending a small amount of data works and that buffering does not take place for this small amount of data .