diff options
Diffstat (limited to 'components/script/dom/testbinding.rs')
-rw-r--r-- | components/script/dom/testbinding.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/components/script/dom/testbinding.rs b/components/script/dom/testbinding.rs index 566ff2d9375..3ac2e7c2c26 100644 --- a/components/script/dom/testbinding.rs +++ b/components/script/dom/testbinding.rs @@ -28,6 +28,7 @@ use dom::bindings::reflector::{Reflectable, Reflector, reflect_dom_object}; use dom::bindings::str::{ByteString, DOMString, USVString}; use dom::bindings::weakref::MutableWeakRef; use dom::blob::{Blob, BlobImpl}; +use dom::promise::Promise; use dom::url::URL; use js::jsapi::{HandleObject, HandleValue, JSContext, JSObject}; use js::jsapi::{JS_NewPlainObject, JS_NewUint8ClampedArray}; @@ -647,6 +648,22 @@ impl TestBindingMethods for TestBinding { fn ReceiveMozMapOfMozMaps(&self) -> MozMap<MozMap<i32>> { MozMap::new() } fn ReceiveAnyMozMap(&self) -> MozMap<JSVal> { MozMap::new() } + #[allow(unrooted_must_root)] + fn ReturnPromise(&self) -> Rc<Promise> { + Promise::new(self.global().r()) + } + + #[allow(unrooted_must_root)] + fn PromiseAttribute(&self) -> Rc<Promise> { + Promise::new(self.global().r()) + } + + fn AcceptPromise(&self, _promise: &Promise) { + } + + fn AcceptNullablePromise(&self, _promise: Option<&Promise>) { + } + fn PassSequenceSequence(&self, _seq: Vec<Vec<i32>>) {} fn ReturnSequenceSequence(&self) -> Vec<Vec<i32>> { vec![] } fn PassUnionSequenceSequence(&self, seq: LongOrLongSequenceSequence) { |