Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / traversal / tree-walker-006.html
blob2ba6c79b03d954d5989e45b0f1e74e74c9a73cb6
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.createTreeWalker(xmlDoc, NodeFilter.SHOW_ELEMENT, testNodeFiter, false);
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>