mirror of
https://github.com/servo/servo.git
synced 2025-06-23 16:44:33 +01:00
- Update CSS tests to revision e05bfd5e30ed662c2f8a353577003f8eed230180. - Update web-platform-tests to revision a052787dd5c069a340031011196b73affbd68cd9.
33 lines
760 B
JavaScript
33 lines
760 B
JavaScript
'use strict';
|
|
|
|
if (self.importScripts) {
|
|
self.importScripts('/resources/testharness.js');
|
|
}
|
|
|
|
promise_test(() => {
|
|
let isDone = false;
|
|
const ws = new WritableStream(
|
|
{
|
|
write() {
|
|
return new Promise(resolve => {
|
|
setTimeout(() => {
|
|
isDone = true;
|
|
resolve();
|
|
}, 200);
|
|
});
|
|
},
|
|
|
|
close() {
|
|
assert_true(isDone, 'close is only called once the promise has been resolved');
|
|
}
|
|
},
|
|
new ByteLengthQueuingStrategy({ highWaterMark: 1024 * 16 })
|
|
);
|
|
|
|
const writer = ws.getWriter();
|
|
writer.write({ byteLength: 1024 });
|
|
|
|
return writer.close();
|
|
}, 'Closing a writable stream with in-flight writes below the high water mark delays the close call properly');
|
|
|
|
done();
|