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

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

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/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 714cd8047a1fc5ad312ddab1de008338ed99ac39..bd3b080a72d9a8e4fa722afcea0771e973c48aff 100644
--- a/LayoutTests/http/tests/security/cross-frame-access-enumeration.html
+++ b/LayoutTests/http/tests/security/cross-frame-access-enumeration.html
@@ -68,21 +68,31 @@
return;
}
}
+ log("FAIL: Cross frame access to Location object didn't throw an exception.");
} catch (e) {
+ log("PASS: Cross frame access by enumerating the Location object was denied.");
}
- log("PASS: Cross frame access by enumerating the Location object was denied.");
- var b_winLocationKeys = Object.keys(b_win_location);
- if (b_winLocationKeys.indexOf("customLocationProperty") != -1) {
- log("FAIL: Cross frame access by getting the keys of the Location object was allowed.");
- return;
+ try {
+ var b_winLocationKeys = Object.keys(b_win_location);
+ log("FAIL: Cross frame access to Location object didn't throw an exception.");
+ if (b_winLocationKeys.indexOf("customLocationProperty") != -1) {
+ log("FAIL: Cross frame access by getting the keys of the Location object was allowed.");
+ 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 keys of the Location object was denied.");
- var b_winLocationPropertyNames = Object.getOwnPropertyNames(b_win_location);
- if (b_winLocationPropertyNames.indexOf("customLocationProperty") != -1) {
- log("FAIL: Cross frame access by getting the property names of the Location object was allowed.");
- return;
+ try {
+ var b_winLocationPropertyNames = Object.getOwnPropertyNames(b_win_location);
+ log("FAIL: Cross frame access to Location object didn't throw an exception.");
+ if (b_winLocationPropertyNames.indexOf("customLocationProperty") != -1) {
+ log("FAIL: Cross frame access by getting the property names of the Location object was allowed.");
+ 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.");
}

Powered by Google App Engine
This is Rietveld 408576698