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

Unified Diff: LayoutTests/http/tests/security/cross-frame-access-get-custom-property-cached.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-get-custom-property-cached.html
diff --git a/LayoutTests/http/tests/security/cross-frame-access-get-custom-property-cached.html b/LayoutTests/http/tests/security/cross-frame-access-get-custom-property-cached.html
index e91c7fe6177680002ba53b80e8ccd43d4ea5ef21..f6d6c5a422e5ca9b6b540908d16ac964f920507d 100644
--- a/LayoutTests/http/tests/security/cross-frame-access-get-custom-property-cached.html
+++ b/LayoutTests/http/tests/security/cross-frame-access-get-custom-property-cached.html
@@ -30,18 +30,23 @@
testRunner.notifyDone();
}
- function getCustomProperty(o)
+ function customPropertyAccessThrowsException(o)
{
- return o.customProperty;
+ try {
+ var x = o.customProperty;
+ return false;
+ } catch (e) {
+ return true;
+ }
}
runTest = function()
{
window.targetWindow = frames[0];
- shouldBeUndefined("getCustomProperty(targetWindow)");
- shouldBeUndefined("getCustomProperty(targetWindow)");
- shouldBeUndefined("getCustomProperty(targetWindow)");
+ shouldBeTrue("customPropertyAccessThrowsException(targetWindow)");
+ shouldBeTrue("customPropertyAccessThrowsException(targetWindow)");
+ shouldBeTrue("customPropertyAccessThrowsException(targetWindow)");
}
</script>
</head>

Powered by Google App Engine
This is Rietveld 408576698