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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/vibration/vibrate-in-same-origin-iframe-with-user-gesture-allowed.html

Issue 2834493002: Remove vibrate w/o user gesture by default (Closed)
Patch Set: Change to turn on by default 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Vibrate in same-origin iframe with user gesture is allowed.</titl e> 4 <title>Vibrate in same-origin iframe with user gesture is allowed.</titl e>
5 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script> 6 <script src="/resources/testharnessreport.js"></script>
7 <script> 7 <script>
8 if (window.testRunner) { 8 if (window.testRunner) {
9 testRunner.dumpAsText(); 9 testRunner.dumpAsText();
10 testRunner.dumpChildFramesAsText(); 10 testRunner.dumpChildFramesAsText();
11 } 11 }
12 function loaded() 12 function loaded()
13 { 13 {
14 document.getElementsByTagName('h4')[0].innerHTML = document.domain; 14 document.getElementsByTagName('h4')[0].innerHTML = document.domain;
15 var iframe = document.getElementById("i"); 15 var iframe = document.getElementById("i");
16 // The iframe uses eventSender to emulate a user navigatation, which requires absolute coordinates. 16 // The iframe uses eventSender to emulate a user navigatation, which requires absolute coordinates.
17 frames[0].postMessage({x: iframe.offsetLeft, y: iframe.offsetTop}, " *"); 17 frames[0].postMessage({x: iframe.offsetLeft, y: iframe.offsetTop}, " *");
18 } 18 }
19 </script> 19 </script>
20 </head> 20 </head>
21 <body onload="loaded();"> 21 <body onload="loaded();">
22 <p>This tests that a same-origin iframe with user gesture can vibrate.</p> 22 <p>This tests that a same-origin iframe with user gesture can vibrate.</p>
23 <h4>DOMAIN</h4> 23 <h4>DOMAIN</h4>
24 <iframe id="i" src="resources/vibrate-in-same-origin-iframe-with-user-gestur e-allowed.html"></iframe> 24 <iframe id="i" src="resources/vibrate-in-iframe-with-user-gesture-allowed.ht ml"></iframe>
25 </body> 25 </body>
26 </html> 26 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698