提交 253e8f31 编写于 作者: L luqiong

[test]

上级 0332e652
......@@ -61,14 +61,15 @@ test( '删除时不会删除block元素', function() {
range.selectNode( editor.body.firstChild ).select();
editor.execCommand( 'cleardoc' );
equal( editor.body.lastChild.tagName.toLowerCase(), 'p', 'h1替换为p' );
ua.manualDeleteFillData(editor.body);
if ( !baidu.editor.browser.ie )
equal( editor.body.lastChild.innerHTML, '<br>', '内容被删除了' );
else
equal( editor.body.lastChild.innerHTML, '', '内容被删除了' );
if(!ua.browser.opera){
range = editor.selection.getRange();
equal( range.startContainer.tagName.toLowerCase(), 'p', '光标位置' );
}
// if(!ua.browser.opera){
// range = editor.selection.getRange();
// equal( range.startContainer.tagName.toLowerCase(), 'p', '光标位置' );
// }
start();
},50);
stop();
......@@ -95,6 +96,7 @@ test( '全选后删除', function() {
editor.focus();
editor.execCommand( 'selectall' );
editor.execCommand( 'cleardoc' );
ua.manualDeleteFillData(editor.body);
equal( editor.body.childNodes.length, 1, '删除后只剩一个bolock元素' );
equal( editor.body.firstChild.tagName.toLowerCase(), 'p', '删除后只剩一个p' );
if ( !UE.browser.ie )
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册