OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
_backup
/
tinymce
/
tinymce
/
src
/
core
/
test
/
ts
/
browser
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
π
..
-
02/20/2020 06:15:06 AM
rwxr-xr-x
π
AddOnManagerTest.ts
2.71 KB
02/20/2020 05:44:53 AM
rw-r--r--
π
ClickContentEditableFalseTest.ts
3.13 KB
02/20/2020 05:44:53 AM
rw-r--r--
π
DragDropOverridesTest.ts
1.55 KB
02/20/2020 05:44:54 AM
rw-r--r--
π
EditorForcedSettingsTest.ts
904 bytes
02/20/2020 05:44:54 AM
rw-r--r--
π
EditorManagerTest.ts
7.41 KB
02/20/2020 05:44:55 AM
rw-r--r--
π
EditorRemoveTest.ts
2.58 KB
02/20/2020 05:44:56 AM
rw-r--r--
π
EditorRemovedApiTest.ts
2.98 KB
02/20/2020 05:44:55 AM
rw-r--r--
π
EditorRtlTest.ts
1.39 KB
02/20/2020 05:44:56 AM
rw-r--r--
π
EditorSettingsTest.ts
14.57 KB
02/20/2020 05:44:57 AM
rw-r--r--
π
EditorTest.ts
15.89 KB
02/20/2020 05:44:57 AM
rw-r--r--
π
EditorUploadTest.ts
11.16 KB
02/20/2020 05:44:58 AM
rw-r--r--
π
EditorViewIframeTest.ts
3.35 KB
02/20/2020 05:44:58 AM
rw-r--r--
π
EditorViewInlineTest.ts
3.25 KB
02/20/2020 05:44:59 AM
rw-r--r--
π
FontSelectTest.ts
4.79 KB
02/20/2020 05:44:59 AM
rw-r--r--
π
ForceBlocksTest.ts
4.89 KB
02/20/2020 05:45:00 AM
rw-r--r--
π
FormatterApplyTest.ts
83.91 KB
02/20/2020 05:45:00 AM
rw-r--r--
π
FormatterCheckTest.ts
10.05 KB
02/20/2020 05:45:01 AM
rw-r--r--
π
FormatterRemoveTest.ts
24.06 KB
02/20/2020 05:45:01 AM
rw-r--r--
π
FormattingCommandsTest.ts
19.5 KB
02/20/2020 05:45:02 AM
rw-r--r--
π
InlineEditorRemoveTest.ts
1.17 KB
02/20/2020 05:45:03 AM
rw-r--r--
π
InlineEditorSaveTest.ts
1.19 KB
02/20/2020 05:45:03 AM
rw-r--r--
π
JqueryIntegrationTest.disabled
4.5 KB
02/20/2020 05:45:04 AM
rw-r--r--
π
MiscCommandsTest.ts
3.61 KB
02/20/2020 05:45:05 AM
rw-r--r--
π
ModeTest.ts
4.18 KB
02/20/2020 05:45:05 AM
rw-r--r--
π
NotificationManagerTest.ts
4.01 KB
02/20/2020 05:45:06 AM
rw-r--r--
π
SelectionOverridesTest.ts
10.48 KB
02/20/2020 05:45:06 AM
rw-r--r--
π
ShortcutsTest.ts
3.67 KB
02/20/2020 05:45:07 AM
rw-r--r--
π
UndoManagerTest.ts
14.65 KB
02/20/2020 05:45:07 AM
rw-r--r--
π
WindowManagerTest.ts
1.29 KB
02/20/2020 05:45:08 AM
rw-r--r--
π
annotate
-
02/20/2020 06:12:41 AM
rwxr-xr-x
π
api
-
02/20/2020 06:34:15 AM
rwxr-xr-x
π
bookmark
-
02/20/2020 06:12:48 AM
rwxr-xr-x
π
caret
-
02/20/2020 06:12:58 AM
rwxr-xr-x
π
commands
-
02/20/2020 06:13:03 AM
rwxr-xr-x
π
content
-
02/20/2020 06:13:08 AM
rwxr-xr-x
π
delete
-
02/20/2020 06:13:20 AM
rwxr-xr-x
π
dom
-
02/20/2020 06:13:35 AM
rwxr-xr-x
π
file
-
02/20/2020 06:13:40 AM
rwxr-xr-x
π
fmt
-
02/20/2020 06:13:49 AM
rwxr-xr-x
π
focus
-
02/20/2020 06:13:55 AM
rwxr-xr-x
π
geom
-
02/20/2020 06:13:59 AM
rwxr-xr-x
π
html
-
02/20/2020 06:14:06 AM
rwxr-xr-x
π
init
-
02/20/2020 06:14:16 AM
rwxr-xr-x
π
keyboard
-
02/20/2020 06:14:32 AM
rwxr-xr-x
π
newline
-
02/20/2020 06:14:36 AM
rwxr-xr-x
π
selection
-
02/20/2020 06:14:47 AM
rwxr-xr-x
π
undo
-
02/20/2020 06:14:53 AM
rwxr-xr-x
π
util
-
02/20/2020 06:15:03 AM
rwxr-xr-x
Editing: EditorViewIframeTest.ts
Close
import { Assertions, GeneralSteps, Logger, Pipeline, Step, Chain } from '@ephox/agar'; import { TinyApis, TinyLoader } from '@ephox/mcagar'; import { Element, Css, SelectorFind, Scroll } from '@ephox/sugar'; import EditorView from 'tinymce/core/EditorView'; import Theme from 'tinymce/themes/silver/Theme'; import { UnitTest } from '@ephox/bedrock'; import { window } from '@ephox/dom-globals'; UnitTest.asynctest('browser.tinymce.core.EditorViewIframeTest', function (success, failure) { Theme(); const hiddenScrollbar = Scroll.scrollBarWidth() === 0; const isPhantomJs = function () { return /PhantomJS/.test(window.navigator.userAgent); }; const getIframeClientRect = function (editor) { return SelectorFind.descendant(Element.fromDom(editor.getContentAreaContainer()), 'iframe').map(function (elm) { return elm.dom().getBoundingClientRect(); }).getOrDie(); }; const sSetBodyStyles = function (editor, css) { return Step.label( 'sSetBodyStyles ' + JSON.stringify(css), Step.sync(function () { Css.setAll(Element.fromDom(editor.getBody()), css); }) ); }; const sTestIsXYInContentArea = function (editor, deltaX, deltaY) { const dx1 = - 25 - deltaX; const dy1 = -25 - deltaY; const dx2 = - 5 - deltaX; const dy2 = - 5 - deltaY; return Step.label('Check points relative to deltaX=' + deltaX + ' deltaY=' + deltaY, Chain.asStep({}, [ Chain.fromParent( Chain.label( 'Calculate bounding rectangle', Chain.injectThunked(() => getIframeClientRect(editor)) ), [ Chain.label( 'Check γbottom rightγ + (' + dx1 + ', ' + dy1 + ') is inside editor', Chain.op((rect) => Assertions.assertEq( 'Should be inside the area since the scrollbars are excluded', true, EditorView.isXYInContentArea(editor, rect.width + dx1, rect.height + dy1) )) ), Chain.label( 'Check γbottom rightγ + (' + dx2 + ', ' + dy2 + ') is ' + (hiddenScrollbar ? 'inside' : 'outside') + ' editor', Chain.op((rect) => Assertions.assertEq( (hiddenScrollbar ? 'Should be inside the area since the scrollbars are hidden' : 'Should be outside the area since the cordinate is on the scrollbars'), hiddenScrollbar, EditorView.isXYInContentArea(editor, rect.width + dx2, rect.height + dy2) )) ) ] ) ])); }; TinyLoader.setup(function (editor, onSuccess, onFailure) { const tinyApis = TinyApis(editor); const sSetContentToBigDiv = Step.label( 'Set content to big div', tinyApis.sSetContent('<div style="width: 5000px; height: 5000px">X</div>') ); Pipeline.async({}, isPhantomJs() ? [] : [ Logger.t('isXYInContentArea without borders, margin', GeneralSteps.sequence([ sSetBodyStyles(editor, { border: '0', margin: '0' }), sSetContentToBigDiv, sTestIsXYInContentArea(editor, 0, 0) ])), Logger.t('isXYInContentArea with borders, margin', GeneralSteps.sequence([ sSetBodyStyles(editor, { border: '5px', margin: '15px' }), sSetContentToBigDiv, sTestIsXYInContentArea(editor, 0, 0) ])) ], onSuccess, onFailure); }, { base_url: '/project/tinymce/js/tinymce' }, success, failure); });