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.rs16
1 files changed, 15 insertions, 1 deletions
diff --git a/components/script/dom/testbinding.rs b/components/script/dom/testbinding.rs
index faf53596ecc..5ff0e0bd272 100644
--- a/components/script/dom/testbinding.rs
+++ b/components/script/dom/testbinding.rs
@@ -24,7 +24,7 @@ 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;
@@ -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 }
}