Ticket #3010: test-selectionrange-api.html

File test-selectionrange-api.html, 1.2 KB (added by Garry Yao, 15 years ago)

Proposed selection test sample.

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4        <title>Selection Range Test1</title>
5        <link rel="stylesheet" type="text/css" href="../../test.css" />
6        <script type="text/javascript" src="../../../../ckeditor_source.js"></script>
7        <script type="text/javascript" src="../../test.js"></script>
8        <script type="text/javascript">
9        //<![CDATA[
10       
11CKEDITOR.test.addTestCase( ( function()
12{
13    // Local references.
14    var assert = CKEDITOR.test.assert;
15    return      {
16       
17        test_foo : function()
18        {
19                CKEDITOR.test.setEditorDataAs('original1');
20                        editor.execCommand( 'bold' );
21                        CKEDITOR.test.expectEditorDataSameAs('expected1');
22        },
23
24        name :  'test case 1'
25    };
26} )() );
27       
28        //]]>
29        </script>
30</head>
31<body>
32       
33        <textarea id="original1"><p>
34        This is some <strong>sample^ text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>
35
36        </textarea>
37       
38        <textarea id="expected1"><p>
39        This is some sample text. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>
40
41        </textarea>
42       
43</body>
44</html>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy