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: NodePathTest.ts
Close
import { LegacyUnit } from '@ephox/mcagar'; import { Pipeline } from '@ephox/agar'; import NodePath from 'tinymce/core/dom/NodePath'; import ViewBlock from '../../module/test/ViewBlock'; import { UnitTest } from '@ephox/bedrock'; UnitTest.asynctest('browser.tinymce.core.dom.NodePathTest', function () { const success = arguments[arguments.length - 2]; const failure = arguments[arguments.length - 1]; const suite = LegacyUnit.createSuite(); const viewBlock = ViewBlock(); const getRoot = function () { return viewBlock.get(); }; const setupHtml = function (html) { viewBlock.update(html); }; suite.test('create', function () { setupHtml('<p>a<b>12<input></b></p>'); LegacyUnit.deepEqual(NodePath.create(getRoot(), getRoot().firstChild), [0]); LegacyUnit.deepEqual(NodePath.create(getRoot(), getRoot().firstChild.firstChild), [0, 0]); LegacyUnit.deepEqual(NodePath.create(getRoot(), getRoot().firstChild.lastChild.lastChild), [1, 1, 0]); }); suite.test('resolve', function () { setupHtml('<p>a<b>12<input></b></p>'); LegacyUnit.equalDom(NodePath.resolve(getRoot(), NodePath.create(getRoot(), getRoot().firstChild)), getRoot().firstChild); LegacyUnit.equalDom( NodePath.resolve(getRoot(), NodePath.create(getRoot(), getRoot().firstChild.firstChild)), getRoot().firstChild.firstChild ); LegacyUnit.equalDom( NodePath.resolve(getRoot(), NodePath.create(getRoot(), getRoot().firstChild.lastChild.lastChild)), getRoot().firstChild.lastChild.lastChild ); }); viewBlock.attach(); Pipeline.async({}, suite.toSteps({}), function () { viewBlock.detach(); success(); }, failure); });