removedNode = child.removeChild(parent); fail("throw_DOMException"); removedNode = child.removeChild(entRefChild); } catch (DOMException ex) { success = (ex.code == DOMException.NO_MODIFICATION_ALLOWED_ERR);
removedNode = child.removeChild(parent); fail("throw_DOMException"); removedNode = child.removeChild(entRefChild); } catch (DOMException ex) { success = (ex.code == DOMException.NO_MODIFICATION_ALLOWED_ERR);
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; Text txt; EntityReference eRef; Node removed; doc = (Document) load("hc_staff", true); eRef = doc.createEntityReference("alpha"); txt = (Text) eRef.getFirstChild(); assertNotNull("txtNotNull", txt); { boolean success = false; try { removed = eRef.removeChild(txt); } catch (DOMException ex) { success = (ex.code == DOMException.NO_MODIFICATION_ALLOWED_ERR); } assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR", success); } } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; EntityReference eRef; Element elem; String entName; Node removed; doc = (Document) load("hc_staff", true); eRef = doc.createEntityReference("ent4"); elem = (Element) eRef.getFirstChild(); assertNotNull("elemNotNull", elem); { boolean success = false; try { removed = eRef.removeChild(elem); } catch (DOMException ex) { success = (ex.code == DOMException.NO_MODIFICATION_ALLOWED_ERR); } assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR", success); } } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; Node removed; EntityReference eRef; ProcessingInstruction pi; String entName; doc = (Document) load("hc_staff", true); eRef = doc.createEntityReference("ent4"); pi = (ProcessingInstruction) eRef.getLastChild(); assertNotNull("piNotNull", pi); { boolean success = false; try { removed = eRef.removeChild(pi); } catch (DOMException ex) { success = (ex.code == DOMException.NO_MODIFICATION_ALLOWED_ERR); } assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR", success); } } /**
removedChild = eRef.removeChild(docFrag);