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

Unified Diff: LayoutTests/http/tests/security/xss-DENIED-xsl-document-securityOrigin.xml

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/xss-DENIED-xsl-document-securityOrigin.xml
diff --git a/LayoutTests/http/tests/security/xss-DENIED-xsl-document-securityOrigin.xml b/LayoutTests/http/tests/security/xss-DENIED-xsl-document-securityOrigin.xml
index bb2ec8ff99394da1ba31fd2c022e48718d09e609..456f6c6f4f26d6b554bb26e7e981d909f32d30da 100644
--- a/LayoutTests/http/tests/security/xss-DENIED-xsl-document-securityOrigin.xml
+++ b/LayoutTests/http/tests/security/xss-DENIED-xsl-document-securityOrigin.xml
@@ -26,9 +26,13 @@ window.onload = function()
location = "javascript:(\"\x3C?xml-stylesheet type='text/xsl' href='" + url + "'?\x3E\x3Croot/\x3E\")";
} else {
victim = opener;
- open("javascript:void(0)", "_self");
- if (victim.eval)
- victim.eval("alert(document.body.innerHTML)");
+ open("javascript:void(0)", "_self");
+ try {
+ if (victim.eval)
+ victim.eval("alert(document.body.innerHTML)");
+ } catch (e) {
+ console.log("PASS: Caught exception while trying to access victim's properties.");
+ }
if (window.testRunner)
testRunner.notifyDone();

Powered by Google App Engine
This is Rietveld 408576698