1 // Test ThrottleQueue initialization.
4 function init(tq
, mean
, max
) {
15 let tq
= Cc
["@mozilla.org/network/throttlequeue;1"].createInstance(
16 Ci
.nsIInputChannelThrottleQueue
19 ok(!init(tq
, 0, 50), "mean bytes cannot be 0");
20 ok(!init(tq
, 50, 0), "max bytes cannot be 0");
21 ok(!init(tq
, 0, 0), "mean and max bytes cannot be 0");
22 ok(!init(tq
, 70, 20), "max cannot be less than mean");
24 ok(init(tq
, 2, 2), "valid initialization");