mirror of
https://github.com/servo/servo.git
synced 2025-08-12 17:05:33 +01:00
Update web-platform-tests to revision 3f3849c5d05f9350fad0b06d3bb3ae30d7e18d14
This commit is contained in:
parent
9a7e2663e8
commit
f767403c00
310 changed files with 8134 additions and 895 deletions
|
@ -106,3 +106,26 @@ test(() => {
|
|||
'CountQueuingStrategy.name must be "CountQueuingStrategy"');
|
||||
|
||||
}, 'CountQueuingStrategy.name is correct');
|
||||
|
||||
class SubClass extends CountQueuingStrategy {
|
||||
size() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
subClassMethod() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
test(() => {
|
||||
|
||||
const sc = new SubClass({highWaterMark: 77});
|
||||
assert_equals(sc.constructor.name, 'SubClass',
|
||||
'constructor.name should be correct');
|
||||
assert_equals(sc.highWaterMark, 77,
|
||||
'highWaterMark should come from the parent class');
|
||||
assert_equals(sc.size(), 2,
|
||||
'size() on the subclass should override the parent');
|
||||
assert_true(sc.subClassMethod(), 'subClassMethod() should work');
|
||||
|
||||
}, 'subclassing CountQueuingStrategy should work correctly');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue