diff options
Diffstat (limited to 'components/script/dom/testbinding.rs')
-rw-r--r-- | components/script/dom/testbinding.rs | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/components/script/dom/testbinding.rs b/components/script/dom/testbinding.rs index faf53596ecc..630e5b2acd7 100644 --- a/components/script/dom/testbinding.rs +++ b/components/script/dom/testbinding.rs @@ -24,12 +24,12 @@ use dom::bindings::str::{ByteString, DOMString, USVString}; use dom::bindings::weakref::MutableWeakRef; use dom::blob::{Blob, DataSlice}; use dom::url::URL; -use js::jsapi::{HandleValue, JSContext, JSObject}; +use js::jsapi::{HandleObject, HandleValue, JSContext, JSObject}; use js::jsval::{JSVal, NullValue}; use std::borrow::ToOwned; use std::ptr; use std::rc::Rc; -use util::prefs::{get_pref}; +use util::prefs::get_pref; #[dom_struct] pub struct TestBinding { @@ -567,6 +567,10 @@ impl TestBindingMethods for TestBinding { fn PrefControlledAttributeEnabled(&self) -> bool { false } fn PrefControlledMethodDisabled(&self) {} fn PrefControlledMethodEnabled(&self) {} + fn FuncControlledAttributeDisabled(&self) -> bool { false } + fn FuncControlledAttributeEnabled(&self) -> bool { false } + fn FuncControlledMethodDisabled(&self) {} + fn FuncControlledMethodEnabled(&self) {} } impl TestBinding { @@ -577,4 +581,14 @@ impl TestBinding { pub fn PrefControlledStaticAttributeEnabled(_: GlobalRef) -> bool { false } pub fn PrefControlledStaticMethodDisabled(_: GlobalRef) {} pub fn PrefControlledStaticMethodEnabled(_: GlobalRef) {} + pub fn FuncControlledStaticAttributeDisabled(_: GlobalRef) -> bool { false } + pub fn FuncControlledStaticAttributeEnabled(_: GlobalRef) -> bool { false } + pub fn FuncControlledStaticMethodDisabled(_: GlobalRef) {} + pub fn FuncControlledStaticMethodEnabled(_: GlobalRef) {} +} + +#[allow(unsafe_code)] +impl TestBinding { + pub unsafe fn condition_satisfied(_: *mut JSContext, _: HandleObject) -> bool { true } + pub unsafe fn condition_unsatisfied(_: *mut JSContext, _: HandleObject) -> bool { false } } |