aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bluetooth.rs
diff options
context:
space:
mode:
authorAttila Dusnoki <dati91@gmail.com>2017-02-10 15:07:22 +0100
committerAttila Dusnoki <dati91@gmail.com>2017-02-13 14:58:13 +0100
commit4a62562b0f9deb642745a2cd735bc5a6e5187230 (patch)
tree25bdaef95010c93f263dd65528801bc2beac244f /components/script/dom/bluetooth.rs
parent3ec9f0bab9807ccaecd3f4b93d891f7cab82fbc5 (diff)
downloadservo-4a62562b0f9deb642745a2cd735bc5a6e5187230.tar.gz
servo-4a62562b0f9deb642745a2cd735bc5a6e5187230.zip
Add pref to ignore popup in testing
Diffstat (limited to 'components/script/dom/bluetooth.rs')
-rw-r--r--components/script/dom/bluetooth.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/components/script/dom/bluetooth.rs b/components/script/dom/bluetooth.rs
index e681ce5b1da..ec8d6363793 100644
--- a/components/script/dom/bluetooth.rs
+++ b/components/script/dom/bluetooth.rs
@@ -17,7 +17,7 @@ use dom::bindings::codegen::Bindings::BluetoothPermissionResultBinding::Bluetoot
use dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerBinding::
BluetoothRemoteGATTServerMethods;
use dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull;
-use dom::bindings::codegen::Bindings::PermissionStatusBinding::PermissionState;
+use dom::bindings::codegen::Bindings::PermissionStatusBinding::{PermissionName, PermissionState};
use dom::bindings::codegen::UnionTypes::{StringOrStringSequence, StringOrUnsignedLong};
use dom::bindings::error::Error::{self, Network, Security, Type};
use dom::bindings::error::Fallible;
@@ -216,11 +216,9 @@ impl Bluetooth {
ServiceUUIDSequence::new(optional_services_uuids));
// Step 3 - 5
- // FIXME The following call will create a popup, which will mess up the testing...
- // Maybe create a call to the lower level to check if we are testing or not
- // if let PermissionState::Denied = get_descriptor_permission_state(PermissionName::Bluetooth, None) {
- // return p.reject_error(p.global().get_cx(), Error::NotFound);
- // }
+ if let PermissionState::Denied = get_descriptor_permission_state(PermissionName::Bluetooth, None) {
+ return p.reject_error(p.global().get_cx(), Error::NotFound);
+ }
// Note: Steps 6 - 8 are implemented in
// components/net/bluetooth_thread.rs in request_device function.