michael@0: function run_test() { michael@0: var success = false; michael@0: try { michael@0: var newURI = ios.newURI("feed:javascript:alert('hi');", null, null); michael@0: } michael@0: catch (e) { michael@0: success = e.result == Cr.NS_ERROR_MALFORMED_URI; michael@0: } michael@0: if (!success) michael@0: do_throw("We didn't throw NS_ERROR_MALFORMED_URI creating a feed:javascript: URI"); michael@0: michael@0: success = false; michael@0: try { michael@0: newURI = ios.newURI("feed:data:text/html,hi", null, null); michael@0: } michael@0: catch (e) { michael@0: success = e.result == Cr.NS_ERROR_MALFORMED_URI; michael@0: } michael@0: if (!success) michael@0: do_throw("We didn't throw NS_ERROR_MALFORMED_URI creating a feed:data: URI"); michael@0: michael@0: success = false; michael@0: try { michael@0: newURI = ios.newURI("pcast:javascript:alert('hi');", null, null); michael@0: } michael@0: catch (e) { michael@0: success = e.result == Cr.NS_ERROR_MALFORMED_URI; michael@0: } michael@0: if (!success) michael@0: do_throw("We didn't throw NS_ERROR_MALFORMED_URI creating a pcast:javascript: URI"); michael@0: michael@0: success = false; michael@0: try { michael@0: newURI = ios.newURI("pcast:data:text/html,hi", null, null); michael@0: } michael@0: catch (e) { michael@0: success = e.result == Cr.NS_ERROR_MALFORMED_URI; michael@0: } michael@0: if (!success) michael@0: do_throw("We didn't throw NS_ERROR_MALFORMED_URI creating a pcast:data: URI"); michael@0: michael@0: }