Disable nonstandard interfaces via prefs.

This commit is contained in:
Josh Matthews 2016-03-18 13:13:49 -04:00
parent bb47f72f25
commit 91a78ed109
16 changed files with 22 additions and 13 deletions

View file

@ -4,6 +4,7 @@
// https://webbluetoothcg.github.io/web-bluetooth/#bluetooth
[Pref="dom.bluetooth.enabled"]
interface Bluetooth {
// Promise<BluetoothDevice> requestDevice(RequestDeviceOptions options);
BluetoothDevice? requestDevice(/*RequestDeviceOptions options*/);

View file

@ -12,6 +12,7 @@ interface BluetoothServiceDataMap {
readonly maplike<UUID, DataView>;
};*/
[Pref="dom.bluetooth.enabled"]
interface BluetoothAdvertisingData {
readonly attribute unsigned short? appearance;
readonly attribute byte? txPower;

View file

@ -4,6 +4,7 @@
// https://webbluetoothcg.github.io/web-bluetooth/#characteristicproperties
[Pref="dom.bluetooth.enabled"]
interface BluetoothCharacteristicProperties {
readonly attribute boolean broadcast;
readonly attribute boolean read;

View file

@ -10,6 +10,7 @@ enum VendorIDSource {
"usb"
};
[Pref="dom.bluetooth.enabled"]
interface BluetoothDevice {
readonly attribute DOMString id;
readonly attribute DOMString? name;

View file

@ -4,6 +4,7 @@
// https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattcharacteristic
[Pref="dom.bluetooth.enabled"]
interface BluetoothRemoteGATTCharacteristic {
readonly attribute BluetoothRemoteGATTService service;
readonly attribute DOMString uuid;

View file

@ -4,6 +4,7 @@
// http://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattdescriptor
[Pref="dom.bluetooth.enabled"]
interface BluetoothRemoteGATTDescriptor {
readonly attribute BluetoothRemoteGATTCharacteristic characteristic;
readonly attribute DOMString uuid;

View file

@ -4,6 +4,7 @@
//https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattserver
[Pref="dom.bluetooth.enabled"]
interface BluetoothRemoteGATTServer {
readonly attribute BluetoothDevice device;
readonly attribute boolean connected;

View file

@ -4,6 +4,7 @@
// https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattservice
[Pref="dom.bluetooth.enabled"]
interface BluetoothRemoteGATTService {
readonly attribute BluetoothDevice device;
readonly attribute DOMString uuid;

View file

@ -4,6 +4,7 @@
// https://webbluetoothcg.github.io/web-bluetooth/#bluetoothuuid
[Pref="dom.bluetooth.enabled"]
interface BluetoothUUID {
[Throws]
static UUID getService(BluetoothServiceUUID name);

View file

@ -72,7 +72,8 @@ dictionary TestDictionaryDefaults {
[Constructor,
Constructor(sequence<unrestricted double> numberSequence),
Constructor(unrestricted double num)]
Constructor(unrestricted double num),
Pref="dom.testbinding.enabled"]
interface TestBinding {
attribute boolean booleanAttribute;
attribute byte byteAttribute;

View file

@ -11,6 +11,7 @@
// This interface is entirely internal to Servo, and should not be accessible to
// web pages.
[Pref="dom.testbinding.enabled"]
interface TestBindingProxy : TestBinding {
readonly attribute unsigned long length;

View file

@ -1,3 +1,3 @@
[preferences.html]
type: testharness
prefs: [dom.testbinding.preference_value.falsy:false, dom.testbinding.preference_value.truthy:true, dom.testbinding.preference_value.string_empty:, dom.testbinding.preference_value.string_test:test, dom.testbinding.preference_value.space_string_test:test1 test2, dom.testbinding.preference_value.quote_string_test:"test1 test2"]
prefs: [dom.testbinding.enabled:true, dom.testbinding.preference_value.falsy:false, dom.testbinding.preference_value.truthy:true, dom.testbinding.preference_value.string_empty:, dom.testbinding.preference_value.string_test:test, dom.testbinding.preference_value.space_string_test:test1 test2, dom.testbinding.preference_value.quote_string_test:"test1 test2"]

View file

@ -0,0 +1,3 @@
[sequence-hole.html]
type: testharness
prefs: [dom.testbinding.enabled:true]

View file

@ -0,0 +1,3 @@
[variadic-interface.html]
type: testharness
prefs: [dom.testbinding.enabled:true]

View file

@ -0,0 +1,3 @@
[weakref.html]
type: testharness
prefs: [dom.testbinding.enabled:true]

View file

@ -74,15 +74,6 @@ var ecmaGlobals = [
var interfaceNamesInGlobalScope = [
"Attr",
"Blob",
"Bluetooth",
"BluetoothAdvertisingData",
"BluetoothCharacteristicProperties",
"BluetoothDevice",
"BluetoothRemoteGATTCharacteristic",
"BluetoothRemoteGATTDescriptor",
"BluetoothRemoteGATTServer",
"BluetoothRemoteGATTService",
"BluetoothUUID",
"CanvasGradient",
"CanvasRenderingContext2D",
"CanvasPattern",
@ -215,8 +206,6 @@ var interfaceNamesInGlobalScope = [
"StorageEvent",
"StyleSheet",
"StyleSheetList",
"TestBinding", // XXX
"TestBindingProxy", // XXX
"Text",
"TextDecoder",
"TextEncoder",