Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_14980201
ueditor
提交
6573cbe5
U
ueditor
项目概览
qq_14980201
/
ueditor
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
ueditor
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6573cbe5
编写于
10月 31, 2013
作者:
Y
yancend
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[test]用例调整
上级
0d302166
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
1050 addition
and
1089 deletion
+1050
-1089
_test/plugins/contextmenu.js
_test/plugins/contextmenu.js
+1032
-1031
_test/plugins/font.js
_test/plugins/font.js
+3
-0
_test/plugins/source.js
_test/plugins/source.js
+1
-1
_test/plugins/table.action.js
_test/plugins/table.action.js
+7
-54
_test/tools/br/js/run.js
_test/tools/br/js/run.js
+7
-3
未找到文件。
_test/plugins/contextmenu.js
浏览文件 @
6573cbe5
此差异已折叠。
点击以展开。
_test/plugins/font.js
浏览文件 @
6573cbe5
...
...
@@ -403,7 +403,9 @@ test('对表格中的文本添加颜色和下划线', function () {
ut
.
setSelected
(
range
);
setTimeout
(
function
()
{
editor
.
execCommand
(
'
underline
'
);
setTimeout
(
function
()
{
ua
.
checkHTMLSameStyle
(
'
<span style="color: rgb(255, 100, 100); text-decoration: underline; ">hello1</span>
'
,
editor
.
document
,
trs
[
0
].
firstChild
,
'
第一个单元格有下划线和前景色
'
);
equal
(
'
<span style="color: rgb(255, 100, 100); text-decoration: underline; ">hello1</span>
'
,
editor
.
document
,
trs
[
0
].
firstChild
,
'
第一个单元格有下划线和前景色
'
);
ua
.
checkHTMLSameStyle
(
'
<span style="color: rgb(255, 100, 100); ">hello2</span>
'
,
editor
.
document
,
trs
[
0
].
lastChild
,
'
第2个单元格有前景色
'
);
ua
.
checkHTMLSameStyle
(
'
<span style="color: rgb(255, 100, 100); ">hello3</span>
'
,
editor
.
document
,
trs
[
1
].
firstChild
,
'
第3个单元格有前景色
'
);
equal
(
trs
[
1
].
firstChild
.
getAttribute
(
'
colspan
'
),
2
,
'
colspan为2
'
);
...
...
@@ -412,6 +414,7 @@ test('对表格中的文本添加颜色和下划线', function () {
setTimeout
(
function
()
{
start
();
},
100
);
},
100
);
},
100
);
},
100
);
},
50
);
...
...
_test/plugins/source.js
浏览文件 @
6573cbe5
...
...
@@ -145,7 +145,7 @@ test('b,i标签,切换源码后自动转换成strong和em', function () {
equal
(
editor
.
getContent
(),
'
<p><strong>加粗的内容</strong><em>斜体的内容<strong>加粗且斜体</strong></em></p>
'
);
});
test
(
'
trace 1734 range的更新/特殊符号的转换
'
,
function
()
{
test
(
'
activ trace 3739
trace 1734 range的更新/特殊符号的转换
'
,
function
()
{
var
editor
=
te
.
obj
[
0
];
editor
.
setContent
(
'
<p>"<></p>
'
);
setTimeout
(
function
()
{
...
...
_test/plugins/table.action.js
浏览文件 @
6573cbe5
...
...
@@ -5,55 +5,8 @@
* Time: 下午4:40
* To change this template use File | Settings | File Templates.
*/
//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('拖拽-最右边的单元格', 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});
// ua.mousedown(tds[4], {clientX: 492, clientY: 21});
// setTimeout(function () {
// equal(editor.body.style.cursor, 'col-resize', '检查鼠标显示');
// 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 > 10, '拖拽后单元格宽度改变');
// start();
// }, 200);
// }, 20);
// stop();
//});
//
//test('', function () {
// stop()
//});
...
...
@@ -179,7 +132,7 @@ test('tableDragable-双击', function () {//tableClicked
var
tds
=
editor
.
body
.
getElementsByTagName
(
'
td
'
);
equal
(
selectedTds
.
length
,
9
,
'
全选
'
);
if
(
ua
.
browser
.
ie
&&
ua
.
browser
.
ie
<
9
)
ua
.
checkResult
(
editor
.
selection
.
getRange
(),
tds
[
0
].
firstChild
,
tds
[
0
].
firstChild
,
0
,
0
,
true
,
'
检查选中的range
'
)
ua
.
checkResult
(
editor
.
selection
.
getRange
(),
tds
[
0
].
firstChild
,
tds
[
0
].
firstChild
,
0
,
0
,
true
,
'
检查选中的range
'
)
;
else
ua
.
checkResult
(
editor
.
selection
.
getRange
(),
tds
[
0
],
tds
[
0
],
0
,
0
,
true
,
'
检查选中的range
'
);
setTimeout
(
function
()
{
...
...
@@ -188,9 +141,9 @@ test('tableDragable-双击', function () {//tableClicked
te
.
dom
.
push
(
document
.
getElementById
(
'
edui_fixedlayer
'
));
start
();
},
500
);
},
2
0
);
},
2
0
);
},
5
0
);
},
6
0
);
},
6
0
);
},
10
0
);
});
stop
();
});
...
...
@@ -322,7 +275,7 @@ test('delete 事件', function () {
/*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
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
];
...
...
@@ -540,7 +493,7 @@ test('拖拽-最右边的单元格', function () {
ua
.
mouseup
(
tds
[
4
],
{
clientX
:
481
,
clientY
:
21
});
setTimeout
(
function
()
{
var
width2
=
te
.
obj
[
0
].
body
.
getElementsByTagName
(
'
td
'
)[
4
].
width
;
ok
(
width1
-
width2
>
10
,
'
拖拽后单元格宽度改变
'
);
ok
(
width1
!=
width2
,
'
拖拽后单元格宽度改变
'
);
start
();
},
200
);
},
20
);
...
...
_test/tools/br/js/run.js
浏览文件 @
6573cbe5
...
...
@@ -2,7 +2,7 @@ function run( kiss, runnext ) {
window
.
document
.
title
=
kiss
;
var
wb
=
window
.
brtest
=
window
.
brtest
||
{};
wb
.
timeout
=
wb
.
timeout
||
6
0000
;
wb
.
timeout
=
wb
.
timeout
||
10
0000
;
wb
.
breakOnError
=
/breakonerror=true/gi
.
test
(
location
.
search
)
||
$
(
'
input#id_control_breakonerror
'
).
attr
(
'
checked
'
);
wb
.
runnext
=
/batchrun=true/gi
.
test
(
location
.
search
)
||
runnext
...
...
@@ -125,10 +125,14 @@ function run( kiss, runnext ) {
/* 隐藏报告区 */
$
(
'
div#id_reportarea
'
).
empty
().
hide
();
/* 展示执行区 */
if
(
ua
.
browser
.
ie
){
if
(
ua
.
browser
.
ie
){
//释放iframe里面占用的内存
if
(
$
(
'
div#id_runningarea
'
)[
0
].
getElementsByTagName
(
'
iframe
'
).
length
){
var
iframe_old
=
$
(
'
div#id_runningarea
'
)[
0
].
getElementsByTagName
(
'
iframe
'
)[
0
];
iframe_old
.
src
=
''
;
iframe_old
.
src
=
"
javascript:false
"
;
iframe_old
.
contentWindow
.
document
.
write
(
''
);
iframe_old
.
contentWindow
.
close
();
CollectGarbage
();
iframe_old
.
parentNode
.
removeChild
(
iframe_old
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录