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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/sandbox-iframe-blocks-modals.php

Issue 2448833003: Sandbox should prevent 'execCommand("print", ...)'. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/security/sandbox-iframe-blocks-modals.php
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/sandbox-iframe-blocks-modals.php b/third_party/WebKit/LayoutTests/http/tests/security/sandbox-iframe-blocks-modals.php
index b1a434cfd1bcb107923f73d47296dc9c967c8355..a28e8b9c712dc95d5a9bbb37dd11436ae8cb0cd3 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/sandbox-iframe-blocks-modals.php
+++ b/third_party/WebKit/LayoutTests/http/tests/security/sandbox-iframe-blocks-modals.php
@@ -20,6 +20,11 @@ header("Content-Security-Policy: sandbox allow-scripts");
}, "print() returns synchronously in a sandboxed page without blocking on user input.");
test(function () {
+ var result = document.execCommand('print', false, null);
+ assert_false(result);
+ }, "execCommand('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.");
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698