1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.test.wysiwyg

File EmbedTest.java

 

Code metrics

0
9
1
1
55
25
1
0.11
9
1
1

Classes

Class Line # Actions
EmbedTest 30 9 0% 1 0
1.0100%
 

Contributing tests

This file is covered by 1 test. .

Source view

1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19    */
20    package org.xwiki.test.wysiwyg;
21   
22    import org.junit.Test;
23    import org.xwiki.test.wysiwyg.framework.AbstractWysiwygTestCase;
24   
25    /**
26    * Integration tests for embedded object support inside the WYSIWYG editor.
27    *
28    * @version $Id: 608155ec5b6092528683dc6551a47c4c97ae6d4a $
29    */
 
30    public class EmbedTest extends AbstractWysiwygTestCase
31    {
32    /**
33    * @see XWIKI-3975: Issue when inserting a video using the {{html}} macro when AdBlockPlus is enabled.
34    */
 
35  1 toggle @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    // The tool bar is not updated right away. We have to wait for the undo push button to become enabled.
50  1 waitForPushButton(TOOLBAR_BUTTON_UNDO_TITLE, true);
51  1 clickUndoButton(2);
52  1 switchToSource();
53  1 assertSourceText("1" + sourceText);
54    }
55    }