- added a test for the names of range exceptions, which were wrong
[WebKit-https.git] / LayoutTests / fast / dom / Range / resources / range-exceptions.js
1 description(
2 "This test checks a few DOM range exceptions."
3 );
4
5 // Test to be sure the name BAD_BOUNDARYPOINTS_ERR dumps properly.
6 var node = document.createElement("DIV");
7 node.innerHTML = "<BAR>AB<MOO>C</MOO>DE</BAR>";
8 shouldBe("node.innerHTML", "'<BAR>AB<MOO>C</MOO>DE</BAR>'");
9 var range = document.createRange();
10 range.setStart(node.firstChild, 1);
11 range.setEnd(node.firstChild, 2);
12 var foo = document.createElement("FOO");
13 shouldBe("foo.outerHTML", "'<FOO></FOO>'");
14 shouldThrow("range.surroundContents(foo)");
15
16 var successfullyParsed = true;