michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: */ michael@0: michael@0: function run_test() michael@0: { michael@0: var domParser = Components.classes["@mozilla.org/xmlextras/domparser;1"] michael@0: .createInstance(Components.interfaces.nsIDOMParser); michael@0: var aDom = domParser.parseFromString("", michael@0: "application/xml"); michael@0: var feedList = aDom.getElementsByTagName("feed"); michael@0: do_check_neq(feedList, null); michael@0: do_check_eq(feedList.length, 1); michael@0: do_check_neq(feedList[0], null); michael@0: do_check_eq(feedList[0].tagName, "feed"); michael@0: var entry = feedList[0].getElementsByTagName("entry"); michael@0: do_check_neq(entry, null); michael@0: }