aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/testbinding.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/testbinding.rs')
-rw-r--r--components/script/dom/testbinding.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/components/script/dom/testbinding.rs b/components/script/dom/testbinding.rs
index 344d41af031..0177a6d89d1 100644
--- a/components/script/dom/testbinding.rs
+++ b/components/script/dom/testbinding.rs
@@ -1084,6 +1084,29 @@ impl TestBindingMethods for TestBinding {
stringMember: Some(s2),
}
}
+
+ fn MethodThrowToRejectPromise(&self) -> Fallible<Rc<Promise>> {
+ Err(Error::Type("test".to_string()))
+ }
+
+ fn GetGetterThrowToRejectPromise(&self) -> Fallible<Rc<Promise>> {
+ Err(Error::Type("test".to_string()))
+ }
+
+ fn MethodInternalThrowToRejectPromise(&self, _arg: u64) -> Rc<Promise> {
+ unreachable!("Method should already throw")
+ }
+}
+
+#[allow(non_snake_case)]
+impl TestBinding {
+ pub fn StaticThrowToRejectPromise(_: &GlobalScope) -> Fallible<Rc<Promise>> {
+ Err(Error::Type("test".to_string()))
+ }
+
+ pub fn StaticInternalThrowToRejectPromise(_: &GlobalScope, _arg: u64) -> Rc<Promise> {
+ unreachable!("Method should already throw")
+ }
}
#[allow(non_snake_case)]