aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/testbinding.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <me@emiliocobos.me>2016-05-12 21:08:35 +0200
committerEmilio Cobos Álvarez <me@emiliocobos.me>2016-05-13 09:42:59 +0200
commit093f5c01e44d6063d65c518089d046895ff7cc9f (patch)
treebaa2268474d69c585b2de3e9658beefef7bdc438 /components/script/dom/testbinding.rs
parent92ba0b9c39a1eaf7c0546fea385b96b67d78c95c (diff)
downloadservo-093f5c01e44d6063d65c518089d046895ff7cc9f.tar.gz
servo-093f5c01e44d6063d65c518089d046895ff7cc9f.zip
codegen: add tests for non-nullable non-required values
Diffstat (limited to 'components/script/dom/testbinding.rs')
-rw-r--r--components/script/dom/testbinding.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/components/script/dom/testbinding.rs b/components/script/dom/testbinding.rs
index e7d4d1a9cff..6dfe66a9d75 100644
--- a/components/script/dom/testbinding.rs
+++ b/components/script/dom/testbinding.rs
@@ -347,11 +347,15 @@ impl TestBindingMethods for TestBinding {
unsignedLongValue: None,
unsignedShortValue: None,
usvstringValue: None,
+ nonRequiredNullable: None,
+ nonRequiredNullable2: Some(None), // null
}
}
- fn TypeKeywordIsSuccess(&self, arg: &TestDictionary) -> bool {
- arg.type_.as_ref().map(|s| s == "success").unwrap_or(false)
+ fn DictMatchesPassedValues(&self, arg: &TestDictionary) -> bool {
+ arg.type_.as_ref().map(|s| s == "success").unwrap_or(false) &&
+ arg.nonRequiredNullable.is_none() &&
+ arg.nonRequiredNullable2 == Some(None)
}
fn PassBoolean(&self, _: bool) {}