1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.test.wysiwyg; |
21 |
|
|
22 |
|
import org.junit.Test; |
23 |
|
import org.xwiki.test.wysiwyg.framework.AbstractWysiwygTestCase; |
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
@version |
29 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 1 |
Complexity Density: 0.11 |
|
30 |
|
public class EmbedTest extends AbstractWysiwygTestCase |
31 |
|
{ |
32 |
|
|
33 |
|
@see |
34 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (9) |
Complexity: 1 |
Complexity Density: 0.11 |
1PASS
|
|
35 |
1 |
@Test... |
36 |
|
public void testEmbedFlashUsingHTMLMacro() |
37 |
|
{ |
38 |
1 |
switchToSource(); |
39 |
1 |
String sourceText = |
40 |
|
"before\n\n{{html}}\n<div><object width=\"480\" height=\"381\"><param name=\"movie\" " |
41 |
|
+ "value=\"http://www.dailymotion.com/swf/x5wi6m_xwiki-repository-against-codeswarm_tech&related=1\"></param>" |
42 |
|
+ "<param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowScriptAccess\" value=\"always\"></param>" |
43 |
|
+ "<embed src=\"http://www.dailymotion.com/swf/x5wi6m_xwiki-repository-against-codeswarm_tech&related=1\" " |
44 |
|
+ "type=\"application/x-shockwave-flash\" width=\"480\" height=\"381\" allowFullScreen=\"true\" " |
45 |
|
+ "allowScriptAccess=\"always\"></embed></object></div>\n{{/html}}\n\nafter"; |
46 |
1 |
setSourceText(sourceText); |
47 |
1 |
switchToWysiwyg(); |
48 |
1 |
typeText("1 2"); |
49 |
|
|
50 |
1 |
waitForPushButton(TOOLBAR_BUTTON_UNDO_TITLE, true); |
51 |
1 |
clickUndoButton(2); |
52 |
1 |
switchToSource(); |
53 |
1 |
assertSourceText("1" + sourceText); |
54 |
|
} |
55 |
|
} |