public void UnregisterStyleSheet(string sheetURI, uint type) { nsIIOService ios = Xpcom.GetService <nsIIOService>("@mozilla.org/network/io-service;1"); ios = Xpcom.QueryInterface <nsIIOService>(ios); nsIURI ssURI = ios.NewURI(new nsAUTF8String(sheetURI), null, null); if (StyleSheetService.sheetRegistered(ssURI, type)) { StyleSheetService.unregisterSheet(ssURI, type); } }
public bool IsStyleSheetRegistered(string sheetURI, uint type) { nsIIOService ios = Xpcom.GetService <nsIIOService>("@mozilla.org/network/io-service;1"); ios = Xpcom.QueryInterface <nsIIOService>(ios); nsIURI ssURI = ios.NewURI(new nsAUTF8String(sheetURI), null, null); if (!StyleSheetService.sheetRegistered(ssURI, type)) { return(false); } return(true); }
public void NewURI_BadUri_ThrowsMalformedUriException() { string referrer = "somejunk"; Assert.Throws <COMException>(() => m_instance.NewURI(new nsAUTF8String(referrer), null, null)); }