Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / traversal / script-tests / exception-forwarding.js
blob9a7013921a0db7e14fa2742c45043ac40be20294
1 description("Test of exception forwarding for NodeIterator and TreeWalker, derived from an early version of Acid3");
3 var iteration = 0;
4 function test(node)
6 iteration += 1;
7 switch (iteration) {
8 case 1: case 3: case 4: case 6: case 7: case 8: case 9: case 12: throw "Roses";
9 case 2: case 5: case 10: case 11: return true;
10 default: throw 0;
14 var i = document.createNodeIterator(document.documentElement, 0xFFFFFFFF, test, true);
15 shouldThrow("i.nextNode()"); // 1
16 shouldBe("i.nextNode()", "document.documentElement"); // 2
17 shouldThrow("i.previousNode()"); // 3
18 var w = document.createTreeWalker(document.documentElement, 0xFFFFFFFF, test, true);
19 shouldThrow("w.nextNode()"); // 4
20 shouldBe("w.nextNode()", "document.documentElement.firstChild"); // 5
21 shouldThrow("w.previousNode()"); // 6
22 shouldThrow("w.firstChild()"); // 7
23 shouldThrow("w.lastChild()"); // 8
24 shouldThrow("w.nextSibling()"); // 9
25 shouldBe("w.previousSibling()", "null");
26 shouldBe("w.nextSibling()", "document.body.previousSibling"); // 10
27 shouldBe("w.previousSibling()", "document.head"); // 11
28 shouldBe("iteration", "11");
30 var successfullyParsed = true;