| Index: third_party/WebKit/LayoutTests/bluetooth/descriptor/writeValue/descriptor-is-blocklisted.html
|
| diff --git a/third_party/WebKit/LayoutTests/bluetooth/script-tests/descriptor/descriptor-is-blocklisted.js b/third_party/WebKit/LayoutTests/bluetooth/descriptor/writeValue/descriptor-is-blocklisted.html
|
| similarity index 57%
|
| rename from third_party/WebKit/LayoutTests/bluetooth/script-tests/descriptor/descriptor-is-blocklisted.js
|
| rename to third_party/WebKit/LayoutTests/bluetooth/descriptor/writeValue/descriptor-is-blocklisted.html
|
| index 7c935051e314b2f2dca0d02e9ccc16817e37162a..bec0a26ad895b876efe09e658f070c7cdfa9c483 100644
|
| --- a/third_party/WebKit/LayoutTests/bluetooth/script-tests/descriptor/descriptor-is-blocklisted.js
|
| +++ b/third_party/WebKit/LayoutTests/bluetooth/descriptor/writeValue/descriptor-is-blocklisted.html
|
| @@ -1,6 +1,12 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../../resources/testharness.js"></script>
|
| +<script src="../../../resources/testharnessreport.js"></script>
|
| +<script src="../../../resources/bluetooth/bluetooth-helpers.js"></script>
|
| +<script>
|
| 'use strict';
|
| promise_test(
|
| () => {
|
| + let val = new Uint8Array([1]);
|
| return setBluetoothFakeAdapter('DisconnectingHealthThermometerAdapter')
|
| .then(
|
| () => requestDeviceWithKeyDown(
|
| @@ -11,14 +17,15 @@ promise_test(
|
| gattServer.getPrimaryService('health_thermometer'))
|
| .then(service => service.getCharacteristic('measurement_interval'))
|
| .then(
|
| - characteristic => characteristic.getDescriptor(
|
| - 'bad3ec61-3cc3-4954-9702-7977df514114'))
|
| + characteristic => characteristic.getDescriptor(0x2902))
|
| .then(descriptor => {
|
| return assert_promise_rejects_with_message(
|
| - descriptor.CALLS([readValue()]),
|
| + descriptor.writeValue(val),
|
| new DOMException(
|
| - 'readValue() called on blocklisted object marked exclude-reads. ' +
|
| + 'writeValue() called on blocklisted object marked exclude-writes. ' +
|
| 'https://goo.gl/4NeimX',
|
| 'SecurityError'));
|
| })},
|
| - 'Attempt to call FUNCTION_NAME on a blocked descriptor must generate a SecurityError');
|
| + 'Attempt to call writeValue on a blocked descriptor must generate a SecurityError');
|
| +
|
| +</script>
|
|
|