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

Unified Diff: LayoutTests/http/tests/security/resources/cross-frame-access.js

Issue 19095003: Throw 'SecurityError' upon cross-origin Location access. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaseline. Created 7 years, 5 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: LayoutTests/http/tests/security/resources/cross-frame-access.js
diff --git a/LayoutTests/http/tests/security/resources/cross-frame-access.js b/LayoutTests/http/tests/security/resources/cross-frame-access.js
index fd524b53786598a7234ae97693c9998ce471c571..c8063edb4e3e764e53db63026b5a2749815c33f8 100644
--- a/LayoutTests/http/tests/security/resources/cross-frame-access.js
+++ b/LayoutTests/http/tests/security/resources/cross-frame-access.js
@@ -58,6 +58,24 @@ function canGet(keyPath)
}
}
+function accessThrowsException(keyPath) {
+ try {
+ eval("window." + keyPath);
+ return false;
+ } catch (e) {
+ return true;
+ }
+}
+
+function deletionThrowsException(keyPath) {
+ try {
+ eval("delete " + keyPath);
+ return false;
+ } catch (e) {
+ return true;
+ }
+}
+
function canGetDescriptor(target, property)
{
try {

Powered by Google App Engine
This is Rietveld 408576698