Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / traversal / node-iterator-009.html
blob28e821fe3c66a421bc08ac294e13efa608360834
1 <html>
2 <head>
3 <title>Traversal Test</title>
4 </head>
5 <body>
7 <h2>XML doc elements:</h2>
8 <div style="font-family: Courier; font-size: 14;">
9 <script type="text/javascript" charset="utf-8">
11 if (window.testRunner)
12 testRunner.dumpAsText();
14 var dataURL = 'resources/node-iterator-009-data.xml';
15 function fetchXML()
17 var request = new XMLHttpRequest();
18 request.open("GET", dataURL, false /* sync */);
19 request.overrideMimeType("application/xml");
20 request.send();
22 if (request.readyState == 4) {
23 // only if "OK"
24 if (request.status == 200 || (request.status == 0 && request.responseText.length > 0))
25 walkXML(request.responseXML);
29 function testNodeFiter(n)
31 if (n.tagName == 'studio') return NodeFilter.FILTER_SKIP;
32 return NodeFilter.FILTER_ACCEPT;
35 function walkXML(xmlDoc)
37 var iter = document.createNodeIterator(xmlDoc, NodeFilter.SHOW_ELEMENT, testNodeFiter);
38 var curNode;
39 while (curNode = iter.nextNode()) {
40 document.write('<h3>' + curNode.tagName + '</h3><p>' + curNode.textContent + '</p>');
43 fetchXML();
45 </script>
46 </div>
47 </body>
48 </html>