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

Unified Diff: LayoutTests/http/tests/plugins/resources/cross-frame-object-access.html

Issue 19095003: Throw 'SecurityError' upon cross-origin Location access. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/plugins/resources/cross-frame-object-access.html
diff --git a/LayoutTests/http/tests/plugins/resources/cross-frame-object-access.html b/LayoutTests/http/tests/plugins/resources/cross-frame-object-access.html
index f03f2eb11f90eaec03e14fa499f35a72b6cdb240..e223c4207632176927019836325633a84effdbd4 100644
--- a/LayoutTests/http/tests/plugins/resources/cross-frame-object-access.html
+++ b/LayoutTests/http/tests/plugins/resources/cross-frame-object-access.html
@@ -14,11 +14,14 @@ function checkLocationObject(l)
return false;
}
- if (l.href) {
- debug('could access top.location.href');
- return false;
+ try {
+ if (l.href) {
+ debug('could access top.location.href');
+ return false;
+ }
+ } catch (e) {
+ return true;
}
-
return true;
}

Powered by Google App Engine
This is Rietveld 408576698