Add WPT test for WebIDL union conversion containing object values

This commit is contained in:
Igor Matuszewski 2018-03-13 02:35:25 +01:00
parent 17ecbaf8ff
commit 712812d441
5 changed files with 44 additions and 0 deletions

View file

@ -293,6 +293,14 @@ impl TestBindingMethods for TestBinding {
fn ReceiveInterfaceSequence(&self) -> Vec<DomRoot<Blob>> {
vec![Blob::new(&self.global(), BlobImpl::new_from_bytes(vec![]), "".to_owned())]
}
#[allow(unsafe_code)]
unsafe fn ReceiveUnionIdentity(
&self,
_: *mut JSContext,
arg: UnionTypes::StringOrObject,
) -> UnionTypes::StringOrObject {
arg
}
fn ReceiveNullableBoolean(&self) -> Option<bool> { Some(false) }
fn ReceiveNullableByte(&self) -> Option<i8> { Some(0) }

View file

@ -228,6 +228,8 @@ interface TestBinding {
TestDictionary receiveTestDictionaryWithSuccessOnKeyword();
boolean dictMatchesPassedValues(TestDictionary arg);
(DOMString or object) receiveUnionIdentity((DOMString or object) arg);
void passBoolean(boolean arg);
void passByte(byte arg);
void passOctet(octet arg);