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

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

Issue 19932002: Throw exceptions on all failed cross-origin access checks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: test. 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 c8063edb4e3e764e53db63026b5a2749815c33f8..3b48f8c82569f19b9d5add97ab4e14d3631d2430 100644
--- a/LayoutTests/http/tests/security/resources/cross-frame-access.js
+++ b/LayoutTests/http/tests/security/resources/cross-frame-access.js
@@ -58,6 +58,17 @@ function canGet(keyPath)
}
}
+function shouldThrowException(a) {
+ try {
+ var evalA = eval(e);
+ log("FAIL: " + a + " should have thrown an exception, but instead returned " + evalA + ".");
+ return false;
+ } catch (e) {
+ log("PASS: " + a + " should have thrown an exception, and did.");
+ return true;
+ }
+}
+
function accessThrowsException(keyPath) {
try {
eval("window." + keyPath);

Powered by Google App Engine
This is Rietveld 408576698