diff --git a/dom/tests/mochitest/general/test_interfaces.html b/dom/tests/mochitest/general/test_interfaces.html index a7b636f1e49e..950510ac440a 100644 --- a/dom/tests/mochitest/general/test_interfaces.html +++ b/dom/tests/mochitest/general/test_interfaces.html @@ -154,15 +154,18 @@ var interfaceNamesInGlobalScope = // IMPORTANT: Do not change this list without review from a DOM peer! "BlobEvent", // IMPORTANT: Do not change this list without review from a DOM peer! - {name: "BluetoothAdapter", b2g: true}, + {name: "BluetoothAdapter", b2g: true, permission: "bluetooth"}, // IMPORTANT: Do not change this list without review from a DOM peer! - {name: "BluetoothDevice", b2g: true}, + {name: "BluetoothDevice", b2g: true, permission: "bluetooth"}, // IMPORTANT: Do not change this list without review from a DOM peer! - {name: "BluetoothDeviceEvent", b2g: true}, + {name: "BluetoothDeviceEvent", b2g: true, permission: "bluetooth"}, // IMPORTANT: Do not change this list without review from a DOM peer! - {name: "BluetoothManager", b2g: true}, + {name: "BluetoothDiscoveryStateChangedEvent", b2g: true, + permission: "bluetooth"}, // IMPORTANT: Do not change this list without review from a DOM peer! - {name: "BluetoothStatusChangedEvent", b2g: true}, + {name: "BluetoothManager", b2g: true, permission: "bluetooth"}, +// IMPORTANT: Do not change this list without review from a DOM peer! + {name: "BluetoothStatusChangedEvent", b2g: true, permission: "bluetooth"}, // IMPORTANT: Do not change this list without review from a DOM peer! {name: "BoxObject", xbl: true}, // IMPORTANT: Do not change this list without review from a DOM peer! diff --git a/dom/webidl/BluetoothDiscoveryStateChangedEvent.webidl b/dom/webidl/BluetoothDiscoveryStateChangedEvent.webidl new file mode 100644 index 000000000000..c6fcf780173b --- /dev/null +++ b/dom/webidl/BluetoothDiscoveryStateChangedEvent.webidl @@ -0,0 +1,19 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +[Constructor(DOMString type, + optional BluetoothDiscoveryStateChangedEventInit eventInitDict), + Func="Navigator::HasBluetoothSupport"] +interface BluetoothDiscoveryStateChangedEvent : Event +{ + readonly attribute boolean discovering; +}; + +dictionary BluetoothDiscoveryStateChangedEventInit : EventInit +{ + boolean discovering = false; +}; + diff --git a/dom/webidl/moz.build b/dom/webidl/moz.build index d15be685655b..51d5ba0d882c 100644 --- a/dom/webidl/moz.build +++ b/dom/webidl/moz.build @@ -656,6 +656,7 @@ if CONFIG['MOZ_GAMEPAD']: if CONFIG['MOZ_B2G_BT']: GENERATED_EVENTS_WEBIDL_FILES += [ 'BluetoothDeviceEvent.webidl', + 'BluetoothDiscoveryStateChangedEvent.webidl', 'BluetoothStatusChangedEvent.webidl', ]