Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Range / script-tests / 31684.js
blob6b3e1a92c53357eb576efc9ccd03b771631d064b
1 description(
2 "This test checks an orphan text node cannot be surrounded by the range. (bug31684)"
3 );
5 var range = document.createRange();
6 var text = document.createTextNode('hello');
7 var element = document.createElement("div");
8 range.selectNodeContents(text);
10 shouldThrow("range.surroundContents(element)", '"HierarchyRequestError: Failed to execute \'surroundContents\' on \'Range\': The container node is a detached character data node; no parent node is available for insertion."');