| OLD | NEW |
| 1 <?php | 1 <?php |
| 2 // Copyright 2016 The Chromium Authors. All rights reserved. | 2 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 | 5 |
| 6 // This test ensures that navigator.vibrate when enabled for self only works on | 6 // This test ensures that navigator.vibrate when enabled for self only works on |
| 7 // the same origin. | 7 // the same origin. |
| 8 | 8 |
| 9 Header("Feature-Policy: {\"vibrate\": [\"self\"]}"); | 9 Header("Feature-Policy: {\"vibrate\": [\"self\"]}"); |
| 10 ?> | 10 ?> |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 for (var i = 0; i < iframes.length; ++i) { | 25 for (var i = 0; i < iframes.length; ++i) { |
| 26 var iframe = iframes[i]; | 26 var iframe = iframes[i]; |
| 27 // The iframe uses eventSender to emulate a user navigatation, which require
s absolute coordinates. | 27 // The iframe uses eventSender to emulate a user navigatation, which require
s absolute coordinates. |
| 28 iframe.contentWindow.postMessage({x: iframe.offsetLeft, y: iframe.offsetTop}
, "*"); | 28 iframe.contentWindow.postMessage({x: iframe.offsetLeft, y: iframe.offsetTop}
, "*"); |
| 29 } | 29 } |
| 30 } | 30 } |
| 31 </script> | 31 </script> |
| 32 </head> | 32 </head> |
| 33 <body onload="loaded();"> | 33 <body onload="loaded();"> |
| 34 <iframe id="f1" src="resources/feature-policy-vibrate-enabled.html"></iframe> | 34 <iframe id="f1" src="resources/feature-policy-vibrate-enabled.html"></iframe> |
| 35 <iframe id="f2" src="http://localhost:8000/feature-policy/resources/feature-poli
cy-vibrate-disabled.html"></iframe> | 35 <iframe id="f2" src="http://localhost:8000/feature-policy-experimental-features/
resources/feature-policy-vibrate-disabled.html"></iframe> |
| 36 </body> | 36 </body> |
| 37 </html> | 37 </html> |
| OLD | NEW |