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

Unified Diff: third_party/WebKit/LayoutTests/bluetooth/requestDevice/not-processing-user-gesture.html

Issue 1910933002: bluetooth: Separate requestDevice tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-mojo-gatt-connect
Patch Set: Merge Created 4 years, 7 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/requestDevice/not-processing-user-gesture.html
diff --git a/third_party/WebKit/LayoutTests/bluetooth/connect/connection-succeeds.html b/third_party/WebKit/LayoutTests/bluetooth/requestDevice/not-processing-user-gesture.html
similarity index 53%
copy from third_party/WebKit/LayoutTests/bluetooth/connect/connection-succeeds.html
copy to third_party/WebKit/LayoutTests/bluetooth/requestDevice/not-processing-user-gesture.html
index 97321810f6448a46bc4df13cc53d2c90b0ca6940..33fe8e8ffc9a2964e014e81509435d555a511e73 100644
--- a/third_party/WebKit/LayoutTests/bluetooth/connect/connection-succeeds.html
+++ b/third_party/WebKit/LayoutTests/bluetooth/requestDevice/not-processing-user-gesture.html
@@ -1,14 +1,15 @@
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharness-helpers.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
<script>
'use strict';
promise_test(() => {
return setBluetoothFakeAdapter('HeartRateAdapter')
- .then(() => requestDeviceWithKeyDown({
- filters: [{services: ['heart_rate']}]}))
- .then(device => device.gatt.connect())
- .then(gattServer => assert_true(gattServer.connected));
-}, 'Device will connect');
+ .then(() => assert_promise_rejects(
+ navigator.bluetooth.requestDevice({
+ filters: [{services: ['heart_rate']}]}),
+ new DOMException('', 'SecurityError')));
+}, 'Requires a user gesture.');
</script>

Powered by Google App Engine
This is Rietveld 408576698