Tests: Written one which checks whether iterator don't go beyond the sandbox.
Preventing iterator against getting out of editor DOM.
(cherry picked from commit 900849b)