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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/vibrate_in_cross_origin_iframe_with_user_gesture_allowed.html

Issue 2778693004: Remove navigator.vibrate without user gesture. (Closed)
Patch Set: rebase Created 3 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Vibrate in cross-origin iframe with user gesture is allowed.</tit le>
5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script>
7 <script>
8 if (window.testRunner) {
9 testRunner.dumpAsText();
10 testRunner.dumpChildFramesAsText();
11 }
12 function loaded()
13 {
14 document.getElementsByTagName('h4')[0].innerHTML = document.domain;
15 var iframe = document.getElementById("i");
16 // The iframe uses eventSender to emulate a user navigatation, which requires absolute coordinates.
17 // Because the iframe is cross-origin, it can't get the offsets itse lf, so leak them.
18 frames[0].postMessage({x: iframe.offsetLeft, y: iframe.offsetTop}, " *");
19 }
20 </script>
21 </head>
22 <body onload="loaded();">
23 <p>This tests that a cross-origin iframe with user gesture can vibrate.</p>
24 <h4>DOMAIN</h4>
25 <iframe id="i" src="http://localhost:8000/security/resources/cross-origin-if rame-for-vibrate-with-user-gesture-allowed.html"></iframe>
26 </body>
27 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698