VisibleSelection SurroundingTextTest::select(int start, int end) { Element* element = document().getElementById("selection"); VisibleSelection selection; selection.setBase(Position(toText(element->firstChild()), start)); selection.setExtent(Position(toText(element->firstChild()), end)); return selection; }