Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / traversal / moz-bug559526.html
bloba8b394c893e6028c6fe10ff46164254fa7434922
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 Test adapted from http://mxr.mozilla.org/mozilla-central/source/content/base/test/test_bug559526.html
6 https://bugzilla.mozilla.org/show_bug.cgi?id=559526
7 -->
8 <head>
9 <title>Test for Bug 559526</title>
10 </head>
11 <body>
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=559526">Mozilla Bug 559526</a>
13 <p id="display"></p>
14 <div id="content" style="display: none">
16 </div>
17 <pre id="test">
18 <div id="nodes" style="display:none">
19 <div id="child1"></div>
20 <div id="child2"></div>
22 <div id="child3"></div>
23 <div id="child4"></div>
24 <div id="child5"></div>
25 <div id="child6"></div>
26 <div id="child7"></div>
27 <div id="child8"></div>
28 </div>
29 <script type="application/javascript">
31 if (window.testRunner)
32 testRunner.dumpAsText();
34 /** Test for Bug 559526 **/
36 var it;
37 var recurse = false;
38 var testCount = 0;
39 function filter(node) {
40 if (node.id == "child3" && ! recurse) {
41 recurse = true;
42 var ex = null;
43 try {
44 var foo = it.nextNode();
45 } catch(e) {
46 ex = e;
48 ++testCount;
49 console.log("Should have thrown an exception: " + ex);
50 recurse = false;
52 return NodeFilter.FILTER_ACCEPT;
55 (function testNodeIterator() {
57 it = document.createNodeIterator(
58 document.getElementById("nodes"),
59 NodeFilter.SHOW_ELEMENT,
60 filter,
61 false
63 while (it.nextNode());
64 })();
66 (function testTreeWalker() {
67 it = document.createTreeWalker(
68 document.getElementById("nodes"),
69 NodeFilter.SHOW_ELEMENT,
70 filter,
71 false
73 while(it.nextNode());
75 it = document.createTreeWalker(
76 document.getElementById("nodes"),
77 NodeFilter.SHOW_ELEMENT,
78 filter,
79 false
81 it.firstChild();
82 while(it.nextSibling());
84 it = document.createTreeWalker(
85 document.getElementById("nodes"),
86 NodeFilter.SHOW_ELEMENT,
87 filter,
88 false
90 it.lastChild();
91 while(it.previousSibling());
92 })();
94 console.log("Should have tests 4 filter calls: " + testCount);
95 </script>
96 </pre>
97 </body>
98 </html>