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: ShortcutsTest.ts
Close
import { Pipeline } from '@ephox/agar'; import { LegacyUnit, TinyLoader } from '@ephox/mcagar'; import Env from 'tinymce/core/api/Env'; import Tools from 'tinymce/core/api/util/Tools'; import Theme from 'tinymce/themes/silver/Theme'; import { UnitTest } from '@ephox/bedrock'; UnitTest.asynctest('browser.tinymce.core.ShortcutsTest', function () { const success = arguments[arguments.length - 2]; const failure = arguments[arguments.length - 1]; const suite = LegacyUnit.createSuite(); Theme(); suite.test('Shortcuts formats', function (editor) { const assertShortcut = function (shortcut, args, assertState) { let called = false; editor.shortcuts.add(shortcut, '', function () { called = true; }); args = Tools.extend({ ctrlKey: false, altKey: false, shiftKey: false, metaKey: false }, args); editor.fire('keydown', args); if (assertState) { LegacyUnit.equal(called, true, 'Shortcut wasn\'t called: ' + shortcut); } else { LegacyUnit.equal(called, false, 'Shortcut was called when it shouldn\'t have been: ' + shortcut); } }; assertShortcut('ctrl+d', { ctrlKey: true, keyCode: 68 }, true); assertShortcut('ctrl+d', { altKey: true, keyCode: 68 }, false); if (Env.mac) { assertShortcut('meta+d', { metaKey: true, keyCode: 68 }, true); assertShortcut('access+d', { ctrlKey: true, altKey: true, keyCode: 68 }, true); assertShortcut('meta+d', { ctrlKey: true, keyCode: 68 }, false); assertShortcut('access+d', { shiftKey: true, altKey: true, keyCode: 68 }, false); } else { assertShortcut('meta+d', { ctrlKey: true, keyCode: 68 }, true); assertShortcut('access+d', { shiftKey: true, altKey: true, keyCode: 68 }, true); assertShortcut('meta+d', { metaKey: true, keyCode: 68 }, false); assertShortcut('access+d', { ctrlKey: true, altKey: true, keyCode: 68 }, false); } assertShortcut('ctrl+shift+d', { ctrlKey: true, shiftKey: true, keyCode: 68 }, true); assertShortcut('ctrl+shift+alt+d', { ctrlKey: true, shiftKey: true, altKey: true, keyCode: 68 }, true); assertShortcut('ctrl+221', { ctrlKey: true, keyCode: 221 }, true); assertShortcut('f1', { keyCode: 112}, true); assertShortcut('f2', { keyCode: 113}, true); assertShortcut('f3', { keyCode: 114}, true); assertShortcut('f4', { keyCode: 115}, true); assertShortcut('f5', { keyCode: 116}, true); assertShortcut('f6', { keyCode: 117}, true); assertShortcut('f7', { keyCode: 118}, true); assertShortcut('f8', { keyCode: 119}, true); assertShortcut('f9', { keyCode: 120}, true); assertShortcut('f10', { keyCode: 121}, true); assertShortcut('f11', { keyCode: 122}, true); assertShortcut('f12', { keyCode: 123}, true); }); suite.test('Remove', function (editor) { let called = false, eventArgs; eventArgs = { ctrlKey: true, keyCode: 68, altKey: false, shiftKey: false, metaKey: false }; editor.shortcuts.add('ctrl+d', '', function () { called = true; }); editor.fire('keydown', eventArgs); LegacyUnit.equal(called, true, 'Shortcut wasn\'t called when it should have been.'); called = false; editor.shortcuts.remove('ctrl+d'); editor.fire('keydown', eventArgs); LegacyUnit.equal(called, false, 'Shortcut was called when it shouldn\'t.'); }); TinyLoader.setup(function (editor, onSuccess, onFailure) { Pipeline.async({}, suite.toSteps(editor), onSuccess, onFailure); }, { add_unload_trigger: false, disable_nodechange: true, indent: false, entities: 'raw', base_url: '/project/tinymce/js/tinymce' }, success, failure); });