Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1959)

Unified Diff: third_party/WebKit/LayoutTests/bluetooth/characteristic/getDescriptors/gen-gatt-op-disconnect-called-during-success.html

Issue 2466223002: Implement WebBluetooth getDescriptor[s] (Closed)
Patch Set: Implement WebBluetooth getDescriptor[s] Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/bluetooth/characteristic/getDescriptors/gen-gatt-op-disconnect-called-during-success.html
diff --git a/third_party/WebKit/LayoutTests/bluetooth/script-tests/characteristic/gatt-op-disconnect-called-during-success.js b/third_party/WebKit/LayoutTests/bluetooth/characteristic/getDescriptors/gen-gatt-op-disconnect-called-during-success.html
similarity index 65%
copy from third_party/WebKit/LayoutTests/bluetooth/script-tests/characteristic/gatt-op-disconnect-called-during-success.js
copy to third_party/WebKit/LayoutTests/bluetooth/characteristic/getDescriptors/gen-gatt-op-disconnect-called-during-success.html
index 9ec90e39cf1d02c2d7fd64b6e28251848318eb8c..b530eb997c1acc79594082c3aeeb83b4465edd6d 100644
--- a/third_party/WebKit/LayoutTests/bluetooth/script-tests/characteristic/gatt-op-disconnect-called-during-success.js
+++ b/third_party/WebKit/LayoutTests/bluetooth/characteristic/getDescriptors/gen-gatt-op-disconnect-called-during-success.html
@@ -1,3 +1,9 @@
+<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
+<!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]);
@@ -11,11 +17,7 @@ promise_test(() => {
.then(service => service.getCharacteristic('measurement_interval'))
.then(measurement_interval => {
let promise = assert_promise_rejects_with_message(
- measurement_interval.CALLS([
- readValue()|
- writeValue(val)|
- startNotifications()|
- stopNotifications()]),
+ measurement_interval.getDescriptors(),
new DOMException(
'GATT Server disconnected while performing a GATT operation.',
'NetworkError'));
@@ -23,5 +25,7 @@ promise_test(() => {
return promise;
});
});
-}, 'disconnect() called during a FUNCTION_NAME call that succeeds. ' +
+}, 'disconnect() called during a getDescriptors call that succeeds. ' +
'Reject with NetworkError.');
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698