OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
_backup
/
tinymce
/
tinymce
/
src
/
core
/
test
/
ts
/
browser
/
dom
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/20/2020 06:14:55 AM
rwxr-xr-x
📄
ContentCssCorsTest.ts
1.26 KB
02/20/2020 06:13:25 AM
rw-r--r--
📄
ControlSelectionTest.ts
1.8 KB
02/20/2020 06:13:25 AM
rw-r--r--
📄
DimensionsTest.ts
1.59 KB
02/20/2020 06:13:26 AM
rw-r--r--
📄
DomUtilsTest.ts
28.64 KB
02/20/2020 06:13:26 AM
rw-r--r--
📄
ElementTypeTest.ts
4.84 KB
02/20/2020 06:13:27 AM
rw-r--r--
📄
EmptyTest.ts
2 KB
02/20/2020 06:13:27 AM
rw-r--r--
📄
EventUtilsTest.ts
13.79 KB
02/20/2020 06:13:28 AM
rw-r--r--
📄
NodePathTest.ts
1.65 KB
02/20/2020 06:13:28 AM
rw-r--r--
📄
NodeTypeTest.ts
6.15 KB
02/20/2020 06:13:29 AM
rw-r--r--
📄
PaddingBrTest.ts
3.99 KB
02/20/2020 06:13:29 AM
rw-r--r--
📄
ParentsTest.ts
4.24 KB
02/20/2020 06:13:30 AM
rw-r--r--
📄
ScrollIntoViewTest.ts
8.76 KB
02/20/2020 06:13:30 AM
rw-r--r--
📄
SelectionEventsTest.ts
4.32 KB
02/20/2020 06:13:31 AM
rw-r--r--
📄
SelectionQuirksTest.ts
3.6 KB
02/20/2020 06:13:31 AM
rw-r--r--
📄
SelectionTest.ts
52.46 KB
02/20/2020 06:13:33 AM
rw-r--r--
📄
SerializerEventsTest.ts
2.24 KB
02/20/2020 06:13:33 AM
rw-r--r--
📄
SerializerTest.ts
36.74 KB
02/20/2020 06:13:34 AM
rw-r--r--
📄
TreeWalkerTest.ts
2.76 KB
02/20/2020 06:13:34 AM
rw-r--r--
📄
TrimHtmlTest.ts
1.32 KB
02/20/2020 06:13:35 AM
rw-r--r--
📄
TrimNodeTest.ts
1.68 KB
02/20/2020 06:13:35 AM
rw-r--r--
Editing: EmptyTest.ts
Close
import { Assertions, GeneralSteps, Logger, Pipeline, Step } from '@ephox/agar'; import { Element } from '@ephox/sugar'; import Empty from 'tinymce/core/dom/Empty'; import { UnitTest } from '@ephox/bedrock'; UnitTest.asynctest('browser.tinymce.core.dom.EmptyTest', function () { const success = arguments[arguments.length - 2]; const failure = arguments[arguments.length - 1]; const sTestEmpty = function (html, expected) { return Step.sync(function () { const elm = Element.fromHtml(html); const expectedLabel = expected ? 'empty' : 'not empty'; Assertions.assertEq(html + ' should be treated as ' + expectedLabel, expected, Empty.isEmpty(elm)); }); }; Pipeline.async({}, [ Logger.t('Empty elements', GeneralSteps.sequence([ sTestEmpty(' ', true), sTestEmpty('\t', true), sTestEmpty('\r', true), sTestEmpty('\n', true), sTestEmpty(' \t\r\n ', true), sTestEmpty('<!-- x -->', true), sTestEmpty('<p></p>', true), sTestEmpty('<b></b>', true), sTestEmpty('<p><b></b></p>', true), sTestEmpty('<p><br></p>', true), sTestEmpty('<p><i><b></b></i><b><i></i></b></p>', true), sTestEmpty('<span></span>', true), sTestEmpty('<p><i><b></b></i><b><i data-mce-bogus="all"><img src="#"></i></b></p>', true), sTestEmpty('<p><br data-mce-bogus="1"><br></p>', true) ])), Logger.t('Non empty elements', GeneralSteps.sequence([ sTestEmpty('<br>', false), sTestEmpty('<img src="#">', false), sTestEmpty('<input>', false), sTestEmpty('<textarea></textarea>', false), sTestEmpty('<hr>', false), sTestEmpty('a', false), sTestEmpty('abc', false), sTestEmpty('<p>abc</p>', false), sTestEmpty('<p><br><br></p>', false), sTestEmpty('<p><i><b></b></i><b><i><img src="#"></i></b></p>', false), sTestEmpty('<span data-mce-bookmark="x"></span>', false), sTestEmpty('<span contenteditable="false"></span>', false) ])) ], function () { success(); }, failure); });