From b9f1d880ce70cb01ef88b2e0d9fd315678c51c89 Mon Sep 17 00:00:00 2001 From: yancend Date: Fri, 25 Apr 2014 11:56:39 +0800 Subject: [PATCH] =?UTF-8?q?[test]=E6=B7=BB=E5=8A=A0getxy=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _test/core/domUtils.js | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/_test/core/domUtils.js b/_test/core/domUtils.js index 43e4ea97..c7ed4e25 100644 --- a/_test/core/domUtils.js +++ b/_test/core/domUtils.js @@ -309,20 +309,21 @@ test( 'split--offset=data.length', function() { } ); /*求相对视窗的位置而不是实际位置*/ -//test( 'getXY', function() { -// var div = te.dom[2]; -// var domUtils = te.obj[3]; -// equal( domUtils.getXY( div )['x'], ua.findPosition( div )[0] - document.documentElement.scrollLeft, 'check X' ); -// equal( domUtils.getXY( div )['y'], ua.findPosition( div )[1] - document.documentElement.scrollTop, 'check Y' ); -// -//} ); +test( 'getXY', function() { + var div = te.dom[2]; + var domUtils = te.obj[3]; + equal( domUtils.getXY( div )['x'], ua.findPosition( div )[0] - document.documentElement.scrollLeft, 'check X' ); + equal( domUtils.getXY( div )['y'], ua.findPosition( div )[1] - document.documentElement.scrollTop, 'check Y' ); + +} ); + -// //test( 'on--跨iframe加载', function() { // expect( 1 ); // var domUtils = te.obj[3]; // var op = { // onafterstart : function( f ) { +// debugger // domUtils.on( f, 'load', function() { // ok( true, 'on load of iframe success' ); // } ); @@ -331,9 +332,10 @@ test( 'split--offset=data.length', function() { // this.finish(); // } // }; +// // ua.frameExt( op ); //} ); -// + //test( 'on- 给不同的dom元素绑定相同的事件', function() { // var domUtils = te.obj[3]; @@ -342,6 +344,7 @@ test( 'split--offset=data.length', function() { // div2.id = 'test2'; // te.dom.push( div2 ); // var handle = function( e ) { +// debugger // ok( true, e.type + ' event triggered' ); // }; // domUtils.on( te.dom[2], 'mouseover', handle); @@ -391,7 +394,7 @@ test( 'split--offset=data.length', function() { // div.appendChild( document.createElement( 'div' ) ); // div.appendChild( document.createElement( 'div' ) ); //} ); -// + //test( "un--取消注册unload事件", function() { // expect( 1 ); // var domUtils = te.obj[3];