Moves the tests for gr-annotation functions into their own test file and fixes a subtle bug regarding `splitTextNode`'s Unicode branch. In the DOM implementation of `node.splitText`, `node` is kept in the DOM and its `textContent` is modified, whereas the Unicode path of `splitTextNode` would replace it with an entirely new Text node. This led to the function behaving differently when the Node contained or did not contain astral code-points. With this change, `splitTextNode` more-closely behaves like `splitText` and this behavior is captured in a new unit-test. Change-Id: I70460694040ba9a3c49937aaafc9db261ca3be3d
6.4 KiB
6.4 KiB