diff options
author | 2017-05-04 07:48:42 -0400 | |
---|---|---|
committer | 2017-05-04 12:28:17 -0400 | |
commit | b54df0ddd0c6a0372327c5aa3668e5a6458fcd64 (patch) | |
tree | e69cfa9b314a801bd187cf0145d1d4306436229c /ecomp-portal-FE/client/bower_components/jquery.event.drag-new/event.linger/test/interaction.js | |
parent | 39d1e62c84041831bfc52cca73b5ed5efaf57d27 (diff) |
[PORTAL-7] Rebase
This rebasing includes common libraries and common overlays projects
abstraction of components
Change-Id: I9a24a338665c7cd058978e8636bc412d9e2fdce8
Signed-off-by: st782s <statta@research.att.com>
Diffstat (limited to 'ecomp-portal-FE/client/bower_components/jquery.event.drag-new/event.linger/test/interaction.js')
-rw-r--r-- | ecomp-portal-FE/client/bower_components/jquery.event.drag-new/event.linger/test/interaction.js | 231 |
1 files changed, 0 insertions, 231 deletions
diff --git a/ecomp-portal-FE/client/bower_components/jquery.event.drag-new/event.linger/test/interaction.js b/ecomp-portal-FE/client/bower_components/jquery.event.drag-new/event.linger/test/interaction.js deleted file mode 100644 index d4bbf512..00000000 --- a/ecomp-portal-FE/client/bower_components/jquery.event.drag-new/event.linger/test/interaction.js +++ /dev/null @@ -1,231 +0,0 @@ -;(function(){ - - module("Interaction"); - - // a simple re-usable test harness object - var obj = { - init: function( opts ){ - obj.$div = $('<div />') - .css({ - position: 'absolute', - top: 0, - left: 0, - height: 100, - width: 100 - }) - .append('<div class="child" />') - .appendTo( document.body ) - .bind("lingerstart linger lingerend", opts || {}, function( event ){ - obj.counts[ event.type ] += 1; - }); - obj.counts = { lingerstart:0, linger:0, lingerend:0 }; - }, - done: function(){ - obj.$div.remove(); - start(); - } - }; - - asyncTest("defaults",function(){ - - expect( 3 ); - - // prep interaction - obj.init(); - // simulate interaction - obj.$div - .fire("mouseover",{ pageX:50, pageY:50 }) - .fire("mousemove",{ pageX:56, pageY:58 }); // move <= 10 pixels (default speed) - // wait 100 ms (default delay) - setTimeout(function(){ - obj.$div.fire("mouseout",{ pageX:51, pageY:51 }); - // wait 400 ms (default persist) - setTimeout(function(){ - // inspect results - equals( obj.counts.lingerstart, 1, "lingerstart"); - equals( obj.counts.linger, 1, "linger"); - equals( obj.counts.lingerend, 1, "lingerend"); - obj.done(); - }, 400 ); - }, 100 ); - }); - - asyncTest("speed (miss)",function(){ - - expect( 3 ); - - // prep interaction - obj.init({ speed:200 }); - // simulate interaction - obj.$div - .fire("mouseover",{ pageX:50, pageY:50 }) - .fire("mousemove",{ pageX:63, pageY:67 }); // move > 20 pixels (custom speed) - // wait 100 ms (default delay) - setTimeout(function(){ - obj.$div.fire("mouseout",{ pageX:51, pageY:51 }); - // wait 400 ms (default persist) - setTimeout(function(){ - // inspect results - equals( obj.counts.lingerstart, 1, "lingerstart"); - equals( obj.counts.linger, 0, "linger"); - equals( obj.counts.lingerend, 0, "lingerend"); - obj.done(); - }, 400 ); - }, 100 ); - }); - - asyncTest("speed (hit)",function(){ - - expect( 3 ); - - // prep interaction - obj.init({ speed:200 }); - // simulate interaction - obj.$div - .fire("mouseover",{ pageX:50, pageY:50 }) - .fire("mousemove",{ pageX:62, pageY:66 }); // move <= 20 pixels (custom speed) - // wait 100 ms (default delay) - setTimeout(function(){ - obj.$div.fire("mouseout",{ pageX:51, pageY:51 }); - // wait 400 ms (default persist) - setTimeout(function(){ - // inspect results - equals( obj.counts.lingerstart, 1, "lingerstart"); - equals( obj.counts.linger, 1, "linger"); - equals( obj.counts.lingerend, 1, "lingerend"); - obj.done(); - }, 400 ); - }, 100 ); - }); - - asyncTest("delay (miss)",function(){ - - expect( 3 ); - - // prep interaction - obj.init({ delay:200 }); - // simulate interaction - obj.$div - .fire("mouseover",{ pageX:50, pageY:50 }) - .fire("mousemove",{ pageX:56, pageY:58 }); // move <= 10 pixels (default speed) - // wait < 200 ms (custom delay) - setTimeout(function(){ - obj.$div.fire("mouseout",{ pageX:51, pageY:51 }); - // wait 400 ms (default persist) - setTimeout(function(){ - // inspect results - equals( obj.counts.lingerstart, 1, "lingerstart"); - equals( obj.counts.linger, 0, "linger"); - equals( obj.counts.lingerend, 0, "lingerend"); - obj.done(); - }, 400 ); - }, 100 ); - }); - - asyncTest("delay (hit)",function(){ - - expect( 3 ); - - // prep interaction - obj.init({ delay:200 }); - // simulate interaction - obj.$div - .fire("mouseover",{ pageX:50, pageY:50 }) - .fire("mousemove",{ pageX:56, pageY:58 }); // move <= 10 pixels (default speed) - // wait 200 ms (custom delay) - setTimeout(function(){ - obj.$div.fire("mouseout",{ pageX:51, pageY:51 }); - // wait 400 ms (default persist) - setTimeout(function(){ - // inspect results - equals( obj.counts.lingerstart, 1, "lingerstart"); - equals( obj.counts.linger, 1, "linger"); - equals( obj.counts.lingerend, 1, "lingerend"); - obj.done(); - }, 400 ); - }, 200 ); - }); - - asyncTest("persist (miss)",function(){ - - expect( 3 ); - - // prep interaction - obj.init({ persist:200 }); - // simulate interaction - obj.$div - .fire("mouseover",{ pageX:50, pageY:50 }) - .fire("mousemove",{ pageX:56, pageY:58 }); // move <= 10 pixels (default speed) - // wait 100 ms (default delay) - setTimeout(function(){ - obj.$div.fire("mouseout",{ pageX:51, pageY:51 }); - // wait < 200 ms (custom persist) - setTimeout(function(){ - // inspect results - equals( obj.counts.lingerstart, 1, "lingerstart"); - equals( obj.counts.linger, 1, "linger"); - equals( obj.counts.lingerend, 0, "lingerend"); - setTimeout(function(){ - obj.done(); - }, 100 ); - }, 100 ); - }, 100 ); - }); - - asyncTest("persist (hit)",function(){ - - expect( 3 ); - - // prep interaction - obj.init({ persist:200 }); - // simulate interaction - obj.$div - .fire("mouseover",{ pageX:50, pageY:50 }) - .fire("mousemove",{ pageX:56, pageY:58 }); // move <= 10 pixels (default speed) - // wait 100 ms (default delay) - setTimeout(function(){ - obj.$div.fire("mouseout",{ pageX:51, pageY:51 }); - // wait 200 ms (custom persist) - setTimeout(function(){ - // inspect results - equals( obj.counts.lingerstart, 1, "lingerstart"); - equals( obj.counts.linger, 1, "linger"); - equals( obj.counts.lingerend, 1, "lingerend"); - obj.done(); - }, 200 ); - }, 100 ); - - }); - - asyncTest("persist (re-enter)",function(){ - - expect( 3 ); - - // prep interaction - obj.init({ persist:200 }); - // simulate interaction - obj.$div - .fire("mouseover",{ pageX:50, pageY:50 }) - .fire("mousemove",{ pageX:56, pageY:58 }); // move <= 10 pixels (default speed) - // wait 100 ms (default delay) - setTimeout(function(){ - obj.$div.fire("mouseout",{ pageX:51, pageY:51 }) - // wait < 200 ms (custom persist) - setTimeout(function(){ - // re-enter the element - obj.$div.fire("mouseover",{ pageX:50, pageY:50 }); - // wait 200 ms (custom persist) - setTimeout(function(){ - // inspect results - equals( obj.counts.lingerstart, 1, "lingerstart"); - equals( obj.counts.linger, 1, "linger"); - equals( obj.counts.lingerend, 0, "lingerend"); - obj.done(); - }, 200 ); - }, 100 ); - }, 100 ); - - }); - -})(); - |