mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision dc5cbf088edcdb266541d4e5a76149a2c6e716a0
This commit is contained in:
parent
1d40075f03
commit
079092dfea
2381 changed files with 90360 additions and 17722 deletions
|
@ -15,18 +15,18 @@
|
|||
|
||||
<script>
|
||||
|
||||
var test = async_test();
|
||||
|
||||
test.step(function() {
|
||||
function doTest(test, expectedLengthComputable, expectedTotal, url) {
|
||||
var client = new XMLHttpRequest();
|
||||
var lastSize = 0;
|
||||
|
||||
client.onprogress = test.step_func(function() {
|
||||
client.onprogress = test.step_func(function(e) {
|
||||
assert_equals(e.total, expectedTotal);
|
||||
assert_equals(e.lengthComputable, expectedLengthComputable);
|
||||
|
||||
var currentSize = client.responseText.length;
|
||||
|
||||
if (lastSize > 0 && currentSize > lastSize) {
|
||||
// growth from a positive size to bigger!
|
||||
|
||||
test.done();
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,13 @@ test.step(function() {
|
|||
}
|
||||
});
|
||||
|
||||
client.open("GET", "resources/trickle.py?count=1000");
|
||||
client.open("GET", url);
|
||||
client.send(null);
|
||||
});
|
||||
return client;
|
||||
}
|
||||
|
||||
async_test(function () { doTest(this, false, 0, "resources/trickle.py?count=6&delay=150"); },
|
||||
document.title + ', unknown content-length');
|
||||
async_test(function () { doTest(this, true, 78, "resources/trickle.py?count=6&delay=150&specifylength=1"); },
|
||||
document.title + ', known content-length');
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue