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

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

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

Powered by Google App Engine
This is Rietveld 408576698