rem:  */ 
context: function test_getElementsByTagNameNS(){  var doc = ParseFile("nodelist_data_1.xml");  var root = doc.documentElement;  // Check that getElementsByTagNameNS returns a nodelist.  do_check_true(doc.getElementsByTagNameNS("*", "*") instanceof nsIDOMNodeList);  do_check_true(root.getElementsByTagNameNS("*", "*") instanceof nsIDOMNodeList);  // Check that passing "" and null for the namespace URI gives the same result  var list1 = doc.getElementsByTagNameNS("", "test");  var list2 = doc.getElementsByTagNameNS(null, "test");  do_check_eq(list1.length, list2.length);  for (var i = 0; i < list1.length; ++i) {    do_check_eq(list1.item(i), list2.item(i));  }    // Check that getElementsByTagNameNS excludes the element it's called on.  do_check_eq(doc.getElementsByTagNameNS("*", "*").length,              root.getElementsByTagNameNS("*", "*").length + 1);  do_check_eq(doc.getElementById("test2")                 .getElementsByTagNameNS("*", "*").length,              8);  do_check_eq(doc.getElementById("test2")                 .getElementsByTagNameNS("", "test").length,              1);  /* XXXbz this test is currently failing because getElementsByTagNameNS("*",     "tagname" is actually broken.  See bug 343307.        do_check_eq(doc.getElementById("test2")                 .getElementsByTagNameNS("*", "test").length,              7);  */  // Check that the first element of getElementsByTagNameNS on the document is  // the right thing.  do_check_eq(doc.getElementsByTagNameNS("*", "*").item(0), root);  do_check_eq(doc.getElementsByTagNameNS(null, "*").item(0), root);  // Check that we get the right things in the right order       /*   XXXbz this test is currently failing because getElementsByTagNameNS("*",     "tagname" is actually broken.  See bug 343307.   var numTests = doc.getElementsByTagNameNS("*", "test").length;  do_check_eq(numTests, 14);  for (var i = 1; i <= numTests; ++i) {    do_check_true(doc.getElementById("test" + i) instanceof nsIDOMElement);    do_check_eq(doc.getElementById("test" + i),                doc.getElementsByTagName("test").item(i-1));  }  */  // Check general proper functioning of having a non-wildcard namespace.  var test2 = doc.getElementById("test2");  do_check_eq(doc.getElementsByTagNameNS("", "test").length,              3);  do_check_eq(test2.getElementsByTagNameNS("", "test").length,              1);  do_check_eq(doc.getElementsByTagNameNS("foo", "test").length,              7);  do_check_eq(test2.getElementsByTagNameNS("foo", "test").length,              4);  do_check_eq(doc.getElementsByTagNameNS("foo2", "test").length,              0);  do_check_eq(test2.getElementsByTagNameNS("foo2", "test").length,              0);  do_check_eq(doc.getElementsByTagNameNS("bar", "test").length,              4);  do_check_eq(test2.getElementsByTagNameNS("bar", "test").length,              2);  // Check that we handle tagnames containing ':' correctly  do_check_true(doc.getElementsByTagNameNS(null, "foo:test")                instanceof nsIDOMNodeList);  do_check_eq(doc.getElementsByTagNameNS(null, "foo:test").length, 0);  do_check_eq(doc.getElementsByTagNameNS("foo", "foo:test").length, 0);  do_check_eq(doc.getElementsByTagNameNS("bar", "foo:test").length, 0);  /*   XXXbz this test is currently failing because getElementsByTagNameNS("*",     "tagname" is actually broken.  See bug 343307.   do_check_eq(doc.getElementsByTagNameNS("*", "foo:test").length, 0);  */    do_check_true(doc.getElementsByTagNameNS(null, "foo2:test")                instanceof nsIDOMNodeList);  do_check_eq(doc.getElementsByTagNameNS(null, "foo2:test").length, 0);  do_check_eq(doc.getElementsByTagNameNS("foo2", "foo2:test").length, 0);  do_check_eq(doc.getElementsByTagNameNS("bar", "foo2:test").length, 0);  /*   XXXbz this test is currently failing because getElementsByTagNameNS("*",     "tagname" is actually broken.  See bug 343307.   do_check_eq(doc.getElementsByTagNameNS("*", "foo2:test").length, 0);  */    do_check_true(doc.getElementsByTagNameNS(null, "bar:test")                instanceof nsIDOMNodeList);  do_check_eq(doc.getElementsByTagNameNS(null, "bar:test").length, 0);  do_check_eq(doc.getElementsByTagNameNS("bar", "bar:test").length, 0);  /*   XXXbz this test is currently failing because getElementsByTagNameNS("*",     "tagname" is actually broken.  See bug 343307.   do_check_eq(doc.getElementsByTagNameNS("*", "bar:test").length, 0);  */}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/9fceade1613632998518a35ac74104d589ffdef8/test_nodelist.js/buggy/content/test/unit/test_nodelist.js