event-hover-tests.js revision 15ddc967c5d429ed2983719db23b453794ab0338
function setUp() {
body;
if (!testbed) {
}
'<ul id="items">' +
'<li id="item1">' +
'<div id="div1"><p id="p1"># <em id="em1">1</em></p></div>' +
'</li>' +
'<li id="item2">' +
'<div id="div2"><p id="p2"># <em id="em2">2</em></p></div>' +
'</li>' +
'<li id="item3">' +
'<div id="div3"><p id="p3"># <em id="em3">3</em></p></div>' +
'</li>' +
'</ul>');
}
function tearDown() {
if (testbed) {
}
}
testbedReached = false,
testbedReached = true;
}
return !testbedReached;
}, true),
i, len;
if (out) {
}
} else {
}
}
}
name: 'subscribe',
"test node.on('hover', over, out)": function () {
var overCount = 0,
outCount = 0,
overArgCount = 0,
outArgCount = 0,
function over(e) {
overCount++;
overThisObj = this;
overTarget = e.target;
}
function out(e) {
outCount++;
outThisObj = this;
}
mouse('#em1');
mouse("#em1", true);
},
"test container.on('hover', over, out)": function () {
var overCount = 0,
outCount = 0,
overArgCount = 0,
outArgCount = 0,
function over(e) {
overCount++;
overThisObj = this;
overTarget = e.target;
}
function out(e) {
outCount++;
outThisObj = this;
}
mouse('#em1');
mouse("#em1", true);
},
"test Y.on('hover', over, out, '#foo')": function () {
var overCount = 0,
outCount = 0,
overArgCount = 0,
outArgCount = 0,
function over(e) {
overCount++;
overThisObj = this;
overTarget = e.target;
}
function out(e) {
outCount++;
outThisObj = this;
}
mouse('#em1');
mouse("#em1", true);
},
"test nodelist.on('hover', over, out)": function () {
var overCount = 0,
outCount = 0,
overArgCount = 0,
outArgCount = 0,
overType = [],
overPhase = [],
overEType = [],
overTarget = [],
overCurrentTarget = [],
overRelTarget = [],
overThisObj = [],
outType = [],
outPhase = [],
outEType = [],
outTarget = [],
outCurrentTarget = [],
outRelTarget = [],
outThisObj = [];
function over(e) {
overCount++;
overThisObj.push(this);
}
function out(e) {
outCount++;
outThisObj.push(this);
}
},
"test node.delegate('hover', over, out, filter)": function () {
var overCount = 0,
outCount = 0,
overArgCount = 0,
outArgCount = 0,
overType = [],
overPhase = [],
overEType = [],
overTarget = [],
overCurrentTarget = [],
overRelTarget = [],
overThisObj = [],
outType = [],
outPhase = [],
outEType = [],
outTarget = [],
outCurrentTarget = [],
outRelTarget = [],
outThisObj = [],
overContainer = [],
outContainer = [];
function over(e) {
overCount++;
overThisObj.push(this);
}
function out(e) {
outCount++;
outThisObj.push(this);
}
},
"test node.on('hover', over, out, thisObj)": function () {
var overCount = 0,
outCount = 0,
overArgCount = 0,
outArgCount = 0,
function over(e) {
overCount++;
overThisObj = this;
overTarget = e.target;
}
function out(e) {
outCount++;
outThisObj = this;
}
},
"test Y.on('hover', over, out, '#foo', thisObj)": function () {
var overCount = 0,
outCount = 0,
overArgCount = 0,
outArgCount = 0,
function over(e) {
overCount++;
overThisObj = this;
overTarget = e.target;
}
function out(e) {
outCount++;
outThisObj = this;
}
},
"test nodelist.on('hover', over, out, thisObj)": function () {
var overCount = 0,
outCount = 0,
overArgCount = 0,
outArgCount = 0,
overType = [],
overPhase = [],
overEType = [],
overTarget = [],
overCurrentTarget = [],
overRelTarget = [],
overThisObj = [],
overFoo = [],
outType = [],
outPhase = [],
outEType = [],
outTarget = [],
outCurrentTarget = [],
outRelTarget = [],
outThisObj = [],
outFoo = [];
function over(e) {
overCount++;
overThisObj.push(this);
}
function out(e) {
outCount++;
outThisObj.push(this);
}
},
"test node.on('hover', over, out, thisObj, arg)": function () {
var overCount = 0,
outCount = 0,
overArgCount = 0,
outArgCount = 0,
function over(e, x) {
overCount++;
overThisObj = this;
overTarget = e.target;
overArg = x;
}
function out(e, x) {
outCount++;
outThisObj = this;
outArg = x;
}
},
"test Y.on('hover', over, out, '#foo', thisObj, arg)": function () {
var overCount = 0,
outCount = 0,
overArgCount = 0,
outArgCount = 0,
function over(e, x) {
overCount++;
overThisObj = this;
overTarget = e.target;
overArg = x;
}
function out(e, x) {
outCount++;
outThisObj = this;
outArg = x;
}
},
"test nodelist.on('hover', over, out, thisObj, arg)": function () {
var overCount = 0,
outCount = 0,
overArgCount = 0,
outArgCount = 0,
overType = [],
overPhase = [],
overEType = [],
overTarget = [],
overCurrentTarget = [],
overRelTarget = [],
overThisObj = [],
overArg = [],
overFoo = [],
outType = [],
outPhase = [],
outEType = [],
outTarget = [],
outCurrentTarget = [],
outRelTarget = [],
outThisObj = [],
outFoo = [],
outArg = [];
function over(e, x) {
overCount++;
overThisObj.push(this);
}
function out(e, x) {
outCount++;
outThisObj.push(this);
}
},
"test node.on('hover', over, out, null, arg)": function () {
var overCount = 0,
outCount = 0,
overArgCount = 0,
outArgCount = 0,
function over(e, x) {
overCount++;
overThisObj = this;
overTarget = e.target;
overArg = x;
}
function out(e, x) {
outCount++;
outThisObj = this;
outArg = x;
}
},
"test Y.on('hover', over, out, '#foo', null, arg)": function () {
var overCount = 0,
outCount = 0,
overArgCount = 0,
outArgCount = 0,
function over(e, x) {
overCount++;
overThisObj = this;
overTarget = e.target;
overArg = x;
}
function out(e, x) {
outCount++;
outThisObj = this;
outArg = x;
}
},
"test nodelist.on('hover', over, out, null, arg": function () {
var overCount = 0,
outCount = 0,
overArgCount = 0,
outArgCount = 0,
overType = [],
overPhase = [],
overEType = [],
overTarget = [],
overCurrentTarget = [],
overRelTarget = [],
overThisObj = [],
overArg = [],
outType = [],
outPhase = [],
outEType = [],
outTarget = [],
outCurrentTarget = [],
outRelTarget = [],
outThisObj = [],
outArg = [];
function over(e, x) {
overCount++;
overThisObj.push(this);
}
function out(e, x) {
outCount++;
outThisObj.push(this);
}
}
// node.delegate + thisObj + args
// Y.delegate + thisObj + args
}));
name: 'detach',
"test node.on('hover', over, out); node.detach('hover');": function () {
var overCount = 0,
outCount = 0,
},
"test node.on('hover', over, out); node.detach('hover', over);": function () {
var overCount = 0,
outCount = 0,
},
"test node.on('cat|hover', over, out); node.detach('cat|hover');": function () {
var overCount = 0,
outCount = 0,
},
"test node.on('cat|hover', over, out); node.detach('cat|*');": function () {
var overCount = 0,
outCount = 0,
},
"test node.on('hover', over, out); handle.detach();": function () {
var overCount = 0,
outCount = 0,
},
"test node.delegate('hover', over, out, filter); node.detach('hover');": function () {
var overCount = 0,
outCount = 0,
},
"test node.delegate('hover', over, out, filter); node.detach('hover', over);": function () {
var overCount = 0,
outCount = 0,
},
"test node.delegate('cat|hover', over, out, filter); node.detach('cat|hover');": function () {
var overCount = 0,
outCount = 0,
},
"test node.delegate('cat|hover', over, out, filter); node.detach('cat|*');": function () {
var overCount = 0,
outCount = 0,
},
"test node.delegate('hover', over, out, filter); handle.detach();": function () {
var overCount = 0,
outCount = 0,
}
}));