@@ -0,0 +1,1888 @@
+/*%0A * See the NOTICE file distributed with this work for additional%0A * information regarding copyright ownership.%0A *%0A * This is free software; you can redistribute it and/or modify it%0A * under the terms of the GNU Lesser General Public License as%0A * published by the Free Software Foundation; either version 2.1 of%0A * the License, or (at your option) any later version.%0A *%0A * This software is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU%0A * Lesser General Public License for more details.%0A *%0A * You should have received a copy of the GNU Lesser General Public%0A * License along with this software; if not, write to the Free%0A * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA%0A * 02110-1301 USA, or see the FSF site: http://www.fsf.org.%0A */%0Apackage com.xpn.xwiki.wysiwyg.client.dom.internal.ie;%0A%0Aimport com.xpn.xwiki.wysiwyg.client.dom.JavaScriptObject;%0A%0A/**%0A * A mock native selection to be used in unit tests. It holds a reference to a given native range which is always%0A * returned.%0A * %0A * @version $Id$%0A */%0Apublic final class MockNativeSelection extends JavaScriptObject%0A%7B%0A    /**%0A     * Default constructor. Needs to be protected because all instances are created from JavaScript.%0A     */%0A    protected MockNativeSelection()%0A    %7B%0A    %7D%0A%0A    /**%0A     * @param nativeRange a reference to the native range which will always be returned by the new mock native selection%0A     * @return a new mock native selection object casted to %7B@link NativeSelection%7D%0A     */%0A    public static native NativeSelection newInstance(NativeRange nativeRange)%0A    /*-%7B%0A        return %7B%0A            ownerDocument : nativeRange.ownerDocument,%0A            createRange : function() %7B%0A                return nativeRange;%0A            %7D%0A        %7D;%0A    %7D-*/;%0A%7D%0A

Use the same Range implementation for all browsers