Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / xpath / detached-subtree-invalidate-iterator.html
bloba3d9559889ef8a734911085c65415923d8b7b35d
1 <html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 <script src="xpath-test-pre.js"></script>
5 </head>
6 <body>
7 <p>Test that iterators are invalidated even if the original context is detached.</p>
8 <div id="console"></div>
9 <script>
10 var doc = document.implementation.createDocument(null, "doc", null);
11 var root = doc.createElement("div");
12 root.appendChild(doc.createElement("span"));
13 root.appendChild(doc.createElement("p"));
15 var result = doc.evaluate(".//*", root, null, XPathResult.ORDERED_NODE_ITERATOR_TYPE, null);
16 shouldBe("result.invalidIteratorState", "false");
17 shouldBe("result.iterateNext().tagName", "'span'");
19 debug("Modifying the document...");
20 doc.documentElement.setAttribute("foo", "bar");
22 shouldBe("result.invalidIteratorState", "true");
23 shouldThrow("result.iterateNext()");
25 </script>
26 </body>
27 </html>