|
26 | 26 |
|
27 | 27 | it('should create a link when pressing SPACE', function() { |
28 | 28 | testLink.call(this, { |
29 | | - expected: '<p>link <a href="www.liferay.com">www.liferay.com</a></p>', |
| 29 | + expected: '<p>link <a href="http://www.liferay.com">www.liferay.com</a></p>', |
30 | 30 | html: '<p>link www.liferay.com { }</p>', |
31 | 31 | keyCode: KEY_SPACE |
32 | 32 | }); |
33 | 33 |
|
34 | 34 | testLink.call(this, { |
35 | | - expected: '<p>link <a href="www.liferay.com">www.liferay.com</a> text</p>', |
| 35 | + expected: '<p>link <a href="http://www.liferay.com">www.liferay.com</a> text</p>', |
36 | 36 | html: '<p>link www.liferay.com { }text</p>', |
37 | 37 | keyCode: KEY_SPACE |
38 | 38 | }); |
39 | 39 | }); |
40 | 40 |
|
41 | 41 | it('should create a link when pressing COMMA', function() { |
42 | 42 | testLink.call(this, { |
43 | | - expected: '<p>link <a href="www.liferay.com">www.liferay.com</a></p>', |
| 43 | + expected: '<p>link <a href="http://www.liferay.com">www.liferay.com</a></p>', |
44 | 44 | html: '<p>link www.liferay.com { }</p>', |
45 | 45 | keyCode: KEY_COMMA |
46 | 46 | }); |
47 | 47 |
|
48 | 48 | testLink.call(this, { |
49 | | - expected: '<p>link <a href="www.liferay.com">www.liferay.com</a> text</p>', |
| 49 | + expected: '<p>link <a href="http://www.liferay.com">www.liferay.com</a> text</p>', |
50 | 50 | html: '<p>link www.liferay.com { }text</p>', |
51 | 51 | keyCode: KEY_COMMA |
52 | 52 | }); |
53 | 53 | }); |
54 | 54 |
|
55 | 55 | it('should create a link when pressing SEMICOLON', function() { |
56 | 56 | testLink.call(this, { |
57 | | - expected: '<p>link <a href="www.liferay.com">www.liferay.com</a></p>', |
| 57 | + expected: '<p>link <a href="http://www.liferay.com">www.liferay.com</a></p>', |
58 | 58 | html: '<p>link www.liferay.com { }</p>', |
59 | 59 | keyCode: KEY_SEMICOLON |
60 | 60 | }); |
61 | 61 |
|
62 | 62 | testLink.call(this, { |
63 | | - expected: '<p>link <a href="www.liferay.com">www.liferay.com</a> text</p>', |
| 63 | + expected: '<p>link <a href="http://www.liferay.com">www.liferay.com</a> text</p>', |
64 | 64 | html: '<p>link www.liferay.com { }text</p>', |
65 | 65 | keyCode: KEY_SEMICOLON |
66 | 66 | }); |
|
69 | 69 | it('should create a link when pressing ENTER', function() { |
70 | 70 | // FIXME: Is there a way to force CKEDITOR to generate consistent markup in case of pressing ENTER? |
71 | 71 | // Bender does not fix the generated markup neither. |
72 | | - var expected = '<p>link <a href="www.liferay.com">www.liferay.com</a></p><p>text</p>'; |
| 72 | + var expected = '<p>link <a href="http://www.liferay.com">www.liferay.com</a></p><p>text</p>'; |
73 | 73 |
|
74 | 74 | if (CKEDITOR.env.ie && CKEDITOR.env.version < 11) { |
75 | | - expected = '<p>link <a href="www.liferay.com">www.liferay.com</a><br /> </p><p>text</p>'; |
| 75 | + expected = '<p>link <a href="http://www.liferay.com">www.liferay.com</a><br /> </p><p>text</p>'; |
76 | 76 | } |
77 | 77 |
|
78 | 78 | testLink.call(this, { |
|
128 | 128 |
|
129 | 129 | it('should not remove a link that has not just been created', function() { |
130 | 130 | testLink.call(this, { |
131 | | - expected: '<p>link <a href="www.liferay.com">www.liferay.com</a></p>', |
132 | | - html: '<p>link <a href="www.liferay.com">www.liferay.com</a> { }</p>', |
| 131 | + expected: '<p>link <a href="http://www.liferay.com">www.liferay.com</a></p>', |
| 132 | + html: '<p>link <a href="http://www.liferay.com">www.liferay.com</a> { }</p>', |
133 | 133 | keyCode: KEY_BACK |
134 | 134 | }); |
135 | 135 | }); |
136 | 136 |
|
137 | 137 | it('should convert only valid urls as links', function() { |
138 | 138 | testLink.call(this, { |
139 | | - expected: '<p>link <a href="www.liferay.org">www.liferay.org</a></p>', |
| 139 | + expected: '<p>link <a href="http://www.liferay.org">www.liferay.org</a></p>', |
140 | 140 | html: '<p>link www.liferay.org { }</p>', |
141 | 141 | keyCode: KEY_SPACE |
142 | 142 | }); |
|
0 commit comments