Index: LayoutTests/http/tests/security/sandbox-iframe-blocks-modals.html |
diff --git a/LayoutTests/http/tests/security/sandbox-iframe-blocks-modals.html b/LayoutTests/http/tests/security/sandbox-iframe-blocks-modals.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..242190c58e1edcef05e13014d3fb2b5e05ac6ca5 |
--- /dev/null |
+++ b/LayoutTests/http/tests/security/sandbox-iframe-blocks-modals.html |
@@ -0,0 +1,31 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+ <meta http-equiv="Content-Security-Policy" content="sandbox allow-scripts"> |
+ <script src="/resources/testharness.js"></script> |
+ <script src="/resources/testharnessreport.js"></script> |
+</head> |
+<body> |
+ <script> |
+ test(function () { |
+ var result = alert("Yay!"); |
+ assert_equals(result, undefined); |
+ }, "alert() returns synchronously in a sandboxed page without blocking on user input."); |
+ |
+ test(function () { |
+ var result = print(); |
+ assert_equals(result, undefined); |
+ }, "print() returns synchronously in a sandboxed page without blocking on user input."); |
+ |
+ test(function () { |
+ var result = confirm("Question?"); |
+ assert_equals(result, false); |
+ }, "confirm() returns 'false' synchronously in a sandboxed page without blocking on user input."); |
+ |
+ test(function () { |
+ var result = prompt("Question?"); |
+ assert_equals(result, null); |
+ }, "prompt() returns 'null' synchronously in a sandboxed page without blocking on user input."); |
+ </script> |
+</body> |
+</html> |