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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/vibration/vibrate-in-same-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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/security/vibration/vibrate-in-same-origin-iframe-with-user-gesture-allowed.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/vibrate_in_cross_origin_iframe_with_user_gesture_allowed.html b/third_party/WebKit/LayoutTests/http/tests/security/vibration/vibrate-in-same-origin-iframe-with-user-gesture-allowed.html
similarity index 65%
rename from third_party/WebKit/LayoutTests/http/tests/security/vibrate_in_cross_origin_iframe_with_user_gesture_allowed.html
rename to third_party/WebKit/LayoutTests/http/tests/security/vibration/vibrate-in-same-origin-iframe-with-user-gesture-allowed.html
index a164954017289f08beda5eaf1f7857194bf2128a..7e8f2f3dc81e4e29aac399175af27df644286e8c 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/vibrate_in_cross_origin_iframe_with_user_gesture_allowed.html
+++ b/third_party/WebKit/LayoutTests/http/tests/security/vibration/vibrate-in-same-origin-iframe-with-user-gesture-allowed.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
- <title>Vibrate in cross-origin iframe with user gesture is allowed.</title>
+ <title>Vibrate in same-origin iframe with user gesture is allowed.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
@@ -14,14 +14,13 @@
document.getElementsByTagName('h4')[0].innerHTML = document.domain;
var iframe = document.getElementById("i");
// The iframe uses eventSender to emulate a user navigatation, which requires absolute coordinates.
- // Because the iframe is cross-origin, it can't get the offsets itself, so leak them.
frames[0].postMessage({x: iframe.offsetLeft, y: iframe.offsetTop}, "*");
}
</script>
</head>
<body onload="loaded();">
- <p>This tests that a cross-origin iframe with user gesture can vibrate.</p>
+ <p>This tests that a same-origin iframe with user gesture can vibrate.</p>
<h4>DOMAIN</h4>
- <iframe id="i" src="http://localhost:8000/security/resources/cross-origin-iframe-for-vibrate-with-user-gesture-allowed.html"></iframe>
+ <iframe id="i" src="resources/vibrate-in-same-origin-iframe-with-user-gesture-allowed.html"></iframe>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698