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

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

Issue 1869523003: Move LayoutTests/bluetooth/resources to LayoutTests/resources/bluetooth. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Created 4 years, 8 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 | « third_party/WebKit/LayoutTests/resources/bluetooth/requestDevice-in-iframe.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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <button onclick="RequestDevice()">Request</button> 2 <button onclick="RequestDevice()">Request</button>
3 <script> 3 <script>
4 window.onmessage = messageEvent => { 4 window.onmessage = messageEvent => {
5 // For requestDevice to work, 'Go' should be sent while 5 // For requestDevice to work, 'Go' should be sent while
6 // handling a user gesture. 6 // handling a user gesture.
7 if (messageEvent.data === 'Go') { 7 if (messageEvent.data === 'Go') {
8 navigator.bluetooth.requestDevice({ 8 navigator.bluetooth.requestDevice({
9 filters: [{services: ['heart_rate']}] 9 filters: [{services: ['heart_rate']}]
10 }).then(() => { 10 }).then(() => {
11 parent.postMessage('Should have failed.', '*'); 11 parent.postMessage('Should have failed.', '*');
12 }).catch(err => { 12 }).catch(err => {
13 parent.postMessage(err.name + ': ' + err.message, '*'); 13 parent.postMessage(err.name + ': ' + err.message, '*');
14 }); 14 });
15 } 15 }
16 }; 16 };
17 parent.postMessage("Ready", "*"); 17 parent.postMessage("Ready", "*");
18 </script> 18 </script>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/resources/bluetooth/requestDevice-in-iframe.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698