Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(828)

Side by Side Diff: LayoutTests/fast/xpath/detached-subtree-invalidate-iterator.html

Issue 58533003: Move fast/js/resources files to resources. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/fast/xpath/attr-namespace.html ('k') | LayoutTests/fast/xpath/document-order.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../js/resources/js-test-pre.js"></script> 3 <script src="../../resources/js-test.js"></script>
4 <script src="xpath-test-pre.js"></script> 4 <script src="xpath-test-pre.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <p>Test that iterators are invalidated even if the original context is detached. </p> 7 <p>Test that iterators are invalidated even if the original context is detached. </p>
8 <div id="console"></div> 8 <div id="console"></div>
9 <script> 9 <script>
10 var doc = document.implementation.createDocument(null, "doc", null); 10 var doc = document.implementation.createDocument(null, "doc", null);
11 var root = doc.createElement("div"); 11 var root = doc.createElement("div");
12 root.appendChild(doc.createElement("span")); 12 root.appendChild(doc.createElement("span"));
13 root.appendChild(doc.createElement("p")); 13 root.appendChild(doc.createElement("p"));
14 14
15 var result = doc.evaluate(".//*", root, null, XPathResult.ORDERED_NODE_ITERATOR_ TYPE, null); 15 var result = doc.evaluate(".//*", root, null, XPathResult.ORDERED_NODE_ITERATOR_ TYPE, null);
16 shouldBe("result.invalidIteratorState", "false"); 16 shouldBe("result.invalidIteratorState", "false");
17 shouldBe("result.iterateNext().tagName", "'span'"); 17 shouldBe("result.iterateNext().tagName", "'span'");
18 18
19 debug("Modifying the document..."); 19 debug("Modifying the document...");
20 doc.documentElement.setAttribute("foo", "bar"); 20 doc.documentElement.setAttribute("foo", "bar");
21 21
22 shouldBe("result.invalidIteratorState", "true"); 22 shouldBe("result.invalidIteratorState", "true");
23 shouldThrow("result.iterateNext()"); 23 shouldThrow("result.iterateNext()");
24 24
25 </script> 25 </script>
26 </body> 26 </body>
27 </html> 27 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/xpath/attr-namespace.html ('k') | LayoutTests/fast/xpath/document-order.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698