           namespace === undefined || namespace === "" ? null
                                                                    : namespace)
        }
      });
      testObj.done();
    });
  }, "createElementNS test in " + desc + ": " + t.map(format_value))
}

tests.forEach(function(t, i) {
  runTest(t, i, "HTML document")
  runTest(t, i, "XML document")
  runTest(t, i, "XHTML document")
})


test(function() {
  var HTMLNS = "http://www.w3.org/1999/xhtml";
  var element = document.createElementNS(HTMLNS