mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
webidl: Add test for interface sequences
Sequence interfaces return values worked before, but had no test. Sequence interface arguments didn't work until the previous commit.
This commit is contained in:
parent
3327f00bce
commit
a76efa5eca
2 changed files with 6 additions and 0 deletions
|
@ -192,6 +192,9 @@ impl TestBindingMethods for TestBinding {
|
|||
fn ReceiveUnion3(&self) -> StringOrLongSequence { StringOrLongSequence::eLongSequence(vec![]) }
|
||||
fn ReceiveUnion4(&self) -> StringOrStringSequence { StringOrStringSequence::eStringSequence(vec![]) }
|
||||
fn ReceiveSequence(&self) -> Vec<i32> { vec![1] }
|
||||
fn ReceiveInterfaceSequence(&self) -> Vec<Root<Blob>> {
|
||||
vec![Blob::new(self.global().r(), Vec::new(), "")]
|
||||
}
|
||||
|
||||
fn ReceiveNullableBoolean(&self) -> Option<bool> { Some(false) }
|
||||
fn ReceiveNullableByte(&self) -> Option<i8> { Some(0) }
|
||||
|
@ -253,6 +256,7 @@ impl TestBindingMethods for TestBinding {
|
|||
fn PassCallbackInterface(&self, _: Rc<EventListener>) {}
|
||||
fn PassSequence(&self, _: Vec<i32>) {}
|
||||
fn PassStringSequence(&self, _: Vec<DOMString>) {}
|
||||
fn PassInterfaceSequence(&self, _: Vec<Root<Blob>>) {}
|
||||
|
||||
fn PassNullableBoolean(&self, _: Option<bool>) {}
|
||||
fn PassNullableByte(&self, _: Option<i8>) {}
|
||||
|
|
|
@ -152,6 +152,7 @@ interface TestBinding {
|
|||
(DOMString or sequence<long>) receiveUnion3();
|
||||
(DOMString or sequence<DOMString>) receiveUnion4();
|
||||
sequence<long> receiveSequence();
|
||||
sequence<Blob> receiveInterfaceSequence();
|
||||
|
||||
byte? receiveNullableByte();
|
||||
boolean? receiveNullableBoolean();
|
||||
|
@ -205,6 +206,7 @@ interface TestBinding {
|
|||
void passCallbackInterface(EventListener listener);
|
||||
void passSequence(sequence<long> seq);
|
||||
void passStringSequence(sequence<DOMString> seq);
|
||||
void passInterfaceSequence(sequence<Blob> seq);
|
||||
|
||||
void passNullableBoolean(boolean? arg);
|
||||
void passNullableByte(byte? arg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue