Index: LayoutTests/http/tests/pointer-lock/iframe-sandboxed-prefixed.html |
diff --git a/LayoutTests/http/tests/pointer-lock/iframe-sandboxed-prefixed.html b/LayoutTests/http/tests/pointer-lock/iframe-sandboxed-prefixed.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3f28c685fa4e841e2ba38be1fc9d0ed4de42f901 |
--- /dev/null |
+++ b/LayoutTests/http/tests/pointer-lock/iframe-sandboxed-prefixed.html |
@@ -0,0 +1,33 @@ |
+<!DOCTYPE HTML> |
+<html> |
+<head> |
+<script src="/js-test-resources/js-test.js"></script> |
+<script src="../resources/pointer-lock/pointer-lock-test-harness-prefixed.js"></script> |
+</head> |
+<body> |
+<div> |
+ <div id="target1"></div> |
+ <iframe src="../resources/pointer-lock/inner-iframe-prefixed.html" sandbox="allow-scripts" onload="doNextStepWithUserGesture()"></iframe> |
+</div> |
+<script> |
+ description("Test sandboxed iframe blocks pointer lock.") |
+ window.jsTestIsAsync = true; |
+ |
+ targetDiv1 = document.getElementById("target1"); |
+ iframe = document.getElementsByTagName("iframe")[0]; |
+ |
+ todo = [ |
+ function () { |
+ iframe.contentWindow.postMessage(["eval", 'document.body.webkitRequestPointerLock()'], "*"); |
+ window.onmessage = function (messageEvent) { |
+ message = messageEvent.data; |
+ shouldBeEqualToString("message", "inner-iframe-prefixed.html onwebkitpointerlockerror"); |
+ window.onmessage = null; |
+ doNextStep(); |
+ } |
+ }, |
+ ]; |
+ // doNextStep() called by iframe onload handler. |
+</script> |
+</body> |
+</html> |