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

Side by Side Diff: LayoutTests/bluetooth/resources/requestDevice-in-iframe.html

Issue 1227863007: Test that concurrent requestDevice() calls from iframes work. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@attach-to-frame
Patch Set: Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « LayoutTests/bluetooth/iframeRequestDevice.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script>
3 window.onmessage = messageEvent => {
4 if (messageEvent.data === 'Go') {
5 navigator.bluetooth.requestDevice({
6 filters: [{services: ['generic_access']}]
7 }).then(device => {
8 if (device.constructor.name === "BluetoothDevice") {
9 parent.postMessage('Success', '*');
10 } else {
11 parent.postMessage('FAIL: requestDevice in iframe returned ' + device, '*');
12 }
13 }).catch(err => {
14 console.error(err);
15 parent.postMessage('FAIL: ' + err, '*');
16 });
17 }
18 };
19 parent.postMessage("Ready", "*");
20 </script>
OLDNEW
« no previous file with comments | « LayoutTests/bluetooth/iframeRequestDevice.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698