michael@0: /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 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: function run_test() michael@0: { michael@0: test_treeWalker_currentNode(); michael@0: } michael@0: michael@0: // TEST CODE michael@0: michael@0: function test_treeWalker_currentNode() michael@0: { michael@0: var XHTMLDocString = ''; michael@0: XHTMLDocString += '
input'; michael@0: michael@0: var doc = ParseXML(XHTMLDocString); michael@0: michael@0: var body = doc.getElementsByTagName("body")[0]; michael@0: var filter = I.nsIDOMNodeFilter.SHOW_ELEMENT | I.nsIDOMNodeFilter.SHOW_TEXT; michael@0: var walker = doc.createTreeWalker(body, filter, null); michael@0: walker.currentNode = body.firstChild; michael@0: walker.nextNode(); michael@0: } michael@0: