From 234ba415b644ae567773a78d0b19acbf76d439b9 Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Wed, 21 Nov 2012 13:20:05 -0800 Subject: [PATCH] Bug 808608 - Remove special testing for Location in test_bug505915. r=me Removing test coverage isn't great. But the only reason this test is doing all this funny stuff with Location is that it thinks that it's always wrapped in an Xray wrapper and that we always do a dynamic security check, which is no longer true. Moreover, it checks for very specific error messages, which are kind of in flux right now as I'm fixing up GWNOJO. The calls are never going to actually succeed (since location isn't a Node), so it's not really clear how to fix up this test to do something uniquely useful in a readable way. I've added enough Location test coverage recently that I'm comfortable removing this part. --- .../tests/mochitest/test_bug505915.html | 42 ------------------- 1 file changed, 42 deletions(-) diff --git a/js/xpconnect/tests/mochitest/test_bug505915.html b/js/xpconnect/tests/mochitest/test_bug505915.html index c0e8b753f6c4..f0bd46966e96 100644 --- a/js/xpconnect/tests/mochitest/test_bug505915.html +++ b/js/xpconnect/tests/mochitest/test_bug505915.html @@ -38,48 +38,6 @@ function go() { "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/xpconnect/tests/mochitest/file_bug505915.html"; - - ifr.contentWindow.location = "http://mochi.test:8888/" + path; - yield; - try { - document.documentElement.appendChild(ifr.contentWindow.location); - ok(false, "weird behavior"); - } catch (e) { - ok(!/NS_ERROR_XPC_SECURITY_MANAGER_VETO/.test(e), - "didn't throw a security exception"); - } - oldLocation = ifr.contentWindow.location; - ifr.contentWindow.location = "http://example.org/" + path; - yield; - try { - document.documentElement.appendChild(oldLocation); - 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"); - } - try { - document.documentElement.appendChild(ifr.contentWindow.location); - 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"); - } - oldLocation = ifr.contentWindow.location; - ifr.contentWindow.location = "http://mochi.test:8888/" + path; - yield; - try { - document.documentElement.appendChild(oldLocation); - ok(false, "weird behavior"); - } catch (e) { - ok(!/NS_ERROR_XPC_SECURITY_MANAGER_VETO/.test(e), - "didn't throw a security exception"); - } - SimpleTest.finish(); yield; }