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

Unified Diff: LayoutTests/http/tests/security/cross-frame-access-enumeration.html

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/cross-frame-access-enumeration.html
diff --git a/LayoutTests/http/tests/security/cross-frame-access-enumeration.html b/LayoutTests/http/tests/security/cross-frame-access-enumeration.html
index bd3b080a72d9a8e4fa722afcea0771e973c48aff..f43cf97dfbfe22e0e3c77309fdbec35a25698c5b 100644
--- a/LayoutTests/http/tests/security/cross-frame-access-enumeration.html
+++ b/LayoutTests/http/tests/security/cross-frame-access-enumeration.html
@@ -45,17 +45,23 @@
}
log("PASS: Cross frame access by enumerating the window object was denied.");
- var b_winKeys = Object.keys(b_win);
- if (b_winKeys.indexOf("customWindowProperty") != -1) {
- log("FAIL: Cross frame access by getting the keys of the window object was allowed.");
- return;
+ try {
+ var b_winKeys = Object.keys(b_win);
+ if (b_winKeys.indexOf("customWindowProperty") != -1) {
+ log("FAIL: Cross frame access by getting the keys of the window object was allowed.");
+ return;
+ }
+ } catch (e) {
}
log("PASS: Cross frame access by getting the keys of the window object was denied.");
- var b_winPropertyNames = Object.getOwnPropertyNames(b_win);
- if (b_winPropertyNames.indexOf("customWindowProperty") != -1) {
- log("FAIL: Cross frame access by getting the property names of the window object was allowed.");
- return;
+ try {
+ var b_winPropertyNames = Object.getOwnPropertyNames(b_win);
+ if (b_winPropertyNames.indexOf("customWindowProperty") != -1) {
+ log("FAIL: Cross frame access by getting the property names of the window object was allowed.");
+ return;
+ }
+ } catch (e) {
}
log("PASS: Cross frame access by getting the property names of the window object was denied.");
@@ -92,9 +98,8 @@
return;
}
} catch (e) {
- log("PASS: Cross frame access by getting the keys of the Location object was denied.");
+ log("PASS: Cross frame access by getting the property names of the Location object was denied.");
}
- log("PASS: Cross frame access by getting the property names of the Location object was denied.");
}
</script>
</head>

Powered by Google App Engine
This is Rietveld 408576698