зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1509343
[wpt PR 14185] - Make ReadableStream extendable, a=testonly
Automatic update from web-platform-testsMake ReadableStream extendable IDL defined ReadableStream was not extendable because it didn't use provided |info.Holder()| as its wrapper. Instead, it creates a new wrapper in Create functions. This CL solves the issue by making the constructor "custom". The custom constructor creates a blink::ReadableStream first, then associates it to the wrapper, and then calls the appropriate Init function. Bug: 906476 Change-Id: I91a7fec1cf4ee5e08704a944b0af852584d1679e Reviewed-on: https://chromium-review.googlesource.com/c/1347643 Commit-Queue: Yutaka Hirano <yhirano@chromium.org> Reviewed-by: Yuki Shiino <yukishiino@chromium.org> Reviewed-by: Adam Rice <ricea@chromium.org> Cr-Commit-Position: refs/heads/master@{#610391} -- wpt-commits: a51c2df43ad4491d9a778f0f93e83b596fe47c2b wpt-pr: 14185
This commit is contained in:
Родитель
f6b92f4172
Коммит
dd569b435b
|
@ -774,6 +774,13 @@ test(() => {
|
|||
});
|
||||
}, 'ReadableStream: desiredSize when errored');
|
||||
|
||||
test(() => {
|
||||
class Extended extends ReadableStream {
|
||||
newMethod() { return 'foo' };
|
||||
};
|
||||
assert_equals((new Extended()).newMethod(), 'foo');
|
||||
}, 'ReadableStream: ReadableStream is extendable');
|
||||
|
||||
test(() => {
|
||||
|
||||
let startCalled = false;
|
||||
|
|
Загрузка…
Ссылка в новой задаче