Permalink
Browse files

Merge branch 'dev' of github.com:ChineseDron/Tangram-component into dev

  • Loading branch information...
2 parents 7948636 + b721cf0 commit 204941b244bfa4873e784c15e84ced68a6a009ce @ChineseDron ChineseDron committed Dec 31, 2011
View
4 test/baidu/fx/mask.js
@@ -11,7 +11,7 @@ test('dom', function() {
$(t).css('position', 'absolute');
baidu.fx.mask(t, {
onafterfinish : function() {
- equals(this._className, 'baidu.fx.mask', 'after finish');
+ equals(this.__type, 'baidu.fx.mask', 'after finish');
start();
}
});
@@ -27,7 +27,7 @@ test('id', function() {
$(t).css('position', 'absolute');
h = baidu.fx.mask(t, {
onafterfinish : function() {
- equals(this._className, 'baidu.fx.mask');
+ equals(this.__type, 'baidu.fx.mask');
start();
}
});
View
2 test/baidu/ui/Calendar.js
@@ -217,7 +217,7 @@ module('baidu.ui.Calendar');
var g = function(id, child) {
var _id = '';
if (id.charAt(0) == '#')
- _id = '#' + ui.getId(id.substr(1));
+ _id = '#' + ui.getId(id.substr(1)).replace("$", "\\$");
else if (id.charAt(0) == '.')
_id = '.' + ui.getClass(id.substr(1));
child && (_id += ' ' + child);
View
8 test/baidu/ui/Menubar/Menubar$fx.js
@@ -25,7 +25,7 @@ test('Open a common Menubar(fadeIn) '
+ 'a custom onafterfinish function');
var len = baidu.fx.current(menu.getBody()).length;
equal(
- baidu.fx.current(menu.getBody())[len - 1]['_className'],
+ baidu.fx.current(menu.getBody())[len - 1]['__type'],
'baidu.fx.fadeIn', 'The menubar fadeIn');
menu.close();
}
@@ -40,7 +40,7 @@ test('Open a common Menubar(fadeIn) '
+ 'a custom onafterfinish function');
var len = baidu.fx.current(menu.getBody()).length;
equal(
- baidu.fx.current(menu.getBody())[len - 1]['_className'],
+ baidu.fx.current(menu.getBody())[len - 1]['__type'],
'baidu.fx.fadeOut', 'The menubar fadeOut');
start();
}
@@ -72,7 +72,7 @@ test('Open a common Menubar(expand) and'
showFxOptions : {
onafterfinish : function() {
var len = baidu.fx.current(menu.getBody()).length;
- var fx = baidu.fx.current(menu.getBody())[len - 1]['_className'];
+ var fx = baidu.fx.current(menu.getBody())[len - 1]['__type'];
var guid = baidu.fx.current(menu.getBody())[len - 1]['guid'];
ok(fx == 'baidu.fx.expand_collapse',
'The menubar expand');
@@ -82,7 +82,7 @@ test('Open a common Menubar(expand) and'
hideFxOptions : {
onafterfinish : function() {
var len = baidu.fx.current(menu.getBody()).length;
- var fx = baidu.fx.current(menu.getBody())[len - 1]['_className'];
+ var fx = baidu.fx.current(menu.getBody())[len - 1]['__type'];
var guid = baidu.fx.current(menu.getBody())[len - 1]['guid'];
ok((fx == 'baidu.fx.expand_collapse')
&& guid != baidu.fx
View
8 test/baidu/ui/Tooltip/Tooltip$fx.js
@@ -14,15 +14,15 @@ test('Open a common tooltip(fadeIn) and '
showFxOptions : {
onafterfinish : function() {
var len = baidu.fx.current(tp.getMain()).length;
- equal(baidu.fx.current(tp.getMain())[len-1]['_className'],
+ equal(baidu.fx.current(tp.getMain())[len-1]['__type'],
'baidu.fx.fadeIn', 'The tooltip fadeIn');
tp.close();
}
},
hideFxOptions : {
onafterfinish : function() {
var len = baidu.fx.current(tp.getMain()).length;
- equal(baidu.fx.current(tp.getMain())[len-1]['_className'],
+ equal(baidu.fx.current(tp.getMain())[len-1]['__type'],
'baidu.fx.fadeOut', 'The tooltip fadeOut');
start();
}
@@ -52,7 +52,7 @@ test('Open a common tooltip(expand) and '
onafterfinish : function() {
var len = baidu.fx.current(tp.getMain()).length;
var len = baidu.fx.current(tp.getMain()).length;
- var fx = baidu.fx.current(tp.getMain())[len-1]['_className'];
+ var fx = baidu.fx.current(tp.getMain())[len-1]['__type'];
var guid = baidu.fx.current(tp.getMain())[len-1]['guid'];
ok(fx == 'baidu.fx.expand_collapse', 'The tooltip expand');
tp.close();
@@ -61,7 +61,7 @@ test('Open a common tooltip(expand) and '
hideFxOptions : {
onafterfinish : function() {
var len = baidu.fx.current(tp.getMain()).length;
- var fx = baidu.fx.current(tp.getMain())[len-1]['_className'];
+ var fx = baidu.fx.current(tp.getMain())[len-1]['__type'];
var guid = baidu.fx.current(tp.getMain())[len-1]['guid'];
ok((fx == 'baidu.fx.expand_collapse') &&
guid != baidu.fx.current(tp.getMain())[len-1]['_guid'],
View
2 test/baidu/ui/Tree.js
@@ -147,7 +147,7 @@ test('TreeNode constructor', function() {
});
equals(node.uiType, 'tree-node', 'check ui type');
equals(node.type, 'leaf', 'check node type');
- ok(/TANGRAM__[a-z]+/.test(node.id), 'check node id : ' + node.id);
+ ok(/TANGRAM\$\d+/.test(node.id), 'check node id : ' + node.id);
});
test('TreeNode function appendData', function() {

0 comments on commit 204941b

Please sign in to comment.