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

Unified 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: 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« 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