12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007 |
- /**
- * Created with JetBrains PhpStorm.
- * User: taoqili
- * Date: 13-2-25
- * Time: 下午4:40
- * To change this template use File | Settings | File Templates.
- */
- //test('', function () {
- // stop()
- //});
- test('框选', function () {
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('<p></p>');
- setTimeout(function () {
- range.setStart(editor.body.firstChild, 0).collapse(true).select();
- editor.execCommand('inserttable', {numCols: 3, numRows: 3});
- var tds = editor.body.getElementsByTagName('td');
- ua.mousedown(tds[0]);
- ua.mouseover(tds[4]);
- ua.mouseup(tds[4]);
- setTimeout(function () {
- var selectedTds = editor.getUETable(editor.body.firstChild).selectedTds;
- var tds = editor.body.getElementsByTagName('td');
- equal(selectedTds.length, 4, '框选');
- if ( ua.browser.ie >8 && ua.browser.ie<11)
- ua.checkResult(editor.selection.getRange(), tds[0].firstChild, tds[0].firstChild, 1, 1, true, '检查选中的range')
- else
- ua.checkResult(editor.selection.getRange(), tds[0], tds[0], 0, 0, true, '检查选中的range');
- range.setStart(tds[4], 0).collapse(true).select();
- ua.mousedown(tds[4], {button: 2});
- setTimeout(function () {
- var selectedTds = editor.getUETable(editor.body.firstChild).selectedTds;
- var tds = editor.body.getElementsByTagName('td');
- equal(selectedTds.length, 4, '右键框选不变');
- if ( ua.browser.ie >8 && ua.browser.ie<11)
- ua.checkResult(editor.selection.getRange(), tds[0].firstChild, tds[0].firstChild, 1, 1, true, '检查选中的range')
- else
- ua.checkResult(editor.selection.getRange(), tds[0], tds[0], 0, 0, true, '检查选中的range');
- start();
- }, 50);
- }, 50);
- }, 80);
- stop();
- });
- test('tableDragable-显示和消失', function () {
- if (browser.ie && browser.version < 8) return;
- var div = document.body.appendChild(document.createElement('div'));
- div.id = 'ue';
- var editor = UE.getEditor('ue', {tableDragable: true});
- editor.ready(function () {
- var range = new baidu.editor.dom.Range(editor.document);
- editor.setContent('<p></p>');
- setTimeout(function () {
- range.setStart(editor.body.firstChild, 0).collapse(true).select();
- editor.execCommand('inserttable', {numCols: 3, numRows: 3});
- var tds = editor.body.getElementsByTagName('td');
- ua.mousemove(editor.body.firstChild);
- var pos = domUtils.getXY(editor.body.firstChild);
- var select = ua.browser.webkit ? '-webkit-user-select: none;' : ua.browser.gecko ? '-moz-user-select: none;' : ua.browser.ie >8?'-ms-user-select: none':'';//-ms-user-select: none
- var html = '<div contenteditable=\"false\" style=\"width:15px;height:15px;background-image:url(' + editor.options.UEDITOR_HOME_URL + 'dialogs/table/dragicon.png);position: absolute;cursor:move;top:' + (pos.y - 15) + 'px;left:' + pos.x + 'px; ' + select + '\"' + (ua.browser.ie && ua.browser.ie<9 ? 'unselectable=\"on\"' : '') + '></div>';
- setTimeout(function () {
- var button = editor.body.lastChild;
- ua.checkSameHtml(button.outerHTML.replace('"', ''), html, 'DragButton显示');
- ua.mouseout(button);
- ua.mousemove(editor.body);
- setTimeout(function () {
- equal(editor.body.getElementsByTagName('div').length, 0, '按钮没有了');
- UE.delEditor('ue');
- te.dom.push(document.getElementById('ue'));
- te.dom.push(document.getElementById('edui_fixedlayer'));
- start();
- }, 2100);
- }, 20);
- }, 50);
- });
- stop();
- });
- test('tableDragable-单击', function () {//tableClicked
- if (browser.ie && browser.version < 8) return;
- var div = document.body.appendChild(document.createElement('div'));
- div.id = 'ue';
- var editor = UE.getEditor('ue', {tableDragable: true});
- expect(1);
- editor.ready(function () {
- var range = new baidu.editor.dom.Range(editor.document);
- editor.setContent('<p></p>');
- setTimeout(function () {
- range.setStart(editor.body.firstChild, 0).collapse(true).select();
- editor.execCommand('inserttable', {numCols: 3, numRows: 3});
- var tds = editor.body.getElementsByTagName('td');
- ua.mousemove(editor.body.firstChild);
- setTimeout(function () {
- var button = editor.body.lastChild;
- editor.addListener("tableClicked", function (type, table, buttonOn) {
- same(table, editor.body.getElementsByTagName('table')[0], 'tableClicked事件,传入的参数正确');
- setTimeout(function () {
- UE.delEditor('ue');
- te.dom.push(document.getElementById('ue'));
- te.dom.push(document.getElementById('edui_fixedlayer'));
- start();
- }, 500);
- });
- ua.click(button);
- }, 20);
- }, 50);
- });
- stop();
- });
- test('tableDragable-双击', function () {//tableClicked
- if (browser.ie && browser.version < 8) return;
- var div = document.body.appendChild(document.createElement('div'));
- div.id = 'ue';
- var editor = UE.getEditor('ue', {tableDragable: true});
- editor.ready(function () {
- var range = new baidu.editor.dom.Range(editor.document);
- editor.setContent('<p></p>');
- setTimeout(function () {
- range.setStart(editor.body.firstChild, 0).collapse(true).select();
- editor.execCommand('inserttable', {numCols: 3, numRows: 3});
- var tds = editor.body.getElementsByTagName('td');
- ua.mousemove(editor.body.firstChild);
- setTimeout(function () {
- var button = editor.body.lastChild;
- ua.dblclick(button);
- setTimeout(function () {
- var selectedTds = editor.getUETable(editor.body.firstChild).selectedTds;
- var tds = editor.body.getElementsByTagName('td');
- equal(selectedTds.length, 9, '全选');
- if (ua.browser.ie > 8 && ua.browser.ie<11)
- ua.checkResult(editor.selection.getRange(), tds[0].firstChild, tds[0].firstChild, 1, 1, true, '检查选中的range');
- else
- ua.checkResult(editor.selection.getRange(), tds[0], tds[0], 0, 0, true, '检查选中的range');
- setTimeout(function () {
- UE.delEditor('ue');
- te.dom.push(document.getElementById('ue'));
- te.dom.push(document.getElementById('edui_fixedlayer'));
- start();
- }, 500);
- }, 100);
- }, 100);
- }, 100);
- });
- stop();
- });
- test('从外面粘贴表格', function () {
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('<p></p>');
- range.setStart(editor.body.firstChild, 0).collapse(true).select();
- var html = {html: '<table style="width:992px"><tbody><tr><td style="border-color: rgb(247, 150, 70);width:198px" >hello1</td><td style="background-color: rgb(255, 0, 0); border-color: rgb(247, 150, 70);width:198px" ></td></tr><tr><td >hello2</td><td ></td></tr></tbody></table><p>hello2</p>'};
- editor.fireEvent('beforepaste', html);
- //**//*粘贴*//**//*
- stop();
- setTimeout(function () {
- var space = ua.browser.ie ? '' : '<br/>';
- var border = (ua.browser.ie && ua.browser.ie < 9) ? 'border-bottom-color: rgb(247,150,70); border-top-color: rgb(247,150,70); border-right-color: rgb(247,150,70); border-left-color: rgb(247,150,70)' : 'border-color: rgb(247, 150, 70)';
- var resultHtml = '<table width="992"><tbody><tr><td style="' + border + ';" width="198">hello1</td><td style="background-color: rgb(255, 0, 0); ' + border + ';" width="198">' + space + '</td></tr><tr><td>hello2</td><td>' + space + '</td></tr></tbody></table><p>hello2</p>';
- ua.checkSameHtml(html.html.toLowerCase(), resultHtml.toLowerCase(), '粘贴的表格规范格式');
- start();
- }, 50);
- });
- test('从外面粘贴表格到表格-表格中不能粘完整的表格', function () {
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('');
- editor.execCommand('inserttable', {numCols: 3, numRows: 3});
- //**//*插入表格*//**//*
- var tds = editor.body.getElementsByTagName('td');
- range.setStart(tds[0], 0).collapse(true).select();
- var html = {html: '<table><tbody><tr><td>hello1</td><td ></td></tr><tr><td >hello2</td><td ></td></tr></tbody></table><p>hello2</p>'};
- editor.fireEvent('beforepaste', html);
- //**//*粘贴*//**//*
- stop();
- setTimeout(function () {
- equal(html.html, '<p>hello2</p>', '表格中不能粘完整的表格');
- start();
- }, 50);
- });
- test(' trace 3729 从外面粘贴表格到表格-在caption中粘贴,只粘贴文本内容', function () {
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('');
- editor.execCommand('inserttable', {numCols: 3, numRows: 3});
- //**//*插入表格*//**//*
- var tds = editor.body.getElementsByTagName('td');
- range.setStart(tds[0], 0).collapse(true).select();
- editor.execCommand('insertcaption');
- range.setStart(editor.body.getElementsByTagName('caption')[0], 0).collapse(true).select();
- var html = {html: '<table><tbody><tr><td>hello1</td><td ></td></tr></tbody></table>'};
- editor.fireEvent('beforepaste', html);
- //**//*粘贴*//**//*
- stop();
- setTimeout(function () {
- //todo ie9 使用 div[browser.ie ? 'innerText' : 'textContent'] 会多一个换行,用textContent没有 trace 3729
- equal(html.html, 'hello1', '在caption中粘贴,只粘贴文本内容');
- start();
- }, 50);
- });
- test('getText,取表格内的文本', function () {
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('<table><tbody><tr><td> hello1</td><td ></td></tr><tr><td >hello2</td><td ></td></tr></tbody></table>');
- stop();
- setTimeout(function () {
- var trs = editor.body.firstChild.getElementsByTagName('tr');
- range.setStart(trs[0].cells[0],0).collapse(true).select();
- var ut = editor.getUETable(editor.body.firstChild);
- var cellsRange = ut.getCellsRange(trs[0].cells[0], trs[1].cells[0]);
- ut.setSelected(cellsRange);
- setTimeout(function () {
- ua.manualDeleteFillData(editor.body);
- equal(editor.selection.getText(), 'hello1hello2');
- start();
- }, 50);
- }, 50);
- });
- test('在第一个单元格里最前面回车,且表格前面没有内容', function () {
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('<p></p>');
- range.setStart(editor.body.firstChild, 0).collapse(true).select();
- editor.execCommand('inserttable', {numCols: 3, numRows: 3});
- var trs = editor.body.firstChild.getElementsByTagName('tr');
- var ut = editor.getUETable(editor.body.firstChild);
- var cellsRange = ut.getCellsRange(trs[0].cells[0], trs[1].cells[0]);
- ut.setSelected(cellsRange);
- range.setStart(trs[0].cells[0], 0).collapse(true).select();
- ua.keydown(editor.body, {'keyCode': 13});
- stop();
- setTimeout(function () {
- ua.manualDeleteFillData(editor.body);
- equal(editor.body.firstChild.innerHTML, ua.browser.ie ? ' ' : '<br>', '表格前插入空行');
- equal(editor.body.firstChild.tagName.toLowerCase(), 'p', '表格前插入空行');
- equal(editor.body.childNodes[1].tagName.toLowerCase(), 'table', '表格在空行后面');
- start();
- }, 50);
- });
- test('delete 事件', function () {
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('<p></p>');
- range.setStart(editor.body.firstChild, 0).collapse(true).select();
- editor.execCommand('inserttable', {numCols: 3, numRows: 3});
- expect(4);
- editor.addListener('saveScene', function () {
- ok(true);
- });
- var trs = editor.body.firstChild.getElementsByTagName('tr');
- trs[0].cells[0].innerHTML = 'hello';
- trs[1].cells[0].innerHTML = 'hello';
- var ut = editor.getUETable(editor.body.firstChild);
- var cellsRange = ut.getCellsRange(trs[0].cells[0], trs[1].cells[0]);
- ut.setSelected(cellsRange);
- range.setStart(trs[0].cells[0], 0).collapse(true).select();
- ua.keydown(editor.body, {'keyCode': 46});
- stop();
- setTimeout(function () {
- ua.manualDeleteFillData(editor.body);
- trs = editor.body.firstChild.getElementsByTagName('tr');
- equal(trs[0].cells[0].innerHTML, ua.browser.ie ? '' : '<br>', '内容');
- equal(trs[1].cells[0].innerHTML, ua.browser.ie ? '' : '<br>', '内容');
- start();
- }, 20);
- });
- //**//*trace 3047,3545*//**//*
- test('trace 3047 ,3545 全屏插入表格', function () {
- if (ua.browser.gecko)return;//TODO 1.2.6
- if (ua.browser.ie && ua.browser.ie < 9)return;//TODO 1.2.6
- var div = document.body.appendChild(document.createElement('div'));
- $(div).css('width', '500px').css('height', '500px').css('border', '1px solid #ccc');
- var editor = te.obj[2];
- editor.render(div);
- stop();
- editor.ready(function () {
- editor.setContent('<p></p>');
- editor.ui.setFullScreen(!editor.ui.isFullScreen());
- editor.execCommand('inserttable');
- var width1 = editor.body.getElementsByTagName('td')[0].width;
- setTimeout(function () {
- editor.ui.setFullScreen(!editor.ui.isFullScreen());
- setTimeout(function () {
- var width2 = editor.body.getElementsByTagName('td')[0].width;
- ok((width1 - width2) > 10, '页面宽度自适应');
- div.parentNode.removeChild(div);
- start();
- }, 500);
- }, 500);
- });
- });
- test('backspace事件:删除caption', function () {
- if(ua.browser.ie&&ua.browser.ie>8)return ;//todo 1.3.0
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('<p></p>');
- range.setStart(editor.body.firstChild, 0).collapse(true).select();
- editor.execCommand('inserttable', {numCols: 3, numRows: 3});
- stop();
- setTimeout(function () {
- var trs = editor.body.firstChild.getElementsByTagName('tr');
- range.setStart(trs[0].cells[0], 0).collapse(true).select();
- editor.execCommand('insertcaption');
- ua.keydown(editor.body, {'keyCode': 8});
- setTimeout(function () {
- equal(editor.body.getElementsByTagName('caption').length, 0, '删除caption');
- equal(editor.selection.getRange().collapsed, true, '检查光标');
- equal(editor.selection.getRange().startContainer, editor.body.getElementsByTagName('td')[0], '检查光标');
- start();
- }, 500);
- }, 50);
- });
- test('backspace事件:deleterow', function () {
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('<p></p>');
- range.setStart(editor.body.firstChild, 0).collapse(true).select();
- editor.execCommand('inserttable', {numCols: 3, numRows: 3});
- stop();
- setTimeout(function () {
- var trs = editor.body.firstChild.getElementsByTagName('tr');
- var ut = editor.getUETable(editor.body.firstChild);
- var cellsRange = ut.getCellsRange(trs[0].cells[0], trs[0].cells[2]);
- ut.setSelected(cellsRange);
- range.setStart(trs[0].cells[0], 0).collapse(true).select();
- ua.keydown(editor.body, {'keyCode': 8});
- setTimeout(function () {
- equal(editor.body.getElementsByTagName('tr').length, 2, '删除整行');
- if(!ua.browser.ie||ua.browser.ie<9){//todo
- equal(editor.selection.getRange().collapsed, true, '检查光标');
- equal(editor.selection.getRange().startContainer, editor.body.getElementsByTagName('td')[0], '检查光标');
- }
- start();
- }, 100);
- }, 50);
- });
- test('backspace事件:deletecol', function () {
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('<p></p>');
- range.setStart(editor.body.firstChild, 0).collapse(true).select();
- editor.execCommand('inserttable', {numCols: 3, numRows: 3});
- stop();
- setTimeout(function () {
- var trs = editor.body.firstChild.getElementsByTagName('tr');
- var ut = editor.getUETable(editor.body.firstChild);
- var cellsRange = ut.getCellsRange(trs[0].cells[0], trs[2].cells[0]);
- ut.setSelected(cellsRange);
- range.setStart(trs[0].cells[0], 0).collapse(true).select();
- setTimeout(function () {
- ua.keydown(trs[0].cells[0], {'keyCode': 8});
- setTimeout(function () {
- equal(editor.body.getElementsByTagName('tr')[0].getElementsByTagName('td').length, 2, '删除整列');
- if(!ua.browser.ie||ua.browser.ie<9){//todo
- equal(editor.selection.getRange().collapsed, true, '检查光标');
- equal(editor.selection.getRange().startContainer, editor.body.getElementsByTagName('td')[0], '检查光标');
- }
- start();
- }, 100);
- }, 50);
- }, 100);
- });
- //test('backspace事件:delcells', function () {
- // //TODO
- //});
- test('表格名称中backspace键', function () {
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('<p></p>');
- range.setStart(editor.body.firstChild, 0).collapse(true).select();
- editor.execCommand('inserttable', {numCols: 3, numRows: 3});
- stop();
- setTimeout(function () {
- var trs = editor.body.firstChild.getElementsByTagName('tr');
- range.setStart(trs[0].cells[0], 0).collapse(true).select();
- editor.execCommand('insertcaption');
- range.setStart(editor.body.getElementsByTagName('caption')[0], 0).collapse(true).select();
- ua.keydown(editor.body, {'keyCode': 8});
- setTimeout(function () {
- equal(editor.body.getElementsByTagName('caption').length, 0, '删除caption');
- equal(editor.body.getElementsByTagName('table').length, 1, '不会增加表格数量');
- equal(editor.body.getElementsByTagName('tr').length, 3, '不会增加表格行数量');
- equal(editor.body.getElementsByTagName('tr')[0].cells.length, 3, '不会增加表格列数量');
- if(!ua.browser.ie||ua.browser.ie<9){//todo
- equal(editor.selection.getRange().collapsed, true, '检查光标');
- equal(editor.selection.getRange().startContainer, editor.body.getElementsByTagName('td')[0], '检查光标');
- }
- start();
- }, 100);
- }, 200);
- });
- test('trace 3097 标题行中backspace键', function () {
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('<p></p>');
- range.setStart(editor.body.firstChild, 0).collapse(true).select();
- editor.execCommand('inserttable', {numCols: 3, numRows: 3});
- var trs = editor.body.firstChild.getElementsByTagName('tr');
- range.setStart(trs[0].cells[0], 0).collapse(true).select();
- editor.execCommand('insertcaption');
- range.setStart(editor.body.getElementsByTagName('caption')[0], 0).collapse(true).select();
- var x = range.cloneRange();
- editor.execCommand('inserttitle');
- range.setStart(editor.body.getElementsByTagName('th')[0], 0).collapse(true).select();
- ua.keydown(editor.body, {'keyCode': 8});
- stop();
- setTimeout(function () {
- editor = te.obj[0];
- equal(editor.body.getElementsByTagName('caption').length, 1, '不会删除caption');
- equal(editor.body.getElementsByTagName('th').length, 3, '不会误删除标题行');
- equal(editor.body.getElementsByTagName('table').length, 1, '不会增加表格数量');
- equal(editor.body.getElementsByTagName('tr').length, 4, '不会增加表格行数量');
- equal(editor.body.getElementsByTagName('tr')[0].cells.length, 3, '不会增加表格列数量');
- equal(editor.selection.getRange().collapsed, true, '检查光标');
- trs[0].cells[0].innerHTML = 'hello';
- // equal(editor.selection.getRange().startContainer, te.obj[0].body.getElementsByTagName('th')[0], '检查光标');
- equal(trs[0].cells[0].innerHTML,'hello', '检查光标');
- start();
- }, 50);
- });
- test('拖拽', function () {
- if (ua.browser.ie && ua.browser.ie < 8) return;
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('<p></p>');
- range.setStart(editor.body.firstChild, 0).collapse(true).select();
- editor.execCommand('inserttable');
- ua.manualDeleteFillData(editor.body);
- var tds = te.obj[0].body.getElementsByTagName('td');
- var width1 = tds[1].width;
- ua.mousemove(tds[1], {clientX: 199, clientY: 100});
- equal(editor.body.style.cursor, 'col-resize', '检查鼠标显示');
- ua.mousedown(tds[1], {clientX: 199, clientY: 100});
- setTimeout(function () {
- ua.mousemove(tds[1], {clientX: 299, clientY: 100});
- ua.mouseup(tds[1], {clientX: 299, clientY: 100});
- var p = ua.getMousePosition;
- setTimeout(function () {
- var width2 = tds[1].width;
- ok(width2 - width1 > 50, '拖拽后单元格宽度改变');
- start();
- }, 50);
- }, 400);
- stop();
- });
- test('拖拽_row-resize鼠标显示', function () {
- if (ua.browser.ie && ua.browser.ie < 8) return;
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('<p></p>');
- range.setStart(editor.body.firstChild, 0).collapse(true).select();
- editor.execCommand('inserttable');
- ua.manualDeleteFillData(editor.body);
- var tds = te.obj[0].body.getElementsByTagName('td');
- var width1 = tds[1].width;
- ua.mousemove(tds[4], {clientX: 450, clientY: 39});
- equal(editor.body.style.cursor, 'row-resize', 'row-resize鼠标显示');
- expect(3);
- setTimeout(function () {
- editor.addListener("tablemouseout", function (type, table, buttonOn) {
- same(table, editor.body.getElementsByTagName('table')[0], 'tablemouseout事件,传入的参数正确');
- });
- ua.mouseout(tds[1], {clientX: 299, clientY: 35});
- setTimeout(function () {
- equal(editor.body.style.cursor, 'text', '焦点转移,row-resize不显示');
- start();
- }, 50);
- }, 20);
- stop();
- });
- test('拖拽-最右边的单元格', function () {
- if (ua.browser.ie && ua.browser.ie < 8) return;
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('<p></p>');
- range.setStart(editor.body.firstChild, 0).collapse(true).select();
- editor.execCommand('inserttable');
- ua.manualDeleteFillData(editor.body);
- var tds = te.obj[0].body.getElementsByTagName('td');
- var width1 = tds[4].width;
- ua.mousemove(tds[4], {clientX: 492, clientY: 21});
- equal(editor.body.style.cursor, 'col-resize', '检查鼠标显示');
- ua.mousedown(tds[4], {clientX: 492, clientY: 21});
- setTimeout(function () {
- ua.mousemove(tds[4], {clientX: 481, clientY: 21});
- ua.mouseup(tds[4], {clientX: 481, clientY: 21});
- setTimeout(function () {
- var width2 = te.obj[0].body.getElementsByTagName('td')[4].width;
- ok(width1 != width2 , '拖拽后单元格宽度改变');
- start();
- }, 50);
- }, 400);
- stop();
- });
- test('拖拽-最下边的单元格', function () {
- // if (ua.browser.ie ) return;//todo 1.3.0
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('<p></p>');
- range.setStart(editor.body.firstChild, 0).collapse(true).select();
- editor.execCommand('inserttable');
- var tds = te.obj[0].body.getElementsByTagName('td');
- var height1 = tds[20].height;
- ua.mousemove(tds[24], {clientX: 439, clientY: 512});
- ua.mousedown(tds[24], {clientX: 439, clientY: 512});
- equal(editor.body.style.cursor, 'row-resize', '检查鼠标显示');
- setTimeout(function () {
- ua.mousemove(tds[24], {clientX: 439, clientY: 562});
- ua.mouseup(tds[24], {clientX: 439, clientY: 562});
- setTimeout(function () {
- var height2 = te.obj[0].body.getElementsByTagName('td')[20].height;
- ok(height2 - height1 > 10, '拖拽后单元格宽度改变');
- start();
- }, 50);
- }, 400);
- stop();
- });
- test('trace 3022 表格名称中backspace、ctrl+z、enter', function () {
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('<p></p>');
- range.setStart(editor.body.firstChild, 0).collapse(true).select();
- editor.execCommand('inserttable', {numCols: 3, numRows: 3});
- // expect(9);
- editor.addListener('saveScene', function () {
- ok(true);
- });
- stop();
- setTimeout(function () {
- var trs = editor.body.firstChild.getElementsByTagName('tr');
- range.setStart(trs[0].cells[0], 0).collapse(true).select();
- editor.execCommand('insertcaption');
- ua.keydown(editor.body, {'keyCode': 8});
- setTimeout(function () {
- range.setStart(trs[0].cells[0], 0).collapse(true).select();
- ua.keydown(editor.body, {'keyCode': 90, 'ctrlKey': true});
- setTimeout(function () {
- ua.keydown(editor.body, {'keyCode': 13});
- equal(te.obj[0].body.getElementsByTagName('caption').length, 1, '撤销删除caption');
- equal(te.obj[0].body.getElementsByTagName('th').length, 0, '不会误插入标题行');
- equal(te.obj[0].body.getElementsByTagName('table').length, 1, '不会增加表格数量');
- equal(te.obj[0].body.getElementsByTagName('tr').length, 3, '不会增加表格行数量');
- equal(te.obj[0].body.getElementsByTagName('tr')[0].cells.length, 3, '不会增加表格列数量');
- equal(te.obj[0].selection.getRange().collapsed, true, '检查光标');
- if(!ua.browser.gecko && !ua.browser.webkit)//todo 1.3.6 ff 回退后光标找不好
- equal(te.obj[0].selection.getRange().startContainer.parentNode, te.obj[0].body.getElementsByTagName('td')[0], '检查光标');
- start();
- }, 20);
- }, 20);
- }, 50);
- });
- /*trace 3067*/
- test('trace 3067 向右合并--tab键', function () {
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('<p></p>');
- range.setStart(editor.body.firstChild, 0).collapse(true).select();
- editor.execCommand('inserttable', {numCols: 2, numRows: 2});
- ua.manualDeleteFillData(editor.body);
- var tds = editor.body.getElementsByTagName('td');
- range.setStart(tds[0], 0).collapse(true).select();
- editor.execCommand('mergeright');
- range.setStart(tds[0], 0).collapse(true).select();
- range = editor.selection.getRange();
- var common = range.getCommonAncestor(true, true);
- equal(common.colSpan, 2, 'tab键前光标位于合并后的单元格中');
- ua.keydown(editor.body, {'keyCode': 9});
- setTimeout(function () {
- range = editor.selection.getRange();
- common = range.getCommonAncestor(true, true);
- equal(common.colSpan, 1, 'tab键前光标跳到合并后单元格的下一个单元格中');
- start();
- }, 20);
- stop();
- });
- /*trace 3100*/
- test('trace 3100 表格名称中tab键', function () {
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('<p></p>');
- range.setStart(editor.body.firstChild, 0).collapse(true).select();
- editor.execCommand('inserttable', {numCols: 3, numRows: 3});
- var trs = editor.body.firstChild.getElementsByTagName('tr');
- range.setStart(trs[0].cells[0], 0).collapse(true).select();
- editor.execCommand('insertcaption');
- range.setStart(editor.body.getElementsByTagName('caption')[0], 0).collapse(true).select();
- ua.keydown(editor.body, {'keyCode': 9});
- stop();
- setTimeout(function () {
- editor = te.obj[0];
- equal(editor.body.getElementsByTagName('caption').length, 1, '不会删除caption');
- equal(editor.body.getElementsByTagName('th').length, 0, '不会误插入标题行');
- equal(editor.body.getElementsByTagName('table').length, 1, '不会增加表格数量');
- equal(editor.body.getElementsByTagName('tr').length, 3, '不会增加表格行数量');
- equal(editor.body.getElementsByTagName('tr')[0].cells.length, 3, '不会增加表格列数量');
- equal(editor.selection.getRange().collapsed, true, '检查光标');
- if (!ua.browser.ie) //ie8下会导致堆栈溢出,奇葩的bug,以后不溢出再检查ie8
- equal(editor.selection.getRange().startContainer, te.obj[0].body.getElementsByTagName('td')[0], '检查光标');
- start();
- }, 50);
- });
- /*trace 3059*/
- test('trace 3059 表格右浮动', function () {
- if (ua.browser.ie)return;//TODO 1.2.6
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('<p></p>');
- range.setStart(editor.body.firstChild, 0).collapse(true).select();
- editor.execCommand('inserttable');
- ua.manualDeleteFillData(editor.body);
- var tds = te.obj[0].body.getElementsByTagName('td');
- var oldWidth = tds[0].offsetWidth;
- ua.mousemove(tds[0], {clientX: 105, clientY: 20});
- ua.mousedown(tds[0], {clientX: 105, clientY: 20});
- ua.mouseup(tds[0], {clientX: 105, clientY: 20});
- setTimeout(function () {
- ua.mousedown(tds[0], {clientX: 105, clientY: 20});
- ua.mouseup(tds[0], {clientX: 105, clientY: 20});
- setTimeout(function () {
- tds = editor.body.firstChild.getElementsByTagName('td');
- ok(tds[0].offsetWidth < oldWidth, '第一列宽度变小');
- range.setStart(tds[0], 0).collapse(true).select();
- editor.execCommand('tablealignment', 'right');
- var table = te.obj[0].body.getElementsByTagName('table')[0];
- equal(table.align, 'right', '表格右浮动');
- start();
- }, 500);
- }, 50);
- stop();
- });
- test('trace 3378:拖拽后tab,不影响表格样式', function () {
- if (ua.browser.ie && ua.browser.ie < 8) return;
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('<p></p>');
- range.setStart(editor.body.firstChild, 0).collapse(true).select();
- editor.execCommand('inserttable');
- ua.manualDeleteFillData(editor.body);
- var tds = te.obj[0].body.getElementsByTagName('td');
- var width1 = tds[1].width;
- ua.mousemove(tds[1], {clientX: 199, clientY: 100});
- ua.mousedown(tds[1], {clientX: 199, clientY: 100});
- setTimeout(function () {
- ua.mousemove(tds[1], {clientX: 299, clientY: 100});
- ua.mouseup(tds[1], {clientX: 299, clientY: 100});
- var width2 = tds[1].width;
- ok(width2 - width1 > 50, '拖拽后单元格宽度改变');
- range.setStart(tds[24], 0).collapse(true).select();
- ua.keydown(editor.body, {'keyCode': 9});
- setTimeout(function () {
- equal(tds[1].width, width2, 'tab键不影响单元格宽度');
- start();
- }, 20);
- }, 400);
- stop();
- });
- //超时,暂时注掉
- test('表格粘贴', function () {
- var div = document.body.appendChild(document.createElement('div'));
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('');
- editor.execCommand('inserttable');
- /*插入表格*/
- var tds = editor.body.getElementsByTagName('td');
- var ut = editor.getUETable(editor.body.firstChild);
- var cellsRange = ut.getCellsRange(tds[0], tds[24]);
- ut.setSelected(cellsRange);
- /*确定选区*/
- range.setStart(tds[0], 0).collapse(true).select();
- /*定光标*/
- ua.keydown(editor.body, {'keyCode': 67, 'ctrlKey': true});
- /*ctrl+c*/
- var html = {html: editor.body.innerHTML};
- range.setStart(editor.body.lastChild, 0).collapse(true).select();
- equal(editor.body.getElementsByTagName('table').length, '1', '触发粘贴事件前有1个table');
- editor.fireEvent('beforepaste', html);
- /*粘贴*/
- editor.fireEvent("afterpaste");
- equal(editor.body.getElementsByTagName('table').length, '2', '触发粘贴事件后有2个table');
- });
- //
- //test('trace 3104 粘贴后合并单元格',function(){
- // var div = document.body.appendChild(document.createElement('div'));
- // var editor = te.obj[0];
- // var range = te.obj[1];
- // editor.setContent('');
- // editor.execCommand('inserttable');
- // var trs = editor.body.getElementsByTagName('tr');
- // var ut = editor.getUETable(editor.body.firstChild);
- // var cellsRange = ut.getCellsRange(trs[0].cells[0],trs[4].cells[0]);
- // ut.setSelected(cellsRange);
- // range.setStart( trs[0].cells[0], 0 ).collapse( true ).select();
- // ua.keydown(editor.body,{'keyCode':67,'ctrlKey':true});
- // ut.clearSelected();
- // var html ={html:editor.body.innerHTML};
- // range.setStart(editor.body.lastChild,0).collapse(true).select();
- // editor.fireEvent('beforepaste',html);
- // editor.fireEvent("afterpaste");
- // var table = editor.body.getElementsByTagName('table');
- // equal(table.length,'2','触发粘贴事件后有2个table');
- // equal(table[1].firstChild.childNodes.length,'5','5行');
- // equal(table[1].firstChild.firstChild.childNodes.length,'1','1列');
- //
- // var tds = editor.body.getElementsByTagName('td');
- // ut = editor.getUETable(editor.body.firstChild.nextSibling);
- // cellsRange = ut.getCellsRange(tds[25],tds[29]);
- // ut.setSelected(cellsRange);
- // range.setStart(tds[25], 0 ).collapse( true ).select();
- // editor.execCommand('mergecells');
- // table = editor.body.getElementsByTagName('table');
- // equal(table[1].firstChild.childNodes.length,'1','1行');
- // equal(table[1].firstChild.firstChild.childNodes.length,'1','1列');
- //});
- //
- test('trace 3105 在表格名称中粘贴', function () {
- var div = document.body.appendChild(document.createElement('div'));
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('');
- editor.execCommand('inserttable', {numCols: 2, numRows: 2});
- range.setStart(editor.body.getElementsByTagName('td')[0], 0).collapse(true).select();
- editor.execCommand('insertcaption');
- var str = ua.getChildHTML(editor.body);
- var ut = editor.getUETable(editor.body.firstChild);
- var tds = editor.body.getElementsByTagName('td');
- var cellsRange = ut.getCellsRange(tds[0], tds[1]);
- ut.setSelected(cellsRange);
- range.setStart(tds[0], 0).collapse(true).select();
- ua.keydown(editor.body, {'keyCode': 67, 'ctrlKey': true});
- var html = {html: editor.body.innerHTML};
- range.setStart(editor.body.getElementsByTagName('caption')[0], 0).collapse(true).select();
- editor.fireEvent('beforepaste', html);
- editor.fireEvent("afterpaste");
- ut.clearSelected();
- equal(editor.body.getElementsByTagName('table').length, '1', '触发粘贴事件后有1个table');
- equal(ua.getChildHTML(editor.body), str, '粘贴无效');
- });
- test('trace 3106 粘贴标题行', function () {
- var div = document.body.appendChild(document.createElement('div'));
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('');
- editor.execCommand('inserttable');
- var tds = editor.body.getElementsByTagName('td');
- range.setStart(tds[0], 0).collapse(true).select();
- editor.execCommand('inserttitle');
- var ut = editor.getUETable(editor.body.firstChild);
- var ths = editor.body.getElementsByTagName('th');
- var cellsRange = ut.getCellsRange(ths[0], ths[4]);
- ut.setSelected(cellsRange);
- range.setStart(ths[0], 0).collapse(true).select();
- ua.keydown(editor.body, {'keyCode': 67, 'ctrlKey': true});
- var html = {html: editor.body.innerHTML};
- range.setStart(editor.body.lastChild, 0).collapse(true).select();
- editor.fireEvent('beforepaste', html);
- editor.fireEvent("afterpaste");
- equal(editor.body.getElementsByTagName('table').length, '2', '触发粘贴事件后有2个table');
- if (ua.browser.gecko) {
- //这个比较没意义
- // equal(editor.body.firstChild.firstChild.firstChild.firstChild.tagName.toLowerCase(),'td','不是th,是td');
- range.setStart(editor.body.firstChild.firstChild.firstChild.firstChild, 0).collapse(true).select();
- equal(editor.queryCommandState('inserttable'), -1, '应当不可以插入表格');
- equal(editor.queryCommandState('mergeright'), 0, '应当可以右合并单元格');
- }
- else {
- // equal(editor.body.firstChild.nextSibling.firstChild.firstChild.firstChild.tagName.toLowerCase(),'td','不是th,是td');
- range.setStart(editor.body.firstChild.nextSibling.firstChild.firstChild.firstChild, 0).collapse(true).select();
- equal(editor.queryCommandState('inserttable'), -1, '应当不可以插入表格');
- equal(editor.queryCommandState('mergeright'), 0, '应当可以右合并单元格');
- }
- });
- test('trace 3114 在单元格内粘贴行', function () {
- var div = document.body.appendChild(document.createElement('div'));
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('');
- editor.execCommand('inserttable');
- var tds = editor.body.getElementsByTagName('td');
- var ut = editor.getUETable(editor.body.firstChild);
- var cellsRange = ut.getCellsRange(tds[0], tds[9]);
- ut.setSelected(cellsRange);
- range.setStart(tds[0], 0).collapse(true).select();
- ua.keydown(editor.body, {'keyCode': 67, 'ctrlKey': true});
- var html = {html: editor.body.innerHTML};
- range.setStart(tds[0], 0).collapse(true).select();
- editor.fireEvent('beforepaste', html);
- editor.fireEvent("afterpaste");
- equal(editor.body.getElementsByTagName('table').length, '1', '触发粘贴事件后有1个table');
- stop();
- setTimeout(function () {
- editor.execCommand('source');
- setTimeout(function () {
- editor.execCommand('source');
- equal(editor.body.getElementsByTagName('tr').length, '7', '触发粘贴事件后有7个tr');
- start();
- }, 50);
- }, 50);
- });
- test('在单元格中粘贴_粘到最后', function () {
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('');
- editor.execCommand('inserttable', {numCols: 3, numRows: 3});
- /*插入表格*/
- var tds = editor.body.getElementsByTagName('td');
- var ut = editor.getUETable(editor.body.firstChild);
- var cellsRange = ut.getCellsRange(tds[0], tds[4]);
- ut.setSelected(cellsRange);
- /*确定选区*/
- range.setStart(tds[0], 0).collapse(true).select();
- /*定光标*/
- ua.keydown(editor.body, {'keyCode': 67, 'ctrlKey': true});
- /*ctrl+c*/
- var html = {html: editor.body.innerHTML};
- range.setStart(tds[8], 0).collapse(true).select();
- equal(editor.body.getElementsByTagName('tr').length, 3, '触发粘贴事件前有3个tr');
- equal(editor.body.getElementsByTagName('td').length, 9, '触发粘贴事件前有9个td');
- editor.fireEvent('beforepaste', html);
- /*粘贴*/
- editor.fireEvent("afterpaste");
- equal(editor.body.getElementsByTagName('tr').length, 4, '触发粘贴事件后有4个tr');
- equal(editor.body.getElementsByTagName('td').length, 16, '触发粘贴事件后有12个td');
- });
- test('在单元格中粘贴_整列', function () {
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('');
- editor.execCommand('inserttable', {numCols: 3, numRows: 3});
- /*插入表格*/
- var tds = editor.body.getElementsByTagName('td');
- range.setStart(tds[0], 0).collapse(true).select();
- editor.execCommand('inserttitle');
- var ut = editor.getUETable(editor.body.firstChild);
- var cellsRange = ut.getCellsRange(tds[0], tds[6]);
- ut.setSelected(cellsRange);
- /*确定选区*/
- range.setStart(tds[0], 0).collapse(true).select();
- /*定光标*/
- ua.keydown(editor.body, {'keyCode': 67, 'ctrlKey': true});
- /*ctrl+c*/
- var html = {html: editor.body.innerHTML};
- range.setStart(tds[6], 0).collapse(true).select();
- equal(editor.body.getElementsByTagName('tr').length, 4, '触发粘贴事件前有4个tr');
- equal(editor.body.getElementsByTagName('th').length, 3, '触发粘贴事件前有3个th');
- equal(editor.body.getElementsByTagName('td').length, 9, '触发粘贴事件前有9个td');
- editor.fireEvent('beforepaste', html);
- /*粘贴*/
- editor.fireEvent("afterpaste");
- equal(editor.body.getElementsByTagName('tr').length, 4, '触发粘贴事件后有4个tr');
- equal(editor.body.getElementsByTagName('th').length, 4, '触发粘贴事件前有4个th');
- equal(editor.body.getElementsByTagName('td').length, 12, '触发粘贴事件后有12个td');
- });
- test('点击一行的最左边,选中一行', function () {
- if (ua.browser.ie && ua.browser.ie < 9)return;//todo click事件模拟有问题
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('');
- editor.execCommand('inserttable', {numCols: 2, numRows: 3});
- /*插入表格*/
- setTimeout(function () {
- var tds = editor.body.getElementsByTagName('td');
- tds[0].innerHTML = 'hello1';
- tds[1].innerHTML = 'hello2';
- ua.mousemove(tds[0], {clientX: 8, clientY: 24});
- ua.click(tds[0], {clientX: 8, clientY: 24});
- setTimeout(function () {
- var space = ua.browser.ie ? '' : ' ';
- var quot = ua.browser.gecko ? '\"' : '';
- equal(editor.body.style.cursor, 'url(' + quot + editor.options.cursorpath + 'v.png' + quot + '),' + space + 'pointer');
- // //me.body.style.cursor
- var selectedTds = editor.getUETable(editor.body.firstChild).selectedTds;
- equal(selectedTds.length, 2, '选中一行');
- equal(selectedTds[0].className, 'selectTdClass', '检查样式');
- equal(selectedTds[1].className, 'selectTdClass', '检查样式');
- equal(selectedTds[0].innerHTML, 'hello1', '检查内容');
- equal(selectedTds[1].innerHTML, 'hello2', '检查内容');
- //todo trace 3571
- // ua.click(tds[2],{clientX:12,clientY:24,shiftKey:true});
- // equal(editor.getUETable(editor.body.firstChild).selectedTds.length,6,'');
- start();
- }, 50);
- }, 50);
- stop();
- });
- test('点击一行的最左边,但是每行只有一列,这时选中单元格中的内容', function () {
- if (ua.browser.ie && ua.browser.ie < 9)return;//todo click事件模拟有问题
- var editor = te.obj[0];
- editor.setContent('');
- editor.execCommand('inserttable', {numCols: 1, numRows: 1});
- /*插入表格*/
- var tds = editor.body.getElementsByTagName('td');
- tds[0].innerHTML = 'hello';
- setTimeout(function () {
- window.scrollTo(0,0);//保证位置准确
- ua.click(tds[0], {clientX: 10, clientY: 23});
- setTimeout(function () {
- var selectedTds = editor.getUETable(editor.body.firstChild).selectedTds;
- equal(selectedTds.length, 0, '不选中行');
- if (ua.browser.ie>8) {
- ua.checkResult(editor.selection.getRange(), tds[0].firstChild, tds[0].firstChild, 0, 5, false, '检查选中的range');
- } else {
- ua.checkResult(editor.selection.getRange(), tds[0], tds[0], 0, 1, false, '检查选中的range');
- }
- start();
- }, 500);
- }, 500);
- stop();
- });
- test('点击一列的最上边,但是每列只有一行,这时选中单元格中的内容', function () {
- if (ua.browser.ie && ua.browser.ie < 9)return;//todo click事件模拟有问题
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('');
- editor.execCommand('inserttable', {numCols: 1, numRows: 1});
- /*插入表格*/
- stop();
- setTimeout(function () {
- var tds = editor.body.getElementsByTagName('td');
- tds[0].innerHTML = 'hello';
- window.scrollTo(0,0);//保证位置准确
- ua.click(tds[0], {clientX: 81, clientY: 9,pageX: 81, pageY: 9});
- setTimeout(function () {
- var selectedTds = editor.getUETable(editor.body.firstChild).selectedTds;
- equal(selectedTds.length, 0, '不选中列');
- if (ua.browser.ie>8) {
- ua.checkResult(editor.selection.getRange(), tds[0].firstChild, tds[0].firstChild, 0, 5, false, '检查选中的range');
- } else {
- ua.checkResult(editor.selection.getRange(), tds[0], tds[0], 0, 1, false, '检查选中的range');
- }
- start();
- },10);
- }, 50);
- });
- test('点击一列的最上边,选中一列', function () {
- if (ua.browser.ie && ua.browser.ie < 9)return;//todo click事件模拟有问题
- var editor = te.obj[0];
- var range = te.obj[1];
- editor.setContent('');
- editor.execCommand('inserttable', {numCols: 3, numRows: 3});
- /*插入表格*/
- stop();
- setTimeout(function () {
- var tds = editor.body.getElementsByTagName('td');
- tds[0].innerHTML = 'hello';
- window.scrollTo(0,0);
- ua.mousemove(tds[0], {clientX: 81, clientY: 9});
- var space = ua.browser.ie ? '' : ' ';
- var quot = ua.browser.gecko ? '\"' : '';
- equal(editor.body.style.cursor, 'url(' + quot + editor.options.cursorpath + 'h.png' + quot + '),' + space + 'pointer');
- ua.click(tds[0], {clientX: 81, clientY: 9});
- setTimeout(function () {
- var selectedTds = editor.getUETable(editor.body.firstChild).selectedTds;
- equal(selectedTds.length, 3, '选中一列');
- equal(selectedTds[0].innerHTML, 'hello', '检查内容');
- equal(selectedTds[0].className, 'selectTdClass', '检查样式');
- equal(selectedTds[1].className, 'selectTdClass', '检查样式');
- equal(selectedTds[2].className, 'selectTdClass', '检查样式');
- //todo trace 3571
- // ua.click(tds[2],{clientX:370,clientY:9,shiftKey:true});
- // equal(editor.getUETable(editor.body.firstChild).selectedTds.length,9,'');
- start();
- }, 500);
- }, 50);
- });
|