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 // https://webbluetoothcg.github.io/web-bluetooth/#bluetooth
[Pref="dom.bluetooth.enabled"]
interface Bluetooth { interface Bluetooth {
// Promise<BluetoothDevice> requestDevice(RequestDeviceOptions options); // Promise<BluetoothDevice> requestDevice(RequestDeviceOptions options);
BluetoothDevice? requestDevice(/*RequestDeviceOptions options*/); BluetoothDevice? requestDevice(/*RequestDeviceOptions options*/);

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,3 +1,3 @@
[preferences.html] [preferences.html]
type: testharness 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 = [ var interfaceNamesInGlobalScope = [
"Attr", "Attr",
"Blob", "Blob",
"Bluetooth",
"BluetoothAdvertisingData",
"BluetoothCharacteristicProperties",
"BluetoothDevice",
"BluetoothRemoteGATTCharacteristic",
"BluetoothRemoteGATTDescriptor",
"BluetoothRemoteGATTServer",
"BluetoothRemoteGATTService",
"BluetoothUUID",
"CanvasGradient", "CanvasGradient",
"CanvasRenderingContext2D", "CanvasRenderingContext2D",
"CanvasPattern", "CanvasPattern",
@ -215,8 +206,6 @@ var interfaceNamesInGlobalScope = [
"StorageEvent", "StorageEvent",
"StyleSheet", "StyleSheet",
"StyleSheetList", "StyleSheetList",
"TestBinding", // XXX
"TestBindingProxy", // XXX
"Text", "Text",
"TextDecoder", "TextDecoder",
"TextEncoder", "TextEncoder",