aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <ecoal95@gmail.com>2016-01-15 13:40:43 +0100
committerEmilio Cobos Álvarez <ecoal95@gmail.com>2016-01-15 14:20:22 +0100
commita76efa5eca50300a42c2a1fb8ac53b77e852d7d2 (patch)
tree315fa9fd2d54bf654d92a14b96052309c4144546 /components/script
parent3327f00bce1b5b302b0dfe8453a35b186029f0f5 (diff)
downloadservo-a76efa5eca50300a42c2a1fb8ac53b77e852d7d2.tar.gz
servo-a76efa5eca50300a42c2a1fb8ac53b77e852d7d2.zip
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.
Diffstat (limited to 'components/script')
-rw-r--r--components/script/dom/testbinding.rs4
-rw-r--r--components/script/dom/webidls/TestBinding.webidl2
2 files changed, 6 insertions, 0 deletions
diff --git a/components/script/dom/testbinding.rs b/components/script/dom/testbinding.rs
index 473f96f5704..6854ef493ee 100644
--- a/components/script/dom/testbinding.rs
+++ b/components/script/dom/testbinding.rs
@@ -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>) {}
diff --git a/components/script/dom/webidls/TestBinding.webidl b/components/script/dom/webidls/TestBinding.webidl
index ee3250427fe..4863b1ce0b0 100644
--- a/components/script/dom/webidls/TestBinding.webidl
+++ b/components/script/dom/webidls/TestBinding.webidl
@@ -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);