]+data-mce-bogus[^>]+><\/div>/gi, '');
+
+ return html;
+}
+
+function normalizeHtml(html) {
+ var writer = new tinymce.html.Writer();
+
+ new tinymce.html.SaxParser({
+ validate: false,
+ comment: writer.comment,
+ cdata: writer.cdata,
+ text: writer.text,
+ end: writer.end,
+ pi: writer.pi,
+ doctype: writer.doctype,
+
+ start: function(name, attrs, empty) {
+ attrs.sort(function(a, b) {
+ if (a.name === b.name) {
+ return 0;
+ }
+
+ return a.name > b.name ? 1 : -1;
+ });
+
+ writer.start(name, attrs, empty);
+ }
+ }).parse(html);
+
+ return writer.getContent();
+}
+
+/**
+ * Measures the x, y, w, h of the specified element/control relative to the view element.
+ */
+function rect(ctrl) {
+ var outerRect, innerRect;
+
+ if (ctrl.nodeType) {
+ innerRect = ctrl.getBoundingClientRect();
+ } else {
+ innerRect = ctrl.getEl().getBoundingClientRect();
+ }
+
+ outerRect = document.getElementById('view').getBoundingClientRect();
+
+ return [
+ Math.round(innerRect.left - outerRect.left),
+ Math.round(innerRect.top - outerRect.top),
+ Math.round(innerRect.right - innerRect.left),
+ Math.round(innerRect.bottom - innerRect.top)
+ ];
+}
+
+function size(ctrl) {
+ return rect(ctrl).slice(2);
+}
+
+function resetScroll(elm) {
+ elm.scrollTop = 0;
+ elm.scrollLeft = 0;
+}
+
+// Needed since fonts render differently on different platforms
+function nearlyEqualRects(rect1, rect2, diff) {
+ diff = diff || 1;
+
+ for (var i = 0; i < 4; i++) {
+ if (Math.abs(rect1[i] - rect2[i]) > diff) {
+ deepEqual(rect1, rect2);
+ return;
+ }
+ }
+
+ ok(true);
+}
diff --git a/tests/qunit/editor/plugins/autolink.html b/tests/qunit/editor/plugins/autolink.html
new file mode 100644
index 0000000000..46a83cad63
--- /dev/null
+++ b/tests/qunit/editor/plugins/autolink.html
@@ -0,0 +1,170 @@
+
+
+
+
Automatic link tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/plugins/autosave.html b/tests/qunit/editor/plugins/autosave.html
new file mode 100644
index 0000000000..b167df586b
--- /dev/null
+++ b/tests/qunit/editor/plugins/autosave.html
@@ -0,0 +1,104 @@
+
+
+
+
Unit tests for the Autosave plugin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/plugins/fullpage.html b/tests/qunit/editor/plugins/fullpage.html
new file mode 100644
index 0000000000..310db10496
--- /dev/null
+++ b/tests/qunit/editor/plugins/fullpage.html
@@ -0,0 +1,154 @@
+
+
+
+
Fullpage plugin tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/plugins/jquery_plugin.html b/tests/qunit/editor/plugins/jquery_plugin.html
new file mode 100644
index 0000000000..a2e3d6b2c1
--- /dev/null
+++ b/tests/qunit/editor/plugins/jquery_plugin.html
@@ -0,0 +1,126 @@
+
+
+
+
jQuery Plugin tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/plugins/js/autolink.actions.js b/tests/qunit/editor/plugins/js/autolink.actions.js
new file mode 100644
index 0000000000..53d50e32c8
--- /dev/null
+++ b/tests/qunit/editor/plugins/js/autolink.actions.js
@@ -0,0 +1,52 @@
+function fakeTypeAURL(url) {
+ return function(callback) {
+ // type the URL and then press the space bar
+ tinymce.execCommand('mceInsertContent', false, url);
+ window.robot.type(32, false, callback, editor.selection.getNode());
+ };
+}
+
+function fakeTypeAnEclipsedURL(url) {
+ return function(callback) {
+ // type the URL and then type ')'
+ tinymce.execCommand('mceInsertContent', false, '(' + url);
+ window.robot.typeSymbol(")", function() {
+ window.robot.type(32, false, callback, editor.selection.getNode());
+ }, editor.selection.getNode());
+ };
+}
+
+function fakeTypeANewlineURL(url) {
+ return function(callback) {
+ // type the URL and then press the enter key
+ tinymce.execCommand('mceInsertContent', false, url);
+ window.robot.type('\n', false, callback, editor.selection.getNode());
+ };
+}
+
+createAction('Typing HTTP URL', fakeTypeAURL('http://www.ephox.com'));
+createAction('Typing HTTPS URL', fakeTypeAURL('https://www.ephox.com'));
+createAction('Typing SSH URL', fakeTypeAURL('ssh://www.ephox.com'));
+createAction('Typing FTP URL', fakeTypeAURL('ftp://www.ephox.com'));
+createAction('Typing WWW URL', fakeTypeAURL('www.ephox.com'));
+createAction('Typing WWW URL With End Dot', fakeTypeAURL('www.site.com.'));
+createAction('Typing Mail Addr', fakeTypeAURL('user@domain.com'));
+createAction('Typing Mail Addr With Protocol', fakeTypeAURL('mailto:user@domain.com'));
+createAction('Typing Dashed Mail Addr', fakeTypeAURL('first-last@domain.com'));
+createAction('Typing Eclipsed HTTP URL', fakeTypeAnEclipsedURL('http://www.ephox.com'));
+createAction('Typing Eclipsed HTTPS URL', fakeTypeAnEclipsedURL('https://www.ephox.com'));
+createAction('Typing Eclipsed SSH URL', fakeTypeAnEclipsedURL('ssh://www.ephox.com'));
+createAction('Typing Eclipsed FTP URL', fakeTypeAnEclipsedURL('ftp://www.ephox.com'));
+createAction('Typing Eclipsed WWW URL', fakeTypeAnEclipsedURL('www.ephox.com'));
+createAction('Typing HTTP URL And Newline', fakeTypeANewlineURL('http://www.ephox.com'));
+createAction('Typing HTTPS URL And Newline', fakeTypeANewlineURL('https://www.ephox.com'));
+createAction('Typing SSH URL And Newline', fakeTypeANewlineURL('ssh://www.ephox.com'));
+createAction('Typing FTP URL And Newline', fakeTypeANewlineURL('ftp://www.ephox.com'));
+createAction('Typing WWW URL And Newline', fakeTypeANewlineURL('www.ephox.com'));
+createAction('Applying OL', 'InsertOrderedList');
+createAction('Applying UL', 'InsertUnorderedList');
+createAction('Indenting', 'Indent');
+createAction('Outdenting', 'Outdent');
+createAction('Typing Enter', fakeKeyPressAction('\n'));
+createAction('Typing Tab', fakeKeyPressAction('\t'));
+createAction('Typing Shift Tab', fakeKeyPressAction('\t', true));
diff --git a/tests/qunit/editor/plugins/js/dsl.js b/tests/qunit/editor/plugins/js/dsl.js
new file mode 100644
index 0000000000..742321572e
--- /dev/null
+++ b/tests/qunit/editor/plugins/js/dsl.js
@@ -0,0 +1,138 @@
+var editor;
+
+function getFunctionName(func) {
+ if (func.name && func.name != "") {
+ return func.name;
+ } else if (typeof func == "function" || typeof func == "object") {
+ var fName = ("" + func).match(/function\s*([\w\$]+)\s*\(/);
+ if (fName !== null && fName != "") {
+ return fName[1];
+ } else {
+ for (var v in window) {
+ if (window[v] === func) {
+ func.name = v;
+ return v;
+ }
+ }
+ }
+ }
+}
+
+function assertState(expected, message) {
+ var content = editor.getContent().replace(/[\n\r]/g, '');
+ if (expected && expected.replace) expected = expected.replace(/[\n\r]/g, '');
+ // Safari reports "function", while Firefox and IE report "object"
+ if (typeof expected == "function" || typeof expected == "object") {
+ if (expected.test(content))
+ equal(content, content, message);
+ else
+ equal(content, expected.toString(), message);
+ } else {
+ equal(content, expected, message);
+ }
+}
+
+tinymce.create('dsl.Queue', {
+ Queue: function() {
+ this.queue = [];
+ },
+
+ add: function(task) {
+ this.queue.push(task);
+ },
+
+ next: function() {
+ if (this.queue.length > 0) {
+ var task = this.queue.shift();
+ task();
+ return true;
+ } else {
+ QUnit.start();
+ return false;
+ }
+ },
+
+ done: function() {
+ expect(this.queue.length);
+ this.next();
+ }
+});
+
+tinymce.create('dsl.Action', {
+ Action: function(name, action) {
+ this.name = name;
+ this.a = this.curryPreposition('a');
+ this.inA = this.curryPreposition('in a');
+ this.to = this.curryPreposition('to');
+ if (tinymce.is(action, 'string')) {
+ this.action = function(callback) {
+ editor.execCommand(action);
+ callback();
+ };
+ } else {
+ this.action = action;
+ }
+ },
+
+ curryPreposition: function(preposition) {
+ return function(state) {
+ return this.go(state, preposition);
+ };
+ },
+
+ go: function(state, preposition) {
+ var message = this.name + " " + preposition + " " + getFunctionName(state);
+ var action = this.action;
+ var actionPerformed = false;
+ function defer(callback) {
+ return function() {
+ var args = arguments;
+ queue.add(function() {
+ if (actionPerformed) {
+ callback.apply(undefined, args);
+ queue.next();
+ return;
+ }
+ editor.focus();
+ state();
+ action(function() {
+ actionPerformed = true;
+ callback.apply(undefined, args);
+ queue.next();
+ });
+ });
+ return this;
+ };
+ }
+
+ var dslState = {
+ gives: defer(function(expected) {
+ assertState(expected, message);
+ }),
+
+ enablesState: defer(function(state) {
+ ok(editor.queryCommandState(state), message + " enables " + state + " command");
+ }),
+
+ disablesState: defer(function(state) {
+ ok(!editor.queryCommandState(state), message + " disables " + state + " command");
+ })
+ };
+ dslState.andGives = dslState.gives;
+ return dslState;
+ }
+});
+
+
+// Action Utilities
+function fakeKeyPressAction(keyCode, shiftKey) {
+ return function(callback) {
+ setTimeout(function() {
+ window.robot.type(keyCode, shiftKey, callback, editor.selection.getNode());
+ }, 1);
+ };
+}
+
+function createAction(name, action) {
+ window[name.replace(/\s+/g, '')] = new dsl.Action(name, action);
+}
\ No newline at end of file
diff --git a/tests/qunit/editor/plugins/js/states.js b/tests/qunit/editor/plugins/js/states.js
new file mode 100644
index 0000000000..611ffdee8e
--- /dev/null
+++ b/tests/qunit/editor/plugins/js/states.js
@@ -0,0 +1,176 @@
+function createState(content, startSelector, startOffset, endSelector, endOffset) {
+ return function() {
+ editor.setContent(content);
+ setSelection(startSelector, startOffset, endSelector, endOffset);
+ };
+}
+
+/** Collapsed Selection States **/
+function EmptyParagraph() {
+ var body = editor.getBody();
+ while (body.firstChild) {
+ editor.dom.remove(body.firstChild);
+ }
+ var p = body.ownerDocument.createElement('p');
+ p.appendChild(body.ownerDocument.createTextNode(''));
+ body.appendChild(p, body);
+ setSelection(p.firstChild, 0);
+}
+
+function EmptyHeading() {
+ EmptyParagraph();
+ editor.dom.rename(editor.getBody().firstChild, 'h1');
+ setSelection(editor.getBody().firstChild.firstChild, 0);
+}
+
+function TextAfterUL() {
+ editor.setContent('
Test');
+ setSelection(editor.dom.getRoot().lastChild, 2);
+}
+
+function TextAfterOL() {
+ editor.setContent('
Item Test');
+ setSelection(editor.dom.getRoot().lastChild, 2);
+}
+
+EmptyContent = createState('', 'body', 0);
+PlainText = createState('Test', 'body', 0);
+NonEmptyParagraph = createState('
Test
', 'p', 0);
+ParagraphWithMarginLeft = createState('
Test
', 'p', 0);
+ParagraphWithPaddingLeft = createState('
Test
', 'p', 0);
+ParagraphWithMarginAndPaddingLeft = createState('
Test
', 'p', 0);
+
+CenteredListItem = createState('
', 'li:nth-child(1)', 2);
+ItemInCenteredList = createState('
', 'li:nth-child(1)', 2);
+RightAlignedListItem = createState('
', 'li:nth-child(1)', 2);
+ItemInRightAlignedList = createState('
', 'li:nth-child(1)', 2);
+
+ParagraphBetweenOrderedLists = createState('
Item1 Test
Item2 ', 'p', 2);
+ParagraphBetweenUnorderedLists = createState('
Test
', 'p', 2);
+ParagraphBetweenMixedLists = createState('
Item1 Test
', 'p', 2);
+
+NonEmptyHeading = createState('
Test ', 'h1', 0);
+TableCellWithoutBrs = createState('
', 'td', 4);
+TableCellWithoutBrs2 = createState('
', 'td', 0);
+TableCellWithBrsFirstLine = createState('
', 'td', 1);
+TableCellWithBrsFirstLine2 = createState('
', 'td', 0);
+TableCellWithBrsMiddleLine = createState('
', 'td br:nth-child(1)', 'afterNextCharacter');
+TableCellWithBrsLastLine = createState('
', 'td br:nth-child(1)', 'afterNextCharacter');
+TableCellWithAdjacentBrsFirstLine = createState('
', 'td', 1);
+
+HeadingInOrderedList = createState('
Test ', 'h2', '2');
+HeadingInUnorderedList = createState('
', 'h2', '2');
+HeadingInOrderedListBeforeParagraph = createState('
Test Content After
', 'h2', '2');
+
+DefinitionListDescription = createState('
Term Description ', 'dd', 2);
+DefinitionListTerm = createState('
Term Description ', 'dt', 2);
+EndOfParagraphBeforeOL = createState('
Test
Item ', 'p', 4);
+EndOfParagraphBeforeOLWithListType = createState('
Test
Item ', 'p', 4);
+EndOfParagraphBeforeUL = createState('
Test
', 'p', 4);
+StartOfParagraphAfterOL = createState('
Item Test
', 'p', 1);
+StartOfParagraphAfterUL = createState('
Test
', 'p', 1);
+StartOfParagraphAfterOLWithListType = createState('
Item Test
', 'p', 1);
+EmptyOrderedListItem = createState('
Before After ', 'li:nth-child(2)', 0);
+EmptyUnorderedListItem = createState('
', 'li:nth-child(2)', 0);
+NonEmptyOrderedListItem = createState('
Before Test After ', 'li:nth-child(2)', 0);
+NonEmptyUnorderedListItem = createState('
', 'li:nth-child(2)', 0);
+NestedEmptyOrderedListItem = createState('
Before After ', 'li ol li', 0);
+NestedEmptyUnorderedListItem = createState('
', 'li ul li', 0);
+NestedNonEmptyOrderedListItem = createState('
BeforeTest After ', 'li ol li', 0);
+NestedNonEmptyUnorderedListItem = createState('
', 'li ul li', 0);
+NestedOrderedListWithMultipleItems = createState('
BeforeItem1 Item2 ', 'li ol li', 0);
+NestedUnorderedListWithMultipleItems = createState('
', 'li ul li', 0);
+OrderedLowerAlphaListItem = createState('
Item 1 Item 2 ', 'li:nth-child(2)', 0);
+UnorderedSquareListItem = createState('
', 'li:nth-child(2)', 0);
+
+OrderedListItemWithNestedChild = createState('
Item1Nested ', 'li:nth-child(1)', 2);
+UnorderedListItemWithNestedChild = createState('
', 'li:nth-child(1)', 2);
+
+OrderedListWithAdjacentNestedLists = createState('
Item 1 Item 2 Item 3 ', 'li:nth-child(2)', 4);
+UnorderedListWithAdjacentNestedLists = createState('
', 'li:nth-child(2)', 4);
+
+OrderedListItemWithMargin = createState('
Test ', 'li', 0);
+UnorderedListItemWithMargin = createState('
', 'li', 0);
+
+OrderedListItemWithNestedAlphaList = createState('
ItemNested ', 'li', 2);
+
+/** Collapsed DIV Tests **/
+OrderedListItemInsideDiv = createState('
', 'li:nth-child(1)', 2);
+UnorderedListItemInsideDiv = createState('
', 'li:nth-child(1)', 2);
+
+ParagraphInDiv = createState('
', 'p', 2);
+TextInDiv = createState('
Item
', 'div', 2);
+TextWithBrsInDivFirstLine = createState('
Item1 Item2
', 'div', 2);
+TextWithBrsInDivMiddleLine = createState('
Item1 Item2 Item3
', 'br:nth-child(1)', 'afterNextCharacter');
+TextWithBrsInDivLastLine = createState('
Item1 Item2
', 'br:nth-child(1)', 'afterNextCharacter');
+TextWithBrsInFormattingInDiv = function() {
+ var rng;
+ editor.setContent('
Before Item1 Item2 Item3
');
+ rng = editor.dom.createRng();
+ rng.setStart(editor.dom.select('div')[0].childNodes[1], 0);
+ rng.setEnd(editor.dom.select('div')[0], 6);
+ editor.selection.setRng(rng);
+};
+TextWithBrInsideFormatting = function() {
+ var rng;
+ editor.setContent('
BeforeItem1 Item2 Item3
');
+ rng = editor.dom.createRng();
+ rng.setStart(editor.dom.select('span')[0].childNodes[0], 2);
+ rng.setEnd(editor.dom.select('div')[0], 4);
+ editor.selection.setRng(rng);
+};
+
+/** Expanded Selection States **/
+SingleParagraphSelection = createState('
This is a test
', 'p', 5, 'p', 7);
+MultipleParagraphSelection = createState('
This is a test
Second paragraph
', 'p:nth-child(1)', 5, 'p:nth-child(2)', 6);
+SingleHeadingSelection = createState('
This is a test ', 'h1', 5, 'h1', 7);
+MultipleHeadingSelection = createState('
This is a test Second paragraph ', 'h1:nth-child(1)', 5, 'h1:nth-child(2)', 6);
+SingleBlockSelection = createState('
This is a test
', 'div', 5, 'div', 7);
+MultipleBlockSelection = createState('
This is a test
Second paragraph
', 'div:nth-child(1)', 5, 'div:nth-child(2)', 6);
+
+SingleBlockWithBrSelection = createState('
Item1 Item2
', 'div', 3, 'br', 'afterNextCharacter');
+MultipleBlockWithBrSelection = createState('
Item1 Item2
Item3
', 'div:nth-child(1)', 2, 'div:nth-child(2)', 3);
+MultipleBlockWithBrPartialSelection = createState('
Item1 Item2
Item3 Item4
', 'div:nth-child(1)', 2, 'div:nth-child(2)', 3);
+MultipleBlockWithBrPartialSelectionAtEnd = createState('
Item1 Item2
Item3 Item4
', 'div:nth-child(1) br', 'afterNextCharacter', 'div:nth-child(2) br', 'afterNextCharacter');
+MultipleBlockWithEmptyDivsAllSelected = createState('
a
b
', '#start', 0, '#end', 0);
+
+CellWithoutBrSelection = createState('
', 'td', 1, 'td', 1); //selection is a single point so it will avoid table selection bugs in ie9.
+CellWithBrSingleLineSelection = createState('
', 'td', 1, 'td', 4);
+CellWithBrMultipleLineSelection = createState('
', 'td', 1, 'td', 4);
+
+TableCellWithTextAfterUL = createState('
', '#start', 1, '#end', 'afterNextCharacter');
+
+ParagraphToHeadingSelection = createState('
This is a test
Second paragraph ', 'p', 5, 'h1', 6);
+ParagraphToBlockSelection = createState('
This is a test
Second paragraph
', 'p', 5, 'div', 6);
+HeadingToParagraphSelection = createState('
This is a test Second paragraph
', 'h1', 5, 'p', 6);
+BlockToParagraphSelection = createState('
This is a test
Second paragraph
', 'div', 5, 'p', 6);
+MultipleParagraphAndHeadingSelection = createState('
This is a test
Second paragraph Third paragraph
', 'p', 5, 'div', 5);
+ThreeBoldDivsWithBrSelection = createState('
One
Two
Three
', 'div:nth-child(1) strong', 2, 'div:nth-child(3) strong', 2);
+
+SingleLiOlSelection = createState('
Item 1 ', 'li', 1, 'li', 4);
+MultiLiOlSelection = createState('
Item 1 Item 2 ', 'li:nth-child(1)', 1, 'li:nth-child(2)', 4);
+SingleLiUlSelection = createState('
', 'li', 1, 'li', 4);
+MultiLiUlSelection = createState('
', 'li:nth-child(1)', 1, 'li:nth-child(2)', 4);
+MultiNestedLiUlSelection = createState('
', 'li li:nth-child(1)', 1, 'li li:nth-child(2)', 4);
+MultiNestedLiOlSelection = createState('
Item 1 Item 2 ', 'li li:nth-child(1)', 1, 'li li:nth-child(2)', 4);
+
+IndentedOlInOlCorrectSelection = createState('
Item 1Indented ', 'li', 1, 'li li', 4);
+IndentedUlInUlCorrectSelection = createState('
', 'li', 1, 'li li', 4);
+IndentedOlInOlIncorrectSelection = createState('
Item 1 Indented ', 'li', 1, 'ol ol li', 4);
+IndentedUlInUlIncorrectSelection = createState('
', 'li', 1, 'ul ul li', 4);
+
+IndentedOlInUlCorrectSelection = createState('
', 'li', 1, 'li li', 4);
+IndentedUlInOlCorrectSelection = createState('
Item 1 ', 'li', 1, 'li li', 4);
+IndentedOlInUlIncorrectSelection = createState('
', 'li', 1, 'ul ol li', 4);
+IndentedUlInOlIncorrectSelection = createState('
Item 1 ', 'li', 1, 'ol ul li', 4);
+
+// TODO: Paragraph/heading to list combinations.
+ParagraphBeforeOlSelection = createState('
Before
Item 1 ', 'p', 3, 'li', 4);
+ParagraphBeforeUlSelection = createState('
Before
', 'p', 3, 'li', 4);
+ParagraphAfterOlSelection = createState('
Item 1 After
', 'li', 4, 'p', 3);
+ParagraphAfterUlSelection = createState('
After
', 'li', 4, 'p', 3);
+ParagraphBeforeAndAfterOlSelection = createState('
Before
Item 1 After
', 'p', 4, '#after', 3);
+ParagraphBeforeAndAfterUlSelection = createState('
Before
After
', 'p', 4, '#after', 3);
+
+SelectionEndingAtBr = createState('
Item After
', 'p', 2, 'br', 'after');
+SelectionStartingAtBr = createState('
Before Item
', 'p', 'after', 'br', 'afterNextCharacter');
diff --git a/tests/qunit/editor/plugins/legacyoutput.html b/tests/qunit/editor/plugins/legacyoutput.html
new file mode 100644
index 0000000000..cb5896e887
--- /dev/null
+++ b/tests/qunit/editor/plugins/legacyoutput.html
@@ -0,0 +1,130 @@
+
+
+
+
Unit tests for Media Plugin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/plugins/lists.html b/tests/qunit/editor/plugins/lists.html
new file mode 100644
index 0000000000..b96881324c
--- /dev/null
+++ b/tests/qunit/editor/plugins/lists.html
@@ -0,0 +1,1770 @@
+
+
+
+
Unit tests for lists plugin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
[Get raw]
+
+
+
[Get raw]
+
+
diff --git a/tests/qunit/editor/plugins/media.html b/tests/qunit/editor/plugins/media.html
new file mode 100644
index 0000000000..34b7d5bb11
--- /dev/null
+++ b/tests/qunit/editor/plugins/media.html
@@ -0,0 +1,180 @@
+
+
+
+
Unit tests for Media Plugin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/plugins/noneditable.html b/tests/qunit/editor/plugins/noneditable.html
new file mode 100644
index 0000000000..c21b242b8a
--- /dev/null
+++ b/tests/qunit/editor/plugins/noneditable.html
@@ -0,0 +1,237 @@
+
+
+
+
Unit tests for noneditable
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/plugins/paste.html b/tests/qunit/editor/plugins/paste.html
new file mode 100644
index 0000000000..682fc4b691
--- /dev/null
+++ b/tests/qunit/editor/plugins/paste.html
@@ -0,0 +1,440 @@
+
+
+
+
Unit tests for the Paste plugin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/plugins/plugin_dependency_chain.html b/tests/qunit/editor/plugins/plugin_dependency_chain.html
new file mode 100644
index 0000000000..748f201f9c
--- /dev/null
+++ b/tests/qunit/editor/plugins/plugin_dependency_chain.html
@@ -0,0 +1,59 @@
+
+
+
+
Basic editor functionality tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/plugins/plugin_dependency_chain_legacy.html b/tests/qunit/editor/plugins/plugin_dependency_chain_legacy.html
new file mode 100644
index 0000000000..08cef239e5
--- /dev/null
+++ b/tests/qunit/editor/plugins/plugin_dependency_chain_legacy.html
@@ -0,0 +1,59 @@
+
+
+
+
Plugin Dependency Functional tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/plugins/plugin_dependency_init_call_order.html b/tests/qunit/editor/plugins/plugin_dependency_init_call_order.html
new file mode 100644
index 0000000000..7f87ed1473
--- /dev/null
+++ b/tests/qunit/editor/plugins/plugin_dependency_init_call_order.html
@@ -0,0 +1,69 @@
+
+
+
+
Basic editor functionality tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/plugins/plugin_dependency_simple.html b/tests/qunit/editor/plugins/plugin_dependency_simple.html
new file mode 100644
index 0000000000..60b484bb17
--- /dev/null
+++ b/tests/qunit/editor/plugins/plugin_dependency_simple.html
@@ -0,0 +1,50 @@
+
+
+
+
Basic editor functionality tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/plugins/plugin_dependency_specific_location.html b/tests/qunit/editor/plugins/plugin_dependency_specific_location.html
new file mode 100644
index 0000000000..1feef33c00
--- /dev/null
+++ b/tests/qunit/editor/plugins/plugin_dependency_specific_location.html
@@ -0,0 +1,58 @@
+
+
+
+
Basic editor functionality tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/plugins/searchreplace.html b/tests/qunit/editor/plugins/searchreplace.html
new file mode 100644
index 0000000000..a3fa93f2b3
--- /dev/null
+++ b/tests/qunit/editor/plugins/searchreplace.html
@@ -0,0 +1,132 @@
+
+
+
+
Unit tests for searchreplace plugin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
[Get raw]
+
+
diff --git a/tests/qunit/editor/plugins/spellchecker.html b/tests/qunit/editor/plugins/spellchecker.html
new file mode 100644
index 0000000000..3be00e2b72
--- /dev/null
+++ b/tests/qunit/editor/plugins/spellchecker.html
@@ -0,0 +1,108 @@
+
+
+
+
Unit tests for spellchecker plugin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
[Get raw]
+
+
[Get raw]
+
+
[Get raw]
+
+
diff --git a/tests/qunit/editor/plugins/table.html b/tests/qunit/editor/plugins/table.html
new file mode 100644
index 0000000000..9cbc3219c3
--- /dev/null
+++ b/tests/qunit/editor/plugins/table.html
@@ -0,0 +1,348 @@
+
+
+
+
Unit tests for the Table plugin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/plugins/table_robot.html b/tests/qunit/editor/plugins/table_robot.html
new file mode 100644
index 0000000000..351cea6f3b
--- /dev/null
+++ b/tests/qunit/editor/plugins/table_robot.html
@@ -0,0 +1,189 @@
+
+
+
+
Table plugin tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/plugins/tests.js b/tests/qunit/editor/plugins/tests.js
new file mode 100644
index 0000000000..b2d4b40eb2
--- /dev/null
+++ b/tests/qunit/editor/plugins/tests.js
@@ -0,0 +1,24 @@
+{
+ "title": "Plugins tests",
+ "tests": [
+ {"title": "Media", "url": "media.html"},
+ {"title": "Noneditable", "url": "noneditable.html"},
+ {"title": "Paste", "url": "paste.html"},
+ {"title": "Table", "url": "table.html"},
+ {"title": "Table (robot)", "url": "table_robot.html", "jsrobot": true},
+ {"title": "jQuery", "url": "jquery_plugin.html"},
+ {"title": "Autolink (robot)", "url": "autolink.html", "jsrobot": true},
+ {"title": "Autosave", "url": "autosave.html"},
+ {"title": "Wordcount", "url": "wordcount.html"},
+ {"title": "Fullpage", "url": "fullpage.html"},
+ {"title": "Legacyoutput", "url": "legacyoutput.html"},
+ {"title": "Plugin Dependencies", "url": "plugin_dependency_simple.html"},
+ {"title": "Plugin Dependency Chain", "url": "plugin_dependency_chain.html"},
+ {"title": "Plugin Dependency Chain Legacy", "url": "plugin_dependency_chain_legacy.html"},
+ {"title": "Dependency Chain Init Call Order", "url": "plugin_dependency_init_call_order.html"},
+ {"title": "Dependency With Specific Location", "url": "plugin_dependency_specific_location.html"},
+ {"title": "Lists", "url": "lists.html"},
+ {"title": "Searchreplace", "url": "searchreplace.html"},
+ {"title": "Spellchecker", "url": "spellchecker.html"}
+ ]
+}
diff --git a/tests/qunit/editor/plugins/wordcount.html b/tests/qunit/editor/plugins/wordcount.html
new file mode 100644
index 0000000000..cbfd201800
--- /dev/null
+++ b/tests/qunit/editor/plugins/wordcount.html
@@ -0,0 +1,122 @@
+
+
+
+
Unit tests for the Wordcount plugin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Current Count:
+
+
+
+
+
+
diff --git a/tests/qunit/editor/test.gif b/tests/qunit/editor/test.gif
new file mode 100644
index 0000000000..e565824aaf
Binary files /dev/null and b/tests/qunit/editor/test.gif differ
diff --git a/tests/qunit/editor/tinymce/Editor.html b/tests/qunit/editor/tinymce/Editor.html
new file mode 100644
index 0000000000..76ac3bd358
--- /dev/null
+++ b/tests/qunit/editor/tinymce/Editor.html
@@ -0,0 +1,221 @@
+
+
+
+
Unit tests for tinymce.Editor
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/qunit/editor/tinymce/EditorCommands.html b/tests/qunit/editor/tinymce/EditorCommands.html
new file mode 100644
index 0000000000..e248528547
--- /dev/null
+++ b/tests/qunit/editor/tinymce/EditorCommands.html
@@ -0,0 +1,765 @@
+
+
+
+
Unit tests for tinymce.EditorCommands
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/EnterKey.html b/tests/qunit/editor/tinymce/EnterKey.html
new file mode 100644
index 0000000000..2ed67a06f4
--- /dev/null
+++ b/tests/qunit/editor/tinymce/EnterKey.html
@@ -0,0 +1,1018 @@
+
+
+
+
Unit tests for EnterKey
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ForceBlocks.html b/tests/qunit/editor/tinymce/ForceBlocks.html
new file mode 100644
index 0000000000..ea1bd32a3f
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ForceBlocks.html
@@ -0,0 +1,116 @@
+
+
+
+
Unit tests for tinymce.ForceBlocks
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/Formatter_apply.html b/tests/qunit/editor/tinymce/Formatter_apply.html
new file mode 100644
index 0000000000..c4915351b2
--- /dev/null
+++ b/tests/qunit/editor/tinymce/Formatter_apply.html
@@ -0,0 +1,1228 @@
+
+
+
+
Unit tests for apply formatting
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/Formatter_check.html b/tests/qunit/editor/tinymce/Formatter_check.html
new file mode 100644
index 0000000000..93949751bc
--- /dev/null
+++ b/tests/qunit/editor/tinymce/Formatter_check.html
@@ -0,0 +1,271 @@
+
+
+
+
Unit tests for check formatting
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/Formatter_remove.html b/tests/qunit/editor/tinymce/Formatter_remove.html
new file mode 100644
index 0000000000..20677a4e8d
--- /dev/null
+++ b/tests/qunit/editor/tinymce/Formatter_remove.html
@@ -0,0 +1,401 @@
+
+
+
+
Unit tests for remove formatting
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/Formatter_robot.html b/tests/qunit/editor/tinymce/Formatter_robot.html
new file mode 100644
index 0000000000..34a6e8ffc0
--- /dev/null
+++ b/tests/qunit/editor/tinymce/Formatter_robot.html
@@ -0,0 +1,94 @@
+
+
+
+
Basic editor functionality tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/UndoManager.html b/tests/qunit/editor/tinymce/UndoManager.html
new file mode 100644
index 0000000000..d5aab25b8f
--- /dev/null
+++ b/tests/qunit/editor/tinymce/UndoManager.html
@@ -0,0 +1,189 @@
+
+
+
+
tinymce.UndoManager tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/UndoManager_robot.html b/tests/qunit/editor/tinymce/UndoManager_robot.html
new file mode 100644
index 0000000000..8c7c285b0d
--- /dev/null
+++ b/tests/qunit/editor/tinymce/UndoManager_robot.html
@@ -0,0 +1,115 @@
+
+
+
+
Undo Tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/dom/DOMUtils.html b/tests/qunit/editor/tinymce/dom/DOMUtils.html
new file mode 100644
index 0000000000..11b85cad48
--- /dev/null
+++ b/tests/qunit/editor/tinymce/dom/DOMUtils.html
@@ -0,0 +1,27 @@
+
+
+
+
Unit tests for tinymce.dom.DOMUtils
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/dom/DOMUtils.js b/tests/qunit/editor/tinymce/dom/DOMUtils.js
new file mode 100644
index 0000000000..d5e180e690
--- /dev/null
+++ b/tests/qunit/editor/tinymce/dom/DOMUtils.js
@@ -0,0 +1,680 @@
+(function() {
+ var DOM = new tinymce.dom.DOMUtils(document, {keep_values : true, schema : new tinymce.html.Schema()});
+
+ test('parseStyle', 11, function() {
+ var dom;
+
+ DOM.add(document.body, 'div', {id : 'test'});
+
+ dom = new tinymce.dom.DOMUtils(document, {hex_colors : true, keep_values : true, url_converter : function(u, n, e) {
+ return 'X' + u + 'Y';
+ }});
+
+ equal(
+ dom.serializeStyle(dom.parseStyle('border: 1px solid red; color: green')),
+ 'border: 1px solid red; color: green;'
+ );
+
+ equal(
+ dom.serializeStyle(dom.parseStyle('border: 1px solid rgb(0, 255, 255); color: green')),
+ 'border: 1px solid #00ffff; color: green;'
+ );
+
+ equal(
+ dom.serializeStyle(dom.parseStyle('border-top: 1px solid red; border-left: 1px solid red; border-bottom: 1px solid red; border-right: 1px solid red;')),
+ 'border: 1px solid red;'
+ );
+
+ equal(
+ dom.serializeStyle(dom.parseStyle('border-width: 1pt 1pt 1pt 1pt; border-style: none none none none; border-color: black black black black;')),
+ 'border: 1pt none black;'
+ );
+
+ equal(
+ dom.serializeStyle(dom.parseStyle('border-width: 1pt 4pt 2pt 3pt; border-style: solid dashed dotted none; border-color: black red green blue;')),
+ 'border-width: 1pt 4pt 2pt 3pt; border-style: solid dashed dotted none; border-color: black red green blue;'
+ );
+
+ equal(
+ dom.serializeStyle(dom.parseStyle('background: transparent url(test.gif);')),
+ 'background: transparent url(\'Xtest.gifY\');'
+ );
+
+ equal(
+ dom.serializeStyle(dom.parseStyle('background: transparent url(http://www.site.com/test.gif?a=1&b=2);')),
+ 'background: transparent url(\'Xhttp://www.site.com/test.gif?a=1&b=2Y\');'
+ );
+
+ dom.setHTML('test', '
');
+ equal(dom.getAttrib('test2', 'style'), 'margin: 1px;');
+
+ dom.setHTML('test', '
');
+ equal(dom.getAttrib('test2', 'style'), 'background-image: url(\'Xtest.gifY\');');
+
+ dom.get('test').innerHTML = '
';
+ equal(dom.getAttrib('test2', 'style'), tinymce.isIE && !window.getSelection ? 'border: #00ff00 1px solid;' : 'border: 1px solid #00ff00;'); // IE has a separate output
+
+ dom.get('test').innerHTML = '
';
+ equal(dom.getAttrib('test2', 'style'), 'background-image: url(\'Xhttp://www.site.com/test.gifY\');');
+
+ DOM.remove('test');
+ });
+
+ test('addClass', 10, function() {
+ DOM.add(document.body, 'div', {id : 'test'});
+
+ DOM.get('test').className = '';
+ DOM.addClass('test', 'abc');
+ equal(DOM.get('test').className, 'abc');
+
+ DOM.get('test').className = '';
+ equal(DOM.addClass('test', 'abc'), 'abc');
+ equal(DOM.addClass(null, 'abc'), false);
+
+ DOM.addClass('test', '123');
+ equal(DOM.get('test').className, 'abc 123');
+
+ DOM.get('test').innerHTML = '
';
+ DOM.addClass(DOM.select('span', 'test'), 'abc');
+ equal(DOM.get('test2').className, 'abc');
+ equal(DOM.get('test3').className, 'abc');
+ equal(DOM.get('test4').className, 'abc');
+ DOM.get('test').innerHTML = '';
+
+ DOM.get('test').innerHTML = '
';
+ DOM.addClass(['test2', 'test3', 'test4'], 'abc');
+ equal(DOM.get('test2').className, 'abc');
+ equal(DOM.get('test3').className, 'abc');
+ equal(DOM.get('test4').className, 'abc');
+ DOM.get('test').innerHTML = '';
+
+ DOM.remove('test');
+ });
+
+ test('removeClass', 4, function() {
+ DOM.add(document.body, 'div', {id : 'test'});
+
+ DOM.get('test').className = 'abc 123 xyz';
+ DOM.removeClass('test', '123');
+ equal(DOM.get('test').className, 'abc xyz');
+
+ DOM.get('test').innerHTML = '
';
+ DOM.removeClass(DOM.select('span', 'test'), 'test1');
+ equal(DOM.get('test2').className, '');
+ equal(DOM.get('test3').className, 'test test');
+ equal(DOM.get('test4').className, 'test');
+ DOM.get('test').innerHTML = '';
+
+ DOM.remove('test');
+ });
+
+ test('hasClass', 7, function() {
+ DOM.add(document.body, 'div', {id : 'test'});
+
+ DOM.get('test').className = 'abc 123 xyz';
+ ok(DOM.hasClass('test', 'abc'));
+ ok(DOM.hasClass('test', '123'));
+ ok(DOM.hasClass('test', 'xyz'));
+ ok(!DOM.hasClass('test', 'aaa'));
+
+ DOM.get('test').className = 'abc';
+ ok(DOM.hasClass('test', 'abc'));
+
+ DOM.get('test').className = 'aaa abc';
+ ok(DOM.hasClass('test', 'abc'));
+
+ DOM.get('test').className = 'abc aaa';
+ ok(DOM.hasClass('test', 'abc'));
+
+ DOM.remove('test');
+ });
+
+ test('add', 5, function() {
+ var e;
+
+ DOM.add(document.body, 'div', {id : 'test'});
+
+ DOM.add('test', 'span', {'class' : 'abc 123'}, 'content
abc ');
+ e = DOM.get('test').getElementsByTagName('span')[0];
+ equal(e.className, 'abc 123');
+ equal(e.innerHTML.toLowerCase(), 'content
abc ');
+ DOM.remove(e);
+
+ DOM.add('test', 'span', {'class' : 'abc 123'});
+ e = DOM.get('test').getElementsByTagName('span')[0];
+ equal(e.className, 'abc 123');
+ DOM.remove(e);
+
+ DOM.add('test', 'span');
+ e = DOM.get('test').getElementsByTagName('span')[0];
+ equal(e.nodeName, 'SPAN');
+ DOM.remove(e);
+
+ DOM.get('test').innerHTML = '
';
+ DOM.add(['test2', 'test3', 'test4'], 'span', {'class' : 'abc 123'});
+ equal(DOM.select('span', 'test').length, 6);
+
+ DOM.remove('test');
+ });
+
+ test('create', 3, function() {
+ var e;
+
+ e = DOM.create('span', {'class' : 'abc 123'}, 'content
abc ');
+
+ equal(e.nodeName, 'SPAN');
+ equal(e.className, 'abc 123');
+ equal(e.innerHTML.toLowerCase(), 'content
abc ');
+ });
+
+ test('createHTML', 4, function() {
+ equal(DOM.createHTML('span', {'id' : 'id1', 'class' : 'abc 123'}, 'content
abc '), '
content abc ');
+ equal(DOM.createHTML('span', {'id' : 'id1', 'class' : 'abc 123'}), '
');
+ equal(DOM.createHTML('span'), '
');
+ equal(DOM.createHTML('span', null, 'content
abc '), '
content abc ');
+ });
+
+ test('uniqueId', 3, function() {
+ DOM.counter = 0;
+
+ equal(DOM.uniqueId(), 'mce_0');
+ equal(DOM.uniqueId(), 'mce_1');
+ equal(DOM.uniqueId(), 'mce_2');
+ });
+
+ test('showHide', 10, function() {
+ DOM.add(document.body, 'div', {id : 'test'});
+
+ DOM.show('test');
+ equal(DOM.get('test').style.display, 'block');
+ ok(!DOM.isHidden('test'));
+
+ DOM.hide('test');
+ equal(DOM.get('test').style.display, 'none');
+ ok(DOM.isHidden('test'));
+
+ DOM.get('test').innerHTML = '
';
+ DOM.hide(['test2', 'test3', 'test4'], 'test');
+ equal(DOM.get('test2').style.display, 'none');
+ equal(DOM.get('test3').style.display, 'none');
+ equal(DOM.get('test4').style.display, 'none');
+
+ DOM.get('test').innerHTML = '
';
+ DOM.show(['test2', 'test3', 'test4'], 'test');
+ equal(DOM.get('test2').style.display, 'block');
+ equal(DOM.get('test3').style.display, 'block');
+ equal(DOM.get('test4').style.display, 'block');
+
+ // Cleanup
+ DOM.setAttrib('test', 'style', '');
+
+ DOM.remove('test');
+ });
+
+ test('select', 4, function() {
+ DOM.add(document.body, 'div', {id : 'test'});
+
+ DOM.setHTML('test', '
test 1
test 4
');
+ equal(DOM.select('div', 'test').length, 4);
+ ok(DOM.select('div', 'test').reverse);
+
+ DOM.setHTML('test', '
test 1
test 4
')
+ equal(DOM.select('div.test2', 'test').length, 2);
+
+ DOM.setHTML('test', '
test 1
test 4
')
+ equal(DOM.select('div div', 'test').length, 1, null, tinymce.isWebKit); // Issue: http://bugs.webkit.org/show_bug.cgi?id=17461
+ //alert(DOM.select('div div', 'test').length +","+DOM.get('test').querySelectorAll('div div').length);
+
+ DOM.remove('test');
+ });
+
+ test('is', 3, function() {
+ DOM.add(document.body, 'div', {id : 'test'});
+ DOM.setHTML('test', '
test 1
');
+
+ ok(DOM.is(DOM.get('textX'), 'div'));
+ ok(DOM.is(DOM.get('textX'), 'div#textX.test'));
+ ok(!DOM.is(DOM.get('textX'), 'div#textX2'));
+
+ DOM.remove('test');
+ });
+
+ test('encode', 1, function() {
+ equal(DOM.encode('abc<>"&\'\u00e5\u00e4\u00f6'), 'abc<>"&'\u00e5\u00e4\u00f6');
+ });
+
+ test('setGetAttrib', 16, function() {
+ var dom;
+
+ DOM.add(document.body, 'div', {id : 'test'});
+
+ DOM.setAttrib('test', 'class', 'test 123');
+ equal(DOM.getAttrib('test', 'class'), 'test 123');
+
+ DOM.setAttrib('test', 'src', 'url');
+ equal(DOM.getAttrib('test', 'src'), 'url');
+ equal(DOM.getAttrib('test', 'data-mce-src'), 'url');
+ equal(DOM.getAttrib('test', 'abc'), '');
+
+ DOM.setAttribs('test', {'class' : '123', title : 'abc'});
+ equal(DOM.getAttrib('test', 'class'), '123');
+ equal(DOM.getAttrib('test', 'title'), 'abc');
+
+ DOM.setAttribs('test');
+ equal(DOM.getAttrib('test', 'class'), '123');
+ equal(DOM.getAttrib('test', 'title'), 'abc');
+
+ dom = new tinymce.dom.DOMUtils(document, {keep_values : true, url_converter : function(u, n, e) {
+ return '&<>"' + u + '&<>"' + n;
+ }});
+
+ dom.setAttribs('test', {src : '123', href : 'abc'});
+ equal(DOM.getAttrib('test', 'src'), '&<>"123&<>"src');
+ equal(DOM.getAttrib('test', 'href'), '&<>"abc&<>"href');
+
+ DOM.get('test').innerHTML = '
';
+ DOM.setAttribs(['test2', 'test3', 'test4'], {test1 : "1", test2 : "2"});
+ equal(DOM.getAttrib('test2', 'test1'), '1');
+ equal(DOM.getAttrib('test3', 'test2'), '2');
+ equal(DOM.getAttrib('test4', 'test1'), '1');
+
+ equal(DOM.getAttrib(document, 'test'), false);
+ equal(DOM.getAttrib(document, 'test', ''), '');
+ equal(DOM.getAttrib(document, 'test', 'x'), 'x');
+
+ DOM.remove('test');
+ });
+
+ test('getAttribs', 2, function() {
+ var dom;
+
+ function check(obj, val) {
+ var count = 0;
+
+ val = val.split(',');
+
+ tinymce.each(obj, function(o) {
+ if (tinymce.inArray(val, o.nodeName.toLowerCase()) != -1 && o.specified)
+ count++;
+ });
+
+ return count == obj.length;
+ };
+
+ DOM.add(document.body, 'div', {id : 'test'});
+
+ DOM.get('test').innerHTML = '
';
+ ok(check(DOM.getAttribs('test2'), 'id,class'));
+
+ DOM.get('test').innerHTML = '
';
+ ok(check(DOM.getAttribs('test2'), 'id,type,name,value,disabled,readonly,checked'), 'Expected attributed: type,name,disabled,readonly,checked');
+
+ DOM.remove('test');
+ });
+
+ test('setGetStyles', 7, function() {
+ DOM.add(document.body, 'div', {id : 'test'});
+
+ DOM.setStyle('test', 'font-size', '20px');
+ equal(DOM.getStyle('test', 'font-size'), '20px', null, tinymce.isWebKit);
+
+ DOM.setStyle('test', 'fontSize', '21px');
+ equal(DOM.getStyle('test', 'fontSize'), '21px', null, tinymce.isWebKit);
+
+ DOM.setStyles('test', {fontSize : '22px', display : 'inline'});
+ equal(DOM.getStyle('test', 'fontSize'), '22px', null, tinymce.isWebKit);
+ equal(DOM.getStyle('test', 'display'), 'inline', null, tinymce.isWebKit);
+
+ DOM.get('test').innerHTML = '
';
+ DOM.setStyles(['test2', 'test3', 'test4'], {fontSize : "22px"});
+ equal(DOM.getStyle('test2', 'fontSize'), '22px');
+ equal(DOM.getStyle('test3', 'fontSize'), '22px');
+ equal(DOM.getStyle('test4', 'fontSize'), '22px');
+
+ DOM.setAttrib('test', 'style', '');
+
+ DOM.remove('test');
+ });
+
+ test('getPos', 2, function() {
+ DOM.add(document.body, 'div', {id : 'test'});
+
+ DOM.setStyles('test', {position : 'absolute', left : 100, top : 110});
+ equal(DOM.getPos('test').x, 100);
+ equal(DOM.getPos('test').y, 110);
+
+ DOM.setAttrib('test', 'style', '');
+
+ DOM.remove('test');
+ });
+
+ test('getParent', 6, function() {
+ DOM.add(document.body, 'div', {id : 'test'});
+
+ DOM.get('test').innerHTML = '
';
+
+ equal(DOM.getParent('test2', function(n) {return n.nodeName == 'SPAN';}).nodeName, 'SPAN');
+ equal(DOM.getParent('test2', function(n) {return n.nodeName == 'BODY';}).nodeName, 'BODY');
+ equal(DOM.getParent('test2', function(n) {return n.nodeName == 'BODY';}, document.body), null);
+ equal(DOM.getParent('test2', function(n) {return false;}), null);
+ equal(DOM.getParent('test2', 'SPAN').nodeName, 'SPAN');
+ equal(DOM.getParent('test2', 'body', DOM.get('test')), null);
+
+ DOM.get('test').innerHTML = '';
+
+ DOM.remove('test');
+ });
+
+ test('getParents', 4, function() {
+ DOM.add(document.body, 'div', {id : 'test'});
+ DOM.get('test').innerHTML = '
';
+
+ equal(DOM.getParents('test2', function(n) {return n.nodeName == 'SPAN';}).length, 2);
+ equal(DOM.getParents('test2', 'span').length, 2);
+ equal(DOM.getParents('test2', 'span.test').length, 1);
+ equal(DOM.getParents('test2', 'body', DOM.get('test')).length, 0);
+
+ DOM.remove('test');
+ });
+
+ test('is', 2, function() {
+ DOM.add(document.body, 'div', {id : 'test'});
+ DOM.get('test').innerHTML = '
';
+
+ ok(DOM.is(DOM.select('span', 'test'), 'span'));
+ ok(DOM.is(DOM.select('#test2', 'test'), '#test2'));
+
+ DOM.remove('test');
+ });
+
+ test('getViewPort', 4, function() {
+ var wp;
+
+ wp = DOM.getViewPort();
+ equal(wp.x, 0);
+ equal(wp.y, 0);
+ ok(wp.w > 0);
+ ok(wp.h > 0);
+ });
+
+ test('getRect', 5, function() {
+ var r;
+
+ DOM.add(document.body, 'div', {id : 'test'});
+
+ DOM.setStyles('test', {position : 'absolute', left : 100, top : 110, width : 320, height : 240});
+ r = DOM.getRect('test');
+ equal(r.x, 100);
+ equal(r.y, 110);
+ equal(r.w, 320);
+ equal(r.h, 240);
+
+ DOM.setAttrib('test', 'style', '');
+
+ DOM.get('test').innerHTML = '
';
+ r = DOM.getRect('test2');
+ equal(r.w, 160);
+
+ DOM.remove('test');
+ });
+
+ test('getSize', 2, function() {
+ var r;
+
+ DOM.add(document.body, 'div', {id : 'test'});
+
+ DOM.get('test').innerHTML = '
';
+ r = DOM.getSize('test2');
+ equal(r.w, 160);
+
+ DOM.get('test').innerHTML = '
';
+ r = DOM.getSize('test2');
+ equal(r.w, 100);
+
+ DOM.remove('test');
+ });
+
+ test('getNext', 5, function() {
+ var r;
+
+ DOM.add(document.body, 'div', {id : 'test'});
+
+ DOM.get('test').innerHTML = '
A B C ';
+ equal(DOM.getNext(DOM.get('test').firstChild, '*').nodeName, 'SPAN');
+ equal(DOM.getNext(DOM.get('test').firstChild, 'em').nodeName, 'EM');
+ equal(DOM.getNext(DOM.get('test').firstChild, 'div'), null);
+ equal(DOM.getNext(null, 'div'), null);
+ equal(DOM.getNext(DOM.get('test').firstChild, function(n) {return n.nodeName == 'EM'}).nodeName, 'EM');
+
+ DOM.remove('test');
+ });
+
+ test('getPrev', 5, function() {
+ var r;
+
+ DOM.add(document.body, 'div', {id : 'test'});
+
+ DOM.get('test').innerHTML = '
A B C ';
+ equal(DOM.getPrev(DOM.get('test').lastChild, '*').nodeName, 'SPAN');
+ equal(DOM.getPrev(DOM.get('test').lastChild, 'strong').nodeName, 'STRONG');
+ equal(DOM.getPrev(DOM.get('test').lastChild, 'div'), null);
+ equal(DOM.getPrev(null, 'div'), null);
+ equal(DOM.getPrev(DOM.get('test').lastChild, function(n) {return n.nodeName == 'STRONG'}).nodeName, 'STRONG');
+
+ DOM.remove('test');
+ });
+
+ test('loadCSS', 1, function() {
+ var c = 0;
+
+ DOM.loadCSS('css/test.css?a=1,css/test.css?a=2,css/test.css?a=3');
+
+ tinymce.each(document.getElementsByTagName('link'), function(n) {
+ if (n.href.indexOf('test.css?a=') != -1)
+ c++;
+ });
+
+ equal(c, 3, null, tinymce.isOpera);
+ });
+
+ test('insertAfter', 2, function() {
+ DOM.add(document.body, 'div', {id : 'test'});
+
+ DOM.setHTML('test', '
');
+ DOM.insertAfter(DOM.create('br'), 'test2');
+ equal(DOM.get('test2').nextSibling.nodeName, 'BR');
+
+ DOM.setHTML('test', '
test test ');
+ DOM.insertAfter(DOM.create('br'), 'test2');
+ equal(DOM.get('test2').nextSibling.nodeName, 'BR');
+
+ DOM.remove('test');
+ });
+
+ test('isBlock', 4, function() {
+ ok(DOM.isBlock(DOM.create('div')));
+ ok(DOM.isBlock('DIV'));
+ ok(!DOM.isBlock('SPAN'));
+ ok(DOM.isBlock('div'));
+ });
+
+ test('remove', 3, function() {
+ DOM.add(document.body, 'div', {id : 'test'});
+
+ DOM.setHTML('test', '
test test2 ');
+ DOM.remove('test2', 1);
+ equal(DOM.get('test').innerHTML.toLowerCase(), '
test test2 ');
+
+ DOM.setHTML('test', '
test test2 ');
+ equal(DOM.remove('test2').nodeName, 'SPAN');
+
+ DOM.get('test').innerHTML = '
';
+ DOM.remove(['test2', 'test4']);
+ equal(DOM.select('span', 'test').length, 1);
+
+ DOM.remove('test');
+ });
+
+ test('replace', 2, function() {
+ DOM.add(document.body, 'div', {id : 'test'});
+
+ DOM.setHTML('test', '
test test2 ');
+ DOM.replace(DOM.create('div', {id : 'test2'}), 'test2', 1);
+ equal(DOM.get('test2').innerHTML.toLowerCase(), '
test test2 ');
+
+ DOM.setHTML('test', '
test test2 ');
+ DOM.replace(DOM.create('div', {id : 'test2'}), 'test2');
+ equal(DOM.get('test2').innerHTML, '');
+
+ DOM.remove('test');
+ });
+
+ test('toHex', 5, function() {
+ equal(DOM.toHex('rgb(0, 255, 255)'), '#00ffff');
+ equal(DOM.toHex('rgb(255, 0, 0)'), '#ff0000');
+ equal(DOM.toHex('rgb(0, 0, 255)'), '#0000ff');
+ equal(DOM.toHex('rgb ( 0 , 0 , 255 ) '), '#0000ff');
+ equal(DOM.toHex(' RGB ( 0 , 0 , 255 ) '), '#0000ff');
+ });
+
+ test('getOuterHTML', 4, function() {
+ DOM.add(document.body, 'div', {id : 'test'});
+
+ DOM.setHTML('test', '
test test2 ');
+ equal(DOM.getOuterHTML('test2').toLowerCase().replace(/\"/g, ''), '
test test2 ');
+
+ DOM.setHTML('test', '
test test2 ');
+ DOM.setOuterHTML('test2', '
123
');
+ equal(tinymce.trim(DOM.getOuterHTML('test2') || '').toLowerCase().replace(/\"/g, ''), '
123
');
+
+ DOM.setHTML('test', '
test test2 ');
+ DOM.setOuterHTML('test2', '
123
abc
');
+ equal(tinymce.trim(DOM.get('test').innerHTML).toLowerCase().replace(/>\s+<').replace(/\"/g, ''), '
123
abc
');
+
+ DOM.setHTML('test', 'test');
+ equal(tinymce.trim(DOM.getOuterHTML(DOM.get('test').firstChild)), 'test');
+
+ DOM.remove('test');
+ });
+
+ test('encodeDecode', 2, function() {
+ equal(DOM.encode('\u00e5\u00e4\u00f6&<>"'), '\u00e5\u00e4\u00f6&<>"');
+ equal(DOM.decode('åäö&<>"'), '\u00e5\u00e4\u00f6&<>"');
+ });
+
+ test('split', 2, function() {
+ var point, parent;
+ DOM.add(document.body, 'div', {id : 'test'});
+
+ DOM.setHTML('test', '
text1inner text2
');
+ parent = DOM.select('p', DOM.get('test'))[0];
+ point = DOM.select('span', DOM.get('test'))[0];
+ DOM.split(parent, point);
+ equal(DOM.get('test').innerHTML.toLowerCase().replace(/\s+/g, ''), '
text1
inner text2
');
+
+ DOM.setHTML('test', '
');
+ parent = DOM.select('li:nth-child(1)', DOM.get('test'))[0];
+ point = DOM.select('ul li:nth-child(2)', DOM.get('test'))[0];
+ DOM.split(parent, point);
+ equal(cleanHtml(DOM.get('test').innerHTML), '
');
+
+ DOM.remove('test');
+ });
+
+ test('nodeIndex', 5, function() {
+ DOM.add(document.body, 'div', {id : 'test'}, 'abc
abc abc');
+
+ equal(DOM.nodeIndex(DOM.get('test').childNodes[0]), 0, 'Index of first child.');
+ equal(DOM.nodeIndex(DOM.get('test').childNodes[1]), 1, 'Index of second child.');
+ equal(DOM.nodeIndex(DOM.get('test').childNodes[2]), 2, 'Index of third child.');
+
+ DOM.get('test').insertBefore(DOM.doc.createTextNode('a'), DOM.get('test').firstChild);
+ DOM.get('test').insertBefore(DOM.doc.createTextNode('b'), DOM.get('test').firstChild);
+
+ equal(DOM.nodeIndex(DOM.get('test').lastChild), 4, 'Index of last child with fragmented DOM.');
+ equal(DOM.nodeIndex(DOM.get('test').lastChild, true), 2, 'Normalized index of last child with fragmented DOM.');
+
+ DOM.remove('test');
+ });
+
+ test('isEmpty', 14, function() {
+ DOM.schema = new tinymce.html.Schema(); // A schema will be added when used within a editor instance
+ DOM.add(document.body, 'div', {id : 'test'}, '');
+
+ ok(DOM.isEmpty(DOM.get('test')), 'No children');
+
+ DOM.setHTML('test', '
');
+ ok(DOM.isEmpty(DOM.get('test')), 'Br child');
+
+ DOM.setHTML('test', '
');
+ ok(!DOM.isEmpty(DOM.get('test')), 'Br children');
+
+ DOM.setHTML('test', 'text');
+ ok(!DOM.isEmpty(DOM.get('test')), 'Text child');
+
+ DOM.setHTML('test', '
text ');
+ ok(!DOM.isEmpty(DOM.get('test')), 'Text child in span');
+
+ DOM.setHTML('test', '
');
+ ok(DOM.isEmpty(DOM.get('test')), 'Empty span child');
+
+ DOM.setHTML('test', '
');
+ ok(DOM.isEmpty(DOM.get('test')), 'Empty complex HTML');
+
+ DOM.setHTML('test', '
X
');
+ ok(!DOM.isEmpty(DOM.get('test')), 'Non empty complex HTML');
+
+ DOM.setHTML('test', '
');
+ ok(DOM.isEmpty(DOM.get('test')), 'Non empty complex HTML with space');
+
+ DOM.setHTML('test', '
');
+ ok(!DOM.isEmpty(DOM.get('test')), 'Non empty complex HTML with achor name');
+
+ DOM.setHTML('test', '
');
+ ok(!DOM.isEmpty(DOM.get('test')), 'Non empty html with img element');
+
+ DOM.setHTML('test', '
');
+ ok(!DOM.isEmpty(DOM.get('test')), 'Span with bookmark attribute.');
+
+ DOM.setHTML('test', '
');
+ ok(DOM.isEmpty(DOM.get('test')), 'Span with data-mce attribute.');
+
+ DOM.setHTML('test', '
');
+ ok(!DOM.isEmpty(DOM.get('test')), 'Element with comment.');
+
+ DOM.remove('test');
+ });
+
+ test('isEmpty on P with BR in EM', function() {
+ var elm = DOM.create('p', null, '
');
+ ok(DOM.isEmpty(elm, 'No children'));
+ });
+
+ test('isEmpty on P with two BR in EM', function() {
+ var elm = DOM.create('p', null, '
');
+ equal(false, DOM.isEmpty(elm));
+ });
+
+ test('bind/unbind/fire', function() {
+ var count = 0;
+
+ DOM.bind(document, 'click', function() {count++;});
+ DOM.fire(document, 'click');
+ DOM.unbind(document, 'click');
+ equal(count, 1);
+
+ count = 0;
+ DOM.bind([document, window], 'click', function(e) {e.stopPropagation(); count++;});
+ DOM.fire(document, 'click');
+ DOM.fire(window, 'click');
+ DOM.unbind([document, window], 'click');
+ equal(count, 2);
+
+ count = 0;
+ DOM.fire(document, 'click');
+ DOM.fire(window, 'click');
+ equal(count, 0);
+ });
+
+ DOM.remove('test');
+})();
diff --git a/tests/qunit/editor/tinymce/dom/DOMUtils_jquery.html b/tests/qunit/editor/tinymce/dom/DOMUtils_jquery.html
new file mode 100644
index 0000000000..f9086822e6
--- /dev/null
+++ b/tests/qunit/editor/tinymce/dom/DOMUtils_jquery.html
@@ -0,0 +1,29 @@
+
+
+
+
Unit tests for tinymce.dom.DOMUtils
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/dom/EventUtils.html b/tests/qunit/editor/tinymce/dom/EventUtils.html
new file mode 100644
index 0000000000..b2d65be5fc
--- /dev/null
+++ b/tests/qunit/editor/tinymce/dom/EventUtils.html
@@ -0,0 +1,459 @@
+
+
+
+
Unit tests for the EventUtils class
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/dom/Range.html b/tests/qunit/editor/tinymce/dom/Range.html
new file mode 100644
index 0000000000..c8750377ea
--- /dev/null
+++ b/tests/qunit/editor/tinymce/dom/Range.html
@@ -0,0 +1,606 @@
+
+
+
+
Unit tests for DOM Range IE implementation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
first strong strong second em strong.
+
bar
+
some text em text more text
+
+
+ 1
+ abc
+
+
+ 3
+ 4
+
+
+
textabcspan
+
+
+
diff --git a/tests/qunit/editor/tinymce/dom/Selection.html b/tests/qunit/editor/tinymce/dom/Selection.html
new file mode 100644
index 0000000000..b004f884af
--- /dev/null
+++ b/tests/qunit/editor/tinymce/dom/Selection.html
@@ -0,0 +1,878 @@
+
+
+
+
Unit tests for tinymce.dom.Selection
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/dom/Serializer.html b/tests/qunit/editor/tinymce/dom/Serializer.html
new file mode 100644
index 0000000000..1a5310f364
--- /dev/null
+++ b/tests/qunit/editor/tinymce/dom/Serializer.html
@@ -0,0 +1,515 @@
+
+
+
+
Unit tests for tinymce.dom.Serializer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/dom/TridentSelection.html b/tests/qunit/editor/tinymce/dom/TridentSelection.html
new file mode 100644
index 0000000000..3d5cb87cbb
--- /dev/null
+++ b/tests/qunit/editor/tinymce/dom/TridentSelection.html
@@ -0,0 +1,586 @@
+
+
+
+
Unit tests for DOM Selection IE implementation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/dom/test.css b/tests/qunit/editor/tinymce/dom/test.css
new file mode 100644
index 0000000000..dbfc43aee4
--- /dev/null
+++ b/tests/qunit/editor/tinymce/dom/test.css
@@ -0,0 +1,120 @@
+body, div, h1 { font-family: 'trebuchet ms', verdana, arial; margin: 0; padding: 0 }
+body {font-size: 10pt; }
+h1 { padding: 15px; font-size: large; background-color: #06b; color: white; }
+h1 a { color: white; }
+h2 { padding: 10px; background-color: #eee; color: black; margin: 0; font-size: small; font-weight: normal }
+
+.pass { color: green; }
+.fail { color: red; }
+p.result { margin-left: 1em; }
+
+#banner { height: 2em; border-bottom: 1px solid white; }
+h2.pass { background-color: green; }
+h2.fail { background-color: red; }
+
+div.testrunner-toolbar { background: #eee; border-top: 1px solid black; padding: 10px; }
+
+ol#tests > li > strong { cursor:pointer; }
+
+div#fx-tests h4 {
+ background: red;
+}
+
+div#fx-tests h4.pass {
+ background: green;
+}
+
+div#fx-tests div.box {
+ background: red url(data/cow.jpg) no-repeat;
+ overflow: hidden;
+ border: 2px solid #000;
+}
+
+div#fx-tests div.overflow {
+ overflow: visible;
+}
+
+div.inline {
+ display: inline;
+}
+
+div.autoheight {
+ height: auto;
+}
+
+div.autowidth {
+ width: auto;
+}
+
+div.autoopacity {
+ opacity: auto;
+}
+
+div.largewidth {
+ width: 100px;
+}
+
+div.largeheight {
+ height: 100px;
+}
+
+div.largeopacity {
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100);
+}
+
+div.medwidth {
+ width: 50px;
+}
+
+div.medheight {
+ height: 50px;
+}
+
+div.medopacity {
+ opacity: 0.5;
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity=50);
+}
+
+div.nowidth {
+ width: 0px;
+}
+
+div.noheight {
+ height: 0px;
+}
+
+div.noopacity {
+ opacity: 0;
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);
+}
+
+div.hidden {
+ display: none;
+}
+
+div#fx-tests div.widewidth {
+ background-repeat: repeat-x;
+}
+
+div#fx-tests div.wideheight {
+ background-repeat: repeat-y;
+}
+
+div#fx-tests div.widewidth.wideheight {
+ background-repeat: repeat;
+}
+
+div#fx-tests div.noback {
+ background-image: none;
+}
+
+div.chain, div.chain div { width: 100px; height: 20px; position: relative; float: left; }
+div.chain div { position: absolute; top: 0px; left: 0px; }
+
+div.chain.test { background: red; }
+div.chain.test div { background: green; }
+
+div.chain.out { background: green; }
+div.chain.out div { background: red; display: none; }
+
+div#show-tests * { display: none; }
diff --git a/tests/qunit/editor/tinymce/dom/tests.js b/tests/qunit/editor/tinymce/dom/tests.js
new file mode 100644
index 0000000000..a31786a801
--- /dev/null
+++ b/tests/qunit/editor/tinymce/dom/tests.js
@@ -0,0 +1,12 @@
+{
+ "title": "tinymce.dom",
+ "tests": [
+ {"title": "DOMUtils", "url": "DOMUtils.html"},
+ {"title": "DOMUtils (jQuery)", "url": "DOMUtils_jquery.html"},
+ {"title": "EventUtils", "url": "EventUtils.html"},
+ {"title": "Range (IE/Native)", "url": "Range.html"},
+ {"title": "Selection", "url": "Selection.html"},
+ {"title": "Serializer", "url": "Serializer.html"},
+ {"title": "TridentSelection (IE)", "url": "TridentSelection.html"}
+ ]
+}
diff --git a/tests/qunit/editor/tinymce/html/DomParser.html b/tests/qunit/editor/tinymce/html/DomParser.html
new file mode 100644
index 0000000000..a79b84ea0b
--- /dev/null
+++ b/tests/qunit/editor/tinymce/html/DomParser.html
@@ -0,0 +1,506 @@
+
+
+
+
tinymce.html.DomParser tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/html/Entities.html b/tests/qunit/editor/tinymce/html/Entities.html
new file mode 100644
index 0000000000..3715245915
--- /dev/null
+++ b/tests/qunit/editor/tinymce/html/Entities.html
@@ -0,0 +1,98 @@
+
+
+
+
tinymce.html.Entities tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/html/Node.html b/tests/qunit/editor/tinymce/html/Node.html
new file mode 100644
index 0000000000..e3cd5a9a6e
--- /dev/null
+++ b/tests/qunit/editor/tinymce/html/Node.html
@@ -0,0 +1,466 @@
+
+
+
+
tinymce.html.Node tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/html/SaxParser.html b/tests/qunit/editor/tinymce/html/SaxParser.html
new file mode 100644
index 0000000000..584995667c
--- /dev/null
+++ b/tests/qunit/editor/tinymce/html/SaxParser.html
@@ -0,0 +1,616 @@
+
+
+
+
tinymce.html.SaxParser tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/html/Schema.html b/tests/qunit/editor/tinymce/html/Schema.html
new file mode 100644
index 0000000000..62ce0be2a6
--- /dev/null
+++ b/tests/qunit/editor/tinymce/html/Schema.html
@@ -0,0 +1,374 @@
+
+
+
+
tinymce.html.Schema tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/html/Serializer.html b/tests/qunit/editor/tinymce/html/Serializer.html
new file mode 100644
index 0000000000..ba8bf091a6
--- /dev/null
+++ b/tests/qunit/editor/tinymce/html/Serializer.html
@@ -0,0 +1,46 @@
+
+
+
+
tinymce.html.Serializer tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/html/Styles.html b/tests/qunit/editor/tinymce/html/Styles.html
new file mode 100644
index 0000000000..7c737c9b41
--- /dev/null
+++ b/tests/qunit/editor/tinymce/html/Styles.html
@@ -0,0 +1,176 @@
+
+
+
+
tinymce.html.Styles tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/html/Writer.html b/tests/qunit/editor/tinymce/html/Writer.html
new file mode 100644
index 0000000000..9516ee0480
--- /dev/null
+++ b/tests/qunit/editor/tinymce/html/Writer.html
@@ -0,0 +1,174 @@
+
+
+
+
tinymce.html.Writer tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/html/obsolete.html b/tests/qunit/editor/tinymce/html/obsolete.html
new file mode 100644
index 0000000000..aed9260fa9
--- /dev/null
+++ b/tests/qunit/editor/tinymce/html/obsolete.html
@@ -0,0 +1,294 @@
+
+
+
+
Support for obsolete tags and attributes in the default HTML 5.0 schema
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/html/tests.js b/tests/qunit/editor/tinymce/html/tests.js
new file mode 100644
index 0000000000..266c7e9141
--- /dev/null
+++ b/tests/qunit/editor/tinymce/html/tests.js
@@ -0,0 +1,14 @@
+{
+ "title": "tinymce.html",
+ "tests": [
+ {"title": "DomParser", "url": "DomParser.html"},
+ {"title": "Entities", "url": "Entities.html"},
+ {"title": "Node", "url": "Node.html"},
+ {"title": "SaxParser", "url": "SaxParser.html"},
+ {"title": "Schema", "url": "Schema.html"},
+ {"title": "Serializer", "url": "Serializer.html"},
+ {"title": "Styles", "url": "Styles.html"},
+ {"title": "Writer", "url": "Writer.html"},
+ {"title": "Obsolete tags and attributes", "url": "obsolete.html"}
+ ]
+}
diff --git a/tests/qunit/editor/tinymce/tests.js b/tests/qunit/editor/tinymce/tests.js
new file mode 100644
index 0000000000..9e961b6305
--- /dev/null
+++ b/tests/qunit/editor/tinymce/tests.js
@@ -0,0 +1,15 @@
+{
+ "title": "tinymce",
+ "tests": [
+ {"title": "Editor", "url": "Editor.html"},
+ {"title": "EditorCommands", "url": "EditorCommands.html"},
+ {"title": "EnterKey", "url": "EnterKey.html"},
+ {"title": "ForceBlocks", "url": "ForceBlocks.html"},
+ {"title": "Formatter (Apply)", "url": "Formatter_apply.html"},
+ {"title": "Formatter (Remove)", "url": "Formatter_remove.html"},
+ {"title": "Formatter (Check)", "url": "Formatter_check.html"},
+ {"title": "Formatter (jsrobot)", "url": "Formatter_robot.html", "jsrobot":true},
+ {"title": "UndoManager", "url": "UndoManager.html"},
+ {"title": "Undo", "url": "UndoManager_robot.html", "jsrobot": true}
+ ]
+}
diff --git a/tests/qunit/editor/tinymce/ui/AbsoluteLayout.html b/tests/qunit/editor/tinymce/ui/AbsoluteLayout.html
new file mode 100644
index 0000000000..4fa6cd7d84
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/AbsoluteLayout.html
@@ -0,0 +1,63 @@
+
+
+
+
+
ui.AbsoluteLayout Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/Button.html b/tests/qunit/editor/tinymce/ui/Button.html
new file mode 100644
index 0000000000..51c62319ef
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/Button.html
@@ -0,0 +1,133 @@
+
+
+
+
+
Button Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/ButtonGroup.html b/tests/qunit/editor/tinymce/ui/ButtonGroup.html
new file mode 100644
index 0000000000..3b59e12c47
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/ButtonGroup.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.ButtonGroup Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/Checkbox.html b/tests/qunit/editor/tinymce/ui/Checkbox.html
new file mode 100644
index 0000000000..2674930a3d
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/Checkbox.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.Checkbox Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/Collection.html b/tests/qunit/editor/tinymce/ui/Collection.html
new file mode 100644
index 0000000000..dfcb1001c5
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/Collection.html
@@ -0,0 +1,273 @@
+
+
+
+
+
Collection Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/ColorButton.html b/tests/qunit/editor/tinymce/ui/ColorButton.html
new file mode 100644
index 0000000000..8a34d49777
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/ColorButton.html
@@ -0,0 +1,132 @@
+
+
+
+
+
Button Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/ComboBox.html b/tests/qunit/editor/tinymce/ui/ComboBox.html
new file mode 100644
index 0000000000..09972eef48
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/ComboBox.html
@@ -0,0 +1,49 @@
+
+
+
+
+
ui.ComboBox Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/Container.html b/tests/qunit/editor/tinymce/ui/Container.html
new file mode 100644
index 0000000000..a3f18b7d5a
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/Container.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.Container Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/Control.html b/tests/qunit/editor/tinymce/ui/Control.html
new file mode 100644
index 0000000000..7720d3d0c4
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/Control.html
@@ -0,0 +1,229 @@
+
+
+
+
+
Control Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/DragHelper.html b/tests/qunit/editor/tinymce/ui/DragHelper.html
new file mode 100644
index 0000000000..5b8f910e56
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/DragHelper.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.DragHelper Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/ElementPath.html b/tests/qunit/editor/tinymce/ui/ElementPath.html
new file mode 100644
index 0000000000..85d514c432
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/ElementPath.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.ElementPath Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/Factory.html b/tests/qunit/editor/tinymce/ui/Factory.html
new file mode 100644
index 0000000000..3bb2ff7aed
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/Factory.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.Factory Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/FieldSet.html b/tests/qunit/editor/tinymce/ui/FieldSet.html
new file mode 100644
index 0000000000..fa61533fb4
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/FieldSet.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.FieldSet Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/FilePicker.html b/tests/qunit/editor/tinymce/ui/FilePicker.html
new file mode 100644
index 0000000000..fbf10ca22b
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/FilePicker.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.FilePicker Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/FitLayout.html b/tests/qunit/editor/tinymce/ui/FitLayout.html
new file mode 100644
index 0000000000..ecae41b288
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/FitLayout.html
@@ -0,0 +1,87 @@
+
+
+
+
+
ui.FitLayout Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/FlexLayout.html b/tests/qunit/editor/tinymce/ui/FlexLayout.html
new file mode 100644
index 0000000000..a709dbd538
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/FlexLayout.html
@@ -0,0 +1,915 @@
+
+
+
+
+
ui.FlexLayout Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/FloatPanel.html b/tests/qunit/editor/tinymce/ui/FloatPanel.html
new file mode 100644
index 0000000000..706e8c5b72
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/FloatPanel.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.FloatPanel Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/FlowLayout.html b/tests/qunit/editor/tinymce/ui/FlowLayout.html
new file mode 100644
index 0000000000..2e1a0c8970
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/FlowLayout.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.FlowLayout Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/Form.html b/tests/qunit/editor/tinymce/ui/Form.html
new file mode 100644
index 0000000000..0a79072704
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/Form.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.Form Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/FormItem.html b/tests/qunit/editor/tinymce/ui/FormItem.html
new file mode 100644
index 0000000000..c506d5f21b
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/FormItem.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.FormItem Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/GridLayout.html b/tests/qunit/editor/tinymce/ui/GridLayout.html
new file mode 100644
index 0000000000..8724cfc0c2
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/GridLayout.html
@@ -0,0 +1,244 @@
+
+
+
+
+
ui.GridLayout Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/Iframe.html b/tests/qunit/editor/tinymce/ui/Iframe.html
new file mode 100644
index 0000000000..7c2186a4b4
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/Iframe.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.Iframe Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/KeyboardNavigation.html b/tests/qunit/editor/tinymce/ui/KeyboardNavigation.html
new file mode 100644
index 0000000000..f7f289b812
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/KeyboardNavigation.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.KeyboardNavigation Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/Label.html b/tests/qunit/editor/tinymce/ui/Label.html
new file mode 100644
index 0000000000..8ef0a538e6
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/Label.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.Label Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/Layout.html b/tests/qunit/editor/tinymce/ui/Layout.html
new file mode 100644
index 0000000000..7209e6bab4
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/Layout.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.Layout Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/ListBox.html b/tests/qunit/editor/tinymce/ui/ListBox.html
new file mode 100644
index 0000000000..44f79b39d2
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/ListBox.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.ListBox Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/Menu.html b/tests/qunit/editor/tinymce/ui/Menu.html
new file mode 100644
index 0000000000..42843c6f2c
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/Menu.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.Menu Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/MenuBar.html b/tests/qunit/editor/tinymce/ui/MenuBar.html
new file mode 100644
index 0000000000..61d0c6cd30
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/MenuBar.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.MenuBar Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/MenuButton.html b/tests/qunit/editor/tinymce/ui/MenuButton.html
new file mode 100644
index 0000000000..eb7415e570
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/MenuButton.html
@@ -0,0 +1,139 @@
+
+
+
+
+
ui.MenuButton Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/MenuItem.html b/tests/qunit/editor/tinymce/ui/MenuItem.html
new file mode 100644
index 0000000000..b6c06869a9
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/MenuItem.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.MenuItem Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/MessageBox.html b/tests/qunit/editor/tinymce/ui/MessageBox.html
new file mode 100644
index 0000000000..20ddc8a3ca
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/MessageBox.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.MessageBox Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/Movable.html b/tests/qunit/editor/tinymce/ui/Movable.html
new file mode 100644
index 0000000000..d62ea1638d
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/Movable.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.Movable Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/Panel.html b/tests/qunit/editor/tinymce/ui/Panel.html
new file mode 100644
index 0000000000..7e383c3a9a
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/Panel.html
@@ -0,0 +1,67 @@
+
+
+
+
+
ui.Panel
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/PanelButton.html b/tests/qunit/editor/tinymce/ui/PanelButton.html
new file mode 100644
index 0000000000..0b1d66e768
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/PanelButton.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.PanelButton Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/Path.html b/tests/qunit/editor/tinymce/ui/Path.html
new file mode 100644
index 0000000000..56609f706b
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/Path.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.Path Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/Radio.html b/tests/qunit/editor/tinymce/ui/Radio.html
new file mode 100644
index 0000000000..ab95e781be
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/Radio.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.Radio Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/Resizable.html b/tests/qunit/editor/tinymce/ui/Resizable.html
new file mode 100644
index 0000000000..fcdd5d9e4a
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/Resizable.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.Resizable Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/ResizeHandle.html b/tests/qunit/editor/tinymce/ui/ResizeHandle.html
new file mode 100644
index 0000000000..95fd6ddaac
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/ResizeHandle.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.ResizeHandle Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/Scrollable.html b/tests/qunit/editor/tinymce/ui/Scrollable.html
new file mode 100644
index 0000000000..2d5df68257
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/Scrollable.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.Scrollable Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/Selector.html b/tests/qunit/editor/tinymce/ui/Selector.html
new file mode 100644
index 0000000000..5c0cb1ab81
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/Selector.html
@@ -0,0 +1,148 @@
+
+
+
+
+
ui.Selector Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/Spacer.html b/tests/qunit/editor/tinymce/ui/Spacer.html
new file mode 100644
index 0000000000..e62842a593
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/Spacer.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.Spacer Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/SplitButton.html b/tests/qunit/editor/tinymce/ui/SplitButton.html
new file mode 100644
index 0000000000..63e64396a4
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/SplitButton.html
@@ -0,0 +1,131 @@
+
+
+
+
+
ui.SplitButton Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/StackLayout.html b/tests/qunit/editor/tinymce/ui/StackLayout.html
new file mode 100644
index 0000000000..b1f680ff72
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/StackLayout.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.StackLayout Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/TabPanel.html b/tests/qunit/editor/tinymce/ui/TabPanel.html
new file mode 100644
index 0000000000..41c4b9712a
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/TabPanel.html
@@ -0,0 +1,164 @@
+
+
+
+
+
ui.TabPanel Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/TextBox.html b/tests/qunit/editor/tinymce/ui/TextBox.html
new file mode 100644
index 0000000000..cf0e93f469
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/TextBox.html
@@ -0,0 +1,59 @@
+
+
+
+
+
ui.TextBox Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/Throbber.html b/tests/qunit/editor/tinymce/ui/Throbber.html
new file mode 100644
index 0000000000..fa32591140
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/Throbber.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.Throbber Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/Toolbar.html b/tests/qunit/editor/tinymce/ui/Toolbar.html
new file mode 100644
index 0000000000..f0c00418b9
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/Toolbar.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.Toolbar Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/Tooltip.html b/tests/qunit/editor/tinymce/ui/Tooltip.html
new file mode 100644
index 0000000000..a01db34abe
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/Tooltip.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.Tooltip Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/Widget.html b/tests/qunit/editor/tinymce/ui/Widget.html
new file mode 100644
index 0000000000..77cf19edee
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/Widget.html
@@ -0,0 +1,43 @@
+
+
+
+
+
ui.Widget Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/Window.html b/tests/qunit/editor/tinymce/ui/Window.html
new file mode 100644
index 0000000000..de07e8fec7
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/Window.html
@@ -0,0 +1,118 @@
+
+
+
+
+
ui.Window
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/ui/css/ui-overrides.css b/tests/qunit/editor/tinymce/ui/css/ui-overrides.css
new file mode 100644
index 0000000000..3911d63f23
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/css/ui-overrides.css
@@ -0,0 +1,30 @@
+/* Hardcodes sizes since fonts vary on platforms */
+
+.mce-spacer {
+ width: 20px;
+ height: 20px;
+ visibility: visible;
+ border: 0 solid black;
+}
+
+.mce-head .mce-title {
+ width: 100px;
+ height: 20px;
+ display: inline-block;
+}
+
+.mce-btn .mce-txt {
+ width: 20px;
+}
+
+/* Colors used for debugging */
+
+.mce-red {background-color: red;}
+.mce-green {background-color: green;}
+.mce-blue {background-color: blue;}
+.mce-yellow {background-color: yellow;}
+.mce-magenta {background-color: magenta;}
+.mce-cyan {background-color: cyan;}
+.mce-dotted {background-image: url(../img/raster.gif);}
+.mce-i-test {background: red;}
+
\ No newline at end of file
diff --git a/tests/qunit/editor/tinymce/ui/img/raster.gif b/tests/qunit/editor/tinymce/ui/img/raster.gif
new file mode 100644
index 0000000000..d901bc1a53
Binary files /dev/null and b/tests/qunit/editor/tinymce/ui/img/raster.gif differ
diff --git a/tests/qunit/editor/tinymce/ui/tests.js b/tests/qunit/editor/tinymce/ui/tests.js
new file mode 100644
index 0000000000..db7f74f3d8
--- /dev/null
+++ b/tests/qunit/editor/tinymce/ui/tests.js
@@ -0,0 +1,55 @@
+{
+ "title": "tinymce.ui",
+ "tests": [
+ {"title": "AbsoluteLayout", "url": "AbsoluteLayout.html"},
+ {"title": "Button", "url": "Button.html"},
+ {"title": "ButtonGroup", "url": "ButtonGroup.html"},
+ {"title": "Checkbox", "url": "Checkbox.html"},
+ {"title": "Collection", "url": "Collection.html"},
+ {"title": "ColorButton", "url": "ColorButton.html"},
+ {"title": "ComboBox", "url": "ComboBox.html"},
+ {"title": "Container", "url": "Container.html"},
+ {"title": "Control", "url": "Control.html"},
+ {"title": "DragHelper", "url": "DragHelper.html"},
+ {"title": "ElementPath", "url": "ElementPath.html"},
+ {"title": "Factory", "url": "Factory.html"},
+ {"title": "FieldSet", "url": "FieldSet.html"},
+ {"title": "FilePicker", "url": "FilePicker.html"},
+ {"title": "FitLayout", "url": "FitLayout.html"},
+ {"title": "FlexLayout", "url": "FlexLayout.html"},
+ {"title": "FloatPanel", "url": "FloatPanel.html"},
+ {"title": "FlowLayout", "url": "FlowLayout.html"},
+ {"title": "Form", "url": "Form.html"},
+ {"title": "FormItem", "url": "FormItem.html"},
+ {"title": "GridLayout", "url": "GridLayout.html"},
+ {"title": "Iframe", "url": "Iframe.html"},
+ {"title": "KeyboardNavigation", "url": "KeyboardNavigation.html"},
+ {"title": "Label", "url": "Label.html"},
+ {"title": "Layout", "url": "Layout.html"},
+ {"title": "ListBox", "url": "ListBox.html"},
+ {"title": "Menu", "url": "Menu.html"},
+ {"title": "MenuBar", "url": "MenuBar.html"},
+ {"title": "MenuButton", "url": "MenuButton.html"},
+ {"title": "MenuItem", "url": "MenuItem.html"},
+ {"title": "MessageBox", "url": "MessageBox.html"},
+ {"title": "Movable", "url": "Movable.html"},
+ {"title": "Panel", "url": "Panel.html"},
+ {"title": "PanelButton", "url": "PanelButton.html"},
+ {"title": "Path", "url": "Path.html"},
+ {"title": "Radio", "url": "Radio.html"},
+ {"title": "Resizable", "url": "Resizable.html"},
+ {"title": "ResizeHandle", "url": "ResizeHandle.html"},
+ {"title": "Scrollable", "url": "Scrollable.html"},
+ {"title": "Selector", "url": "Selector.html"},
+ {"title": "Spacer", "url": "Spacer.html"},
+ {"title": "SplitButton", "url": "SplitButton.html"},
+ {"title": "StackLayout", "url": "StackLayout.html"},
+ {"title": "TabPanel", "url": "TabPanel.html"},
+ {"title": "TextBox", "url": "TextBox.html"},
+ {"title": "Throbber", "url": "Throbber.html"},
+ {"title": "Toolbar", "url": "Toolbar.html"},
+ {"title": "Tooltip", "url": "Tooltip.html"},
+ {"title": "Widget", "url": "Widget.html"},
+ {"title": "Window", "url": "Window.html"}
+ ]
+}
diff --git a/tests/qunit/editor/tinymce/util/JSON.html b/tests/qunit/editor/tinymce/util/JSON.html
new file mode 100644
index 0000000000..a27f6acf51
--- /dev/null
+++ b/tests/qunit/editor/tinymce/util/JSON.html
@@ -0,0 +1,39 @@
+
+
+
+
tinymce.util.JSON tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/util/JSONRequest.html b/tests/qunit/editor/tinymce/util/JSONRequest.html
new file mode 100644
index 0000000000..4698f03385
--- /dev/null
+++ b/tests/qunit/editor/tinymce/util/JSONRequest.html
@@ -0,0 +1,77 @@
+
+
+
+
tinymce.util.JSONRequest tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/util/LocalStorage.html b/tests/qunit/editor/tinymce/util/LocalStorage.html
new file mode 100644
index 0000000000..2c405a6d0e
--- /dev/null
+++ b/tests/qunit/editor/tinymce/util/LocalStorage.html
@@ -0,0 +1,118 @@
+
+
+
+
tinymce.util.LocalStorage tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/util/Quirks_all.html b/tests/qunit/editor/tinymce/util/Quirks_all.html
new file mode 100644
index 0000000000..a64f93bf00
--- /dev/null
+++ b/tests/qunit/editor/tinymce/util/Quirks_all.html
@@ -0,0 +1,76 @@
+
+
+
+
All browser types Quirks
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/util/Quirks_firefox.html b/tests/qunit/editor/tinymce/util/Quirks_firefox.html
new file mode 100644
index 0000000000..01ebd756f5
--- /dev/null
+++ b/tests/qunit/editor/tinymce/util/Quirks_firefox.html
@@ -0,0 +1,75 @@
+
+
+
+
Firefox Quirks
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/util/Quirks_ie8.html b/tests/qunit/editor/tinymce/util/Quirks_ie8.html
new file mode 100644
index 0000000000..aa3f61e745
--- /dev/null
+++ b/tests/qunit/editor/tinymce/util/Quirks_ie8.html
@@ -0,0 +1,82 @@
+
+
+
+
Internet Explorer 8 Quirks
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/util/Quirks_remove.html b/tests/qunit/editor/tinymce/util/Quirks_remove.html
new file mode 100644
index 0000000000..15508ef312
--- /dev/null
+++ b/tests/qunit/editor/tinymce/util/Quirks_remove.html
@@ -0,0 +1,270 @@
+
+
+
+
Removing content tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/util/Quirks_webkit.html b/tests/qunit/editor/tinymce/util/Quirks_webkit.html
new file mode 100644
index 0000000000..361bb7bb1d
--- /dev/null
+++ b/tests/qunit/editor/tinymce/util/Quirks_webkit.html
@@ -0,0 +1,132 @@
+
+
+
+
Webkit Quirks
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/util/Quirks_webkit_jsrobot.html b/tests/qunit/editor/tinymce/util/Quirks_webkit_jsrobot.html
new file mode 100644
index 0000000000..9a996a01ca
--- /dev/null
+++ b/tests/qunit/editor/tinymce/util/Quirks_webkit_jsrobot.html
@@ -0,0 +1,205 @@
+
+
+
+
Webkit Quirks
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/util/URI.html b/tests/qunit/editor/tinymce/util/URI.html
new file mode 100644
index 0000000000..91adc88b64
--- /dev/null
+++ b/tests/qunit/editor/tinymce/util/URI.html
@@ -0,0 +1,111 @@
+
+
+
+
tinymce.util.URI tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/util/XHR.html b/tests/qunit/editor/tinymce/util/XHR.html
new file mode 100644
index 0000000000..90b33eb758
--- /dev/null
+++ b/tests/qunit/editor/tinymce/util/XHR.html
@@ -0,0 +1,53 @@
+
+
+
+
tinymce.util.XHR tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qunit/editor/tinymce/util/json_rpc_error.js b/tests/qunit/editor/tinymce/util/json_rpc_error.js
new file mode 100644
index 0000000000..be02a23562
--- /dev/null
+++ b/tests/qunit/editor/tinymce/util/json_rpc_error.js
@@ -0,0 +1 @@
+{"result": null, "error": {"message":"General failure","code":42}, "id": 1}
\ No newline at end of file
diff --git a/tests/qunit/editor/tinymce/util/json_rpc_ok.js b/tests/qunit/editor/tinymce/util/json_rpc_ok.js
new file mode 100644
index 0000000000..2bc6bdd0f2
--- /dev/null
+++ b/tests/qunit/editor/tinymce/util/json_rpc_ok.js
@@ -0,0 +1 @@
+{"result": "Hello JSON-RPC", "error": null, "id": 1}
\ No newline at end of file
diff --git a/tests/qunit/editor/tinymce/util/test.xml b/tests/qunit/editor/tinymce/util/test.xml
new file mode 100644
index 0000000000..7ed7b5e203
--- /dev/null
+++ b/tests/qunit/editor/tinymce/util/test.xml
@@ -0,0 +1,6 @@
+
+
+
+ ÅÄÖ
+
+
diff --git a/tests/qunit/editor/tinymce/util/tests.js b/tests/qunit/editor/tinymce/util/tests.js
new file mode 100644
index 0000000000..642d6701e8
--- /dev/null
+++ b/tests/qunit/editor/tinymce/util/tests.js
@@ -0,0 +1,16 @@
+{
+ "title": "tinymce.util",
+ "tests": [
+ {"title": "JSON", "url": "JSON.html"},
+ {"title": "JSONRequest", "url": "JSONRequest.html"},
+ {"title": "LocalStorage", "url": "LocalStorage.html"},
+ {"title": "URI", "url": "URI.html"},
+ {"title": "XHR", "url": "XHR.html"},
+ {"title": "All browser types", "url": "Quirks_all.html", "jsrobot": true},
+ {"title": "Quirks (Firefox)", "url": "Quirks_firefox.html", "jsrobot": true},
+ {"title": "Quirks (IE 8)", "url": "Quirks_ie8.html", "jsrobot": true},
+ {"title": "Quirks (Webkit)", "url": "Quirks_webkit.html"},
+ {"title": "Quirks JSRobot (Webkit)", "url": "Quirks_webkit_jsrobot.html", "jsrobot": true},
+ {"title": "Quirks (Remove)", "url": "Quirks_remove.html", "jsrobot": true}
+ ]
+}
diff --git a/tests/qunit/index.html b/tests/qunit/index.html
index 56d64a4862..92a2d75ece 100644
--- a/tests/qunit/index.html
+++ b/tests/qunit/index.html
@@ -28,6 +28,7 @@
+
TinyMCE tests