Add several tests for Selection and Fix for IE

-   Add several unit tests of Selection
-   Support Internet Explorer 8