Index: third_party/WebKit/LayoutTests/bluetooth/resources/requestDevice-in-sandboxed-iframe.html |
diff --git a/third_party/WebKit/LayoutTests/bluetooth/resources/requestDevice-in-sandboxed-iframe.html b/third_party/WebKit/LayoutTests/bluetooth/resources/requestDevice-in-sandboxed-iframe.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fe51c535900f0c93cf01680d2876c22ffb11c77f |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/bluetooth/resources/requestDevice-in-sandboxed-iframe.html |
@@ -0,0 +1,16 @@ |
+<!DOCTYPE html> |
+<button onclick="RequestDevice()">Request</button> |
+<script> |
+window.onmessage = messageEvent => { |
+ if (messageEvent.data === 'Go') { |
Jeffrey Yasskin
2016/02/10 22:26:11
Comment that 'Go' is sent while handling a user ge
ortuno
2016/02/10 23:09:47
Done.
|
+ navigator.bluetooth.requestDevice({ |
+ filters: [{services: ['heart_rate']}] |
+ }).then(() => { |
+ parent.postMessage('Should have failed.', '*'); |
+ }).catch(err => { |
+ parent.postMessage(err.name + ': ' + err.message, '*'); |
+ }); |
+ } |
+ }; |
+ parent.postMessage("Ready", "*"); |
+</script> |