OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
_backup
/
tinymce
/
tinymce
/
src
/
core
/
test
/
ts
/
browser
/
init
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/20/2020 06:14:55 AM
rwxr-xr-x
📄
ContentCssTest.ts
2.67 KB
02/20/2020 06:14:11 AM
rw-r--r--
📄
ContentStylePositionTest.ts
1.3 KB
02/20/2020 06:14:11 AM
rw-r--r--
📄
EditorCustomThemeTest.ts
1.83 KB
02/20/2020 06:14:12 AM
rw-r--r--
📄
EditorInitializationTest.ts
8.06 KB
02/20/2020 06:14:12 AM
rw-r--r--
📄
InitEditorIconTest.ts
1.73 KB
02/20/2020 06:14:13 AM
rw-r--r--
📄
InitEditorNoThemeIframeTest.ts
1.65 KB
02/20/2020 06:14:13 AM
rw-r--r--
📄
InitEditorNoThemeInlineTest.ts
1.88 KB
02/20/2020 06:14:14 AM
rw-r--r--
📄
InitEditorOnHiddenElementTest.ts
705 bytes
02/20/2020 06:14:14 AM
rw-r--r--
📄
InitEditorPluginInitErrorTest.ts
1.69 KB
02/20/2020 06:14:15 AM
rw-r--r--
📄
InitEditorThemeFunctionIframeTest.ts
1.96 KB
02/20/2020 06:14:15 AM
rw-r--r--
📄
InitEditorThemeFunctionInlineTest.ts
2.05 KB
02/20/2020 06:14:16 AM
rw-r--r--
📄
InitIframeEditorWithCustomAttrsTest.ts
1.26 KB
02/20/2020 06:14:16 AM
rw-r--r--
Editing: ContentStylePositionTest.ts
Close
import { Assertions, Pipeline, Step } from '@ephox/agar'; import { Arr } from '@ephox/katamari'; import { TinyLoader } from '@ephox/mcagar'; import { Element, Node } from '@ephox/sugar'; import Theme from 'tinymce/themes/silver/Theme'; import { UnitTest } from '@ephox/bedrock'; UnitTest.asynctest('browser.tinymce.core.init.ContentStylePositionTest', function () { const success = arguments[arguments.length - 2]; const failure = arguments[arguments.length - 1]; Theme(); const contentStyle = '.class {color: blue;}'; TinyLoader.setup(function (editor, onSuccess, onFailure) { Pipeline.async({}, [ Step.sync(function () { const headStuff = editor.getDoc().head.querySelectorAll('link, style'); const linkIndex = Arr.findIndex(headStuff, function (elm) { return Node.name(Element.fromDom(elm)) === 'link'; }).getOrDie('could not find link elemnt'); const styleIndex = Arr.findIndex(headStuff, function (elm) { return elm.innerText === contentStyle; }).getOrDie('could not find content style tag'); Assertions.assertEq('style tag should be after link tag', linkIndex < styleIndex, true); }) ], onSuccess, onFailure); }, { content_style: contentStyle, base_url: '/project/tinymce/js/tinymce' }, success, failure); });