diff options
author | Awal Garg <awalgarg@gmail.com> | 2016-03-26 08:04:28 +0530 |
---|---|---|
committer | Awal Garg <awalgarg@gmail.com> | 2016-03-26 23:53:56 +0530 |
commit | b1ff30f752ffc23f568a0b96a3e999e4a779f939 (patch) | |
tree | 938b5105103ec2eb829a5be48888bf67823c6ddb /components/script/dom/testbinding.rs | |
parent | f2f05869d6ccd445df9b73e2e8d038c6cfa9e687 (diff) | |
download | servo-b1ff30f752ffc23f568a0b96a3e999e4a779f939.tar.gz servo-b1ff30f752ffc23f568a0b96a3e999e4a779f939.zip |
Allow setting preferences to false in WPT tests. closes #10161
Diffstat (limited to 'components/script/dom/testbinding.rs')
-rw-r--r-- | components/script/dom/testbinding.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/components/script/dom/testbinding.rs b/components/script/dom/testbinding.rs index ae63c1f6e20..41a1ff188b2 100644 --- a/components/script/dom/testbinding.rs +++ b/components/script/dom/testbinding.rs @@ -27,6 +27,7 @@ use js::jsval::{JSVal, NullValue}; use std::borrow::ToOwned; use std::ptr; use std::rc::Rc; +use util::prefs::{get_pref}; use util::str::DOMString; #[dom_struct] @@ -486,6 +487,9 @@ impl TestBindingMethods for TestBinding { fn PassVariadicUnion6(&self, _: Vec<UnsignedLongOrBoolean>) {} fn PassVariadicAny(&self, _: *mut JSContext, _: Vec<HandleValue>) {} fn PassVariadicObject(&self, _: *mut JSContext, _: Vec<*mut JSObject>) {} + fn BooleanMozPreference(&self, pref_name: DOMString) -> bool { + get_pref(pref_name.as_ref()).as_boolean().unwrap_or(false) + } } impl TestBinding { |