aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/script/dom/bluetoothremotegattcharacteristic.rs4
-rw-r--r--components/script/dom/bluetoothremotegattdescriptor.rs4
-rw-r--r--tests/wpt/mozilla/meta/mozilla/bluetooth/writeValue/characteristic/write-updates-value.html.ini4
-rw-r--r--tests/wpt/mozilla/meta/mozilla/bluetooth/writeValue/descriptor/write-updates-value.html.ini4
4 files changed, 4 insertions, 12 deletions
diff --git a/components/script/dom/bluetoothremotegattcharacteristic.rs b/components/script/dom/bluetoothremotegattcharacteristic.rs
index 16a2bde68f5..49207d09fbd 100644
--- a/components/script/dom/bluetoothremotegattcharacteristic.rs
+++ b/components/script/dom/bluetoothremotegattcharacteristic.rs
@@ -188,10 +188,10 @@ impl BluetoothRemoteGATTCharacteristic {
}
let (sender, receiver) = ipc::channel().unwrap();
self.get_bluetooth_thread().send(
- BluetoothMethodMsg::WriteValue(self.get_instance_id(), value, sender)).unwrap();
+ BluetoothMethodMsg::WriteValue(self.get_instance_id(), value.clone(), sender)).unwrap();
let result = receiver.recv().unwrap();
match result {
- Ok(_) => Ok(()),
+ Ok(_) => Ok(*self.value.borrow_mut() = Some(ByteString::new(value))),
Err(error) => {
Err(Error::from(error))
},
diff --git a/components/script/dom/bluetoothremotegattdescriptor.rs b/components/script/dom/bluetoothremotegattdescriptor.rs
index 5ca51f45439..c7e64b7305c 100644
--- a/components/script/dom/bluetoothremotegattdescriptor.rs
+++ b/components/script/dom/bluetoothremotegattdescriptor.rs
@@ -105,10 +105,10 @@ impl BluetoothRemoteGATTDescriptor {
}
let (sender, receiver) = ipc::channel().unwrap();
self.get_bluetooth_thread().send(
- BluetoothMethodMsg::WriteValue(self.get_instance_id(), value, sender)).unwrap();
+ BluetoothMethodMsg::WriteValue(self.get_instance_id(), value.clone(), sender)).unwrap();
let result = receiver.recv().unwrap();
match result {
- Ok(_) => Ok(()),
+ Ok(_) => Ok(*self.value.borrow_mut() = Some(ByteString::new(value))),
Err(error) => {
Err(Error::from(error))
},
diff --git a/tests/wpt/mozilla/meta/mozilla/bluetooth/writeValue/characteristic/write-updates-value.html.ini b/tests/wpt/mozilla/meta/mozilla/bluetooth/writeValue/characteristic/write-updates-value.html.ini
deleted file mode 100644
index a61aadb0883..00000000000
--- a/tests/wpt/mozilla/meta/mozilla/bluetooth/writeValue/characteristic/write-updates-value.html.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[write-updates-value.html]
- type: testharness
- [A regular write request to a writable characteristic should update value.]
- expected: FAIL
diff --git a/tests/wpt/mozilla/meta/mozilla/bluetooth/writeValue/descriptor/write-updates-value.html.ini b/tests/wpt/mozilla/meta/mozilla/bluetooth/writeValue/descriptor/write-updates-value.html.ini
deleted file mode 100644
index f96edea6781..00000000000
--- a/tests/wpt/mozilla/meta/mozilla/bluetooth/writeValue/descriptor/write-updates-value.html.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[write-updates-value.html]
- type: testharness
- [A regular write request to a writable descriptor should update value.]
- expected: FAIL