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

Unified Diff: LayoutTests/http/tests/security/cross-frame-access-location-get.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-location-get.html
diff --git a/LayoutTests/http/tests/security/cross-frame-access-location-get.html b/LayoutTests/http/tests/security/cross-frame-access-location-get.html
index f01f76106123f686b711fd22fe11ce1cd5ddf7e6..f4a4e455df110ba906baa77e1c99c91746a17be2 100644
--- a/LayoutTests/http/tests/security/cross-frame-access-location-get.html
+++ b/LayoutTests/http/tests/security/cross-frame-access-location-get.html
@@ -41,6 +41,7 @@
log("Firefox allows access to 'location.toString' but throws an exception when you call it.");
shouldBeFalse("canGet('targetWindow.location.toString')");
+ shouldBeTrue("accessThrowsException('targetWindow.location.toString')");
shouldBeFalse("canGet('targetWindow.location.href')");
shouldBeFalse("canGet('targetWindow.location.hash')");
@@ -50,12 +51,24 @@
shouldBeFalse("canGet('targetWindow.location.port')");
shouldBeFalse("canGet('targetWindow.location.protocol')");
shouldBeFalse("canGet('targetWindow.location.search')");
+ shouldBeFalse("canGet('targetWindow.location.existingCustomProperty')");
+ shouldBeFalse("canGet('targetWindow.location[1]')");
+
+ shouldBeTrue("accessThrowsException('targetWindow.location.href')");
+ shouldBeTrue("accessThrowsException('targetWindow.location.hash')");
+ shouldBeTrue("accessThrowsException('targetWindow.location.host')");
+ shouldBeTrue("accessThrowsException('targetWindow.location.hostname')");
+ shouldBeTrue("accessThrowsException('targetWindow.location.pathname')");
+ shouldBeTrue("accessThrowsException('targetWindow.location.port')");
+ shouldBeTrue("accessThrowsException('targetWindow.location.protocol')");
+ shouldBeTrue("accessThrowsException('targetWindow.location.search')");
+ shouldBeTrue("accessThrowsException('targetWindow.location.existingCustomProperty')");
+ shouldBeTrue("accessThrowsException('targetWindow.location[1]')");
shouldBeTrue("canGet('targetWindow.location.assign')");
shouldBeTrue("canGet('targetWindow.location.reload')");
shouldBeTrue("canGet('targetWindow.location.replace')");
- shouldBeFalse("canGet('targetWindow.location.existingCustomProperty')");
}
</script>
</head>

Powered by Google App Engine
This is Rietveld 408576698