40 const PREFIX =
"http://localhost:4444";
75 var
dir = do_get_file(
"data/ranges/");
76 srv.registerDirectory(
"/", dir);
86 do_check_eq(ch.getResponseHeader(
"Content-Length"),
"21");
87 do_check_eq(ch.getResponseHeader(
"Content-Type"),
"text/plain");
99 ch.setRequestHeader(
"Range",
"bytes=10-",
false);
105 do_check_eq(ch.getResponseHeader(
"Content-Length"),
"11");
106 do_check_eq(ch.getResponseHeader(
"Content-Type"),
"text/plain");
107 do_check_eq(ch.getResponseHeader(
"Content-Range"),
"bytes 10-20/21");
119 ch.setRequestHeader(
"Range",
"bytes=21-",
false);
129 ch.setRequestHeader(
"Range",
"bytes=10-15",
false);
135 do_check_eq(ch.getResponseHeader(
"Content-Length"),
"6");
136 do_check_eq(ch.getResponseHeader(
"Content-Type"),
"text/plain");
137 do_check_eq(ch.getResponseHeader(
"Content-Range"),
"bytes 10-15/21");
153 ch.setRequestHeader(
"Range",
"xbytes=21-",
false);
163 ch.setRequestHeader(
"Range",
"bytes=-5",
false);
183 ch.setRequestHeader(
"Range",
"bytes=15-12",
false);
200 ch.setRequestHeader(
"Range",
"bytes=0-5",
false);
206 do_check_eq(ch.getResponseHeader(
"Content-Length"),
"6");
207 do_check_eq(ch.getResponseHeader(
"Content-Type"),
"text/plain");
208 do_check_eq(ch.getResponseHeader(
"Content-Range"),
"bytes 0-5/21");
224 ch.setRequestHeader(
"Range",
"bytes=20-21",
false);
230 do_check_eq(ch.getResponseHeader(
"Content-Range"),
"bytes 20-20/21");
241 ch.setRequestHeader(
"Range",
"bytes=020-021",
false);
257 ch.setRequestHeader(
"Range",
"bytes=-",
false);
267 ch.setRequestHeader(
"Range",
"bytes=-500",
false);
285 do_check_eq(ch.getResponseHeader(
"Content-Length"),
"0");
function init_byterange7(ch)
function start_byterange10(ch, cx)
do_check_eq(typeof PlacesUtils,"object")
function start_byterange(ch, cx)
function start_byterange11(ch, cx)
function init_byterange2(ch)
function init_byterange11(ch)
function stop_byterange3(ch, cx, status, data)
function runHttpTests(testArray, done)
function start_normal(ch, cx)
function stop_byterange(ch, cx, status, data)
function start_byterange2(ch, cx)
function start_byterange6(ch, cx)
function init_byterange10(ch)
function start_byterange12(ch, cx)
function stop_normal(ch, cx, status, data)
function stop_byterange5(ch, cx, status, data)
function start_byterange4(ch, cx)
function stop_byterange12(ch, cx, status, data)
function init_byterange3(ch)
function start_byterange7(ch, cx)
function stop_byterange8(ch, cx, status, data)
function init_byterange4(ch)
function stop_byterange7(ch, cx, status, data)
function start_byterange5(ch, cx)
function stop_byterange11(ch, cx, status, data)
function init_byterange(ch)
function start_byterange9(ch, cx)
function testComplete(srv)
function Test(path, initChannel, onStartRequest, onStopRequest)
function stop_byterange9(ch, cx, status, data)
function stop_byterange6(ch, cx, status, data)
function start_byterange3(ch, cx)
function init_byterange6(ch)
function init_byterange5(ch)
function init_byterange9(ch)
function start_byterange8(ch, cx)
function init_byterange8(ch)