Bug 688417: Test for Bug 505915 expects setting xhr.onreadystatechange to unwrap the object passed in. r=mrbkap
authorKyle Huey <khuey@kylehuey.com>
Thu, 29 Sep 2011 12:06:36 -0400
changeset 77813 78fb73454cac91455827a8073c9544148b0b7e53
parent 77812 60e2cfb98a5268e256bc2ebabfc6b7f9eede722f
child 77814 d2dbc7ab380e532f9c1b2a91a3a769f6166683b5
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersmrbkap
bugs688417, 505915
milestone10.0a1
Bug 688417: Test for Bug 505915 expects setting xhr.onreadystatechange to unwrap the object passed in. r=mrbkap
js/src/xpconnect/tests/mochitest/test_bug505915.html
--- a/js/src/xpconnect/tests/mochitest/test_bug505915.html
+++ b/js/src/xpconnect/tests/mochitest/test_bug505915.html
@@ -33,26 +33,16 @@ function go() {
     try {
         document.createTreeWalker(ifr.contentDocument, 0, null, false);
         ok(false, "should have thrown a security exception");
     } catch (e) {
         ok(/NS_ERROR_XPC_SECURITY_MANAGER_VETO/.test(e),
            "threw a security exception instead of an invalid child exception");
     }
 
-    var xhr = new XMLHttpRequest();
-
-    try {
-        xhr.onreadystatechange = ifr.contentWindow;
-        ok(false, "weird behavior");
-    } catch (e) {
-        ok(/NS_ERROR_XPC_SECURITY_MANAGER_VETO/.test(e),
-           "threw a security exception instead of an invalid child exception");
-    }
-
     // Location is always wrapped, so test it separately.
 
     ifr.onload = null;
     var path = "/tests/js/src/xpconnect/tests/mochitest/file_bug505915.html";
 
     ifr.contentWindow.location = "http://mochi.test:8888/" + path;
     yield;
     try {