54 changes: 27 additions & 27 deletions test/form.html
Expand Up @@ -28,11 +28,11 @@ <h1>Zepto form tests</h1>
<input name="checked_disabled" checked value="ImDisabled" type="checkbox" disabled>
<input name="checked_noValue" checked type="checkbox">

<div>
<fieldset>
<input type="radio" name="radio1" value="r1">
<input type="radio" name="radio1" checked value="r2">
<input type="radio" name="radio1" value="r3">
</div>
</fieldset>

<select name="selectbox">
<option value="selectopt1">select1</option>
Expand Down Expand Up @@ -60,49 +60,49 @@ <h1>Zepto form tests</h1>
case 'object':
if ( !isObjectEquals( obj1[key], obj2[key] ) ) {
return false
};
break;
}
break

case 'function':
if (
typeof( obj2[key] ) == 'undefined' ||
( obj1[key].toString() != obj2[key].toString() )
) {
return false;
};
break;
return false
}
break

default:
if ( obj1[key] != obj2[key] ) {
return false;
return false
}
}
}

for (key in obj2) {
if (typeof( obj1[key] ) == 'undefined') {
return false;
return false
}
}

return true;
return true
}

Evidence.Assertions.assertEqualObject = function(expected, actual, message) {
this._assertExpression(
isObjectEquals(expected, actual),
message || 'Failed assertion.',
'Expected %o, got %o.', expected, actual
);
)
}

Evidence('FormTest', {

testSerializeArray: function (t) {
var loginForm = $('#login_form');
var loginForm = $('#login_form')

t.assertEqual(Function, loginForm.serializeArray.constructor);
t.assertEqual(6, loginForm.serializeArray().length);
t.assertEqual(Function, loginForm.serializeArray.constructor)
t.assertEqual(6, loginForm.serializeArray().length)
t.assertEqualObject(
[
{ name: 'email', value: 'koss@nocorp.me' },
Expand All @@ -114,30 +114,30 @@ <h1>Zepto form tests</h1>

],
loginForm.serializeArray()
);
)
},

testSerialize: function (t) {
var loginForm = $('#login_form');
var loginForm = $('#login_form')

t.assertEqual(Function, loginForm.serialize.constructor);
t.assertEqual( 'string', typeof loginForm.serialize() );
t.assertEqual(Function, loginForm.serialize.constructor)
t.assertEqual( 'string', typeof loginForm.serialize() )

t.assertEqual( 'email=koss%40nocorp.me&password=123456&checked_hasValue=myValue&checked_noValue=on&radio1=r2&selectbox=selectopt1', loginForm.serialize() );
t.assertEqual( 'email=koss%40nocorp.me&password=123456&checked_hasValue=myValue&checked_noValue=on&radio1=r2&selectbox=selectopt1', loginForm.serialize() )
},

testFormSubmit: function (t) {
var eventTriggered = false;
var eventTriggered = false
$('#login_form').submit(function (e) {
eventTriggered = true;
e.preventDefault();
});
$('#login_form').submit();
t.assert(eventTriggered);
eventTriggered = true
e.preventDefault()
})
$('#login_form').submit()
t.assert(eventTriggered)
}

});
})();
})
})()
</script>
</body>
</html>
136 changes: 79 additions & 57 deletions test/fx.html
Expand Up @@ -43,7 +43,7 @@ <h1>Zepto effects tests</h1>
<div id="animtest_2" style="width:40px;height:40px;background:red"></div>
<div id="durationtest_1" style="width:40px;height:40px;background:red"></div>
<div id="durationtest_2" style="width:40px;height:40px;background:red"></div>
<div id="callbacktest" style="width:40px;height:40px;background:red"></div>
<div id="callbacktest" style="width:40px;height:40px;background:red"><div style="width:40px;height:40px;background:blue"></div></div>
<div id="keyframetest" style="width:40px;height:40px;background:red;opacity: 0;"></div>

<div id="anim_zero_duration_callback_test"></div>
Expand All @@ -53,143 +53,165 @@ <h1>Zepto effects tests</h1>

function colorToHex (color) {
if (color.substr(0, 1) === '#') {
return color;
return color
}

var digits = /(.*?)rgb\((\d+), (\d+), (\d+)\)/.exec( color.toLowerCase() ),
red = parseInt(digits[2]),
green = parseInt(digits[3]),
blue = parseInt(digits[4]),
rgb = blue | (green << 8) | (red << 16);
rgb = blue | (green << 8) | (red << 16)

return digits[1] + '#' + rgb.toString(16);
};
return digits[1] + '#' + rgb.toString(16)
}

function defer(fn, delay) {
setTimeout(fn, delay || 0);
setTimeout(fn, delay || 0)
}

function camelize(str) {
return str.replace(/-+(.)?/g, function(_, chr){ return chr ? chr.toUpperCase() : '' })
}

var stylePrefix = '', vendors = {Webkit: 'webkit', Moz: '', O: 'o', ms: 'MS'},
testEl = document.createElement('div');
testEl = document.createElement('div')

$.each(vendors, function(vendor, event){
if (testEl.style[vendor + 'TransitionProperty'] !== undefined) {
stylePrefix = '-' + vendor.toLowerCase() + '-';
return false;
stylePrefix = '-' + vendor.toLowerCase() + '-'
return false
}
});
})

Evidence.Assertions.assertStyle = function(expected, object, property, message) {
if (/^(transform|transition|animation)/.test(property)) property = stylePrefix + property;
if (!('nodeName' in object)) object = object.get(0);
if (/^(transform|transition|animation)/.test(property)) property = stylePrefix + property
if (!('nodeName' in object)) object = object.get(0)

var actual = object.style[camelize(property)],
expression = expected instanceof RegExp ? expected.test(actual) : expected === actual;
expression = expected instanceof RegExp ? expected.test(actual) : expected === actual

this._assertExpression(expression, message || 'Failed assertion.', 'Expected %s, got %s.', expected, actual);
this._assertExpression(expression, message || 'Failed assertion.', 'Expected %s, got %s.', expected, actual)
}

Evidence('ZeptoFXTest', {

testAnimate: function(t){
var el = $('#animtest_1'), el2 = $('#animtest_2');
t.pause();
var el = $('#animtest_1'), el2 = $('#animtest_2')
t.pause()
el.animate({
translate3d: '100px, 100px, 100px',
rotateZ: '90deg',
scale: '0.8',
opacity: 0.5,
'background-color': '#BADA55'
}, 2000, 'ease-out');
}, 200, 'ease-out')

el2.animate({
translate3d: '100px, 100px, 100px',
rotateZ: '-90deg',
'background-color': '#BADA55'
}, {
duration: 1800,
duration: 180,
easing: 'ease-out'
});
})

t.pause()

defer(function(){
t.resume(function(){
t.assertStyle('translate3d(100px, 100px, 100px) rotateZ(90deg) scale(0.8)', el, 'transform');
t.assertStyle('ease-out', el, 'transition-timing-function');
t.assertStyle('2s', el, 'transition-duration');
t.assertStyle('1.8s', el2, 'transition-duration');
t.assertStyle('0.5', el, 'opacity');
t.assertEqual('#BADA55', colorToHex(el.get(0).style.backgroundColor).toUpperCase());
});
});
t.assertStyle('ease-out', el, 'transition-timing-function')
t.assertStyle('0.2s', el, 'transition-duration')
t.assertStyle('0.18s', el2, 'transition-duration')

t.pause()
defer(function(){
t.resume(function(){
t.assertStyle('translate3d(100px, 100px, 100px) rotateZ(90deg) scale(0.8)', el, 'transform')
t.assertStyle('0.5', el, 'opacity')
t.assertEqual('#BADA55', colorToHex(el.get(0).style.backgroundColor).toUpperCase())
})
}, 250)
})
}, 1)
},

testDuration: function(t){
t.pause();
var el1 = $('#durationtest_1').anim({
translate3d: '100px, 100px, 100px',
rotateZ: '90deg',
opacity: 0.5
});
})

var el2 = $('#durationtest_2').anim({
translate3d: '100px, 100px, 100px',
rotateZ: '90deg',
opacity: 0.5
}, 0);
}, 0)

t.pause()
defer(function(){
t.resume(function(){
t.assertStyle('0.4s', el1, 'transition-duration');
t.assertStyle('0s', el2, 'transition-duration');
});
});
t.assertStyle('0.4s', el1, 'transition-duration')
t.assertStyle('0s', el2, 'transition-duration')
})
}, 1)
},

testCallback: function(t){
t.pause();
var duration = 250; //Milliseconds
var start = new Date().getTime();
var duration = 250, start = new Date().getTime()
t.pause()

$('#callbacktest').anim({
translate3d: '100px, 100px, 100px',
rotateZ: '90deg',
opacity: 0.5
}, duration / 1000, 'linear',
function(){
var context = this;
var context = this
t.resume(function(){
t.assert($(context).is('#callbacktest'), "context for callback is wrong");
t.assert((new Date().getTime() - start) >= duration);
t.assertStyle(/^(none( 0s ease 0s ?)?)?$/, context, 'transition');
});
});
t.assert($(context).is('#callbacktest'), "context for callback is wrong")
t.assert((new Date().getTime() - start) >= duration, 'Fired too early')
t.assertStyle('', context, 'transition')
t.assertStyle('', context, 'transition-property')
t.assertStyle('', context, 'transition-timing-function')
t.assertStyle('', context, 'transition-duration')
t.assertStyle('', context, 'animation-name')
t.assertStyle('', context, 'animation-duration')
})
})
},

testBubbling: function(t){
$('#callbacktest div').anim({ opacity: 0.0 }, 0.1, 'linear')

var el = $('#anim_zero_duration_callback_test'),
callbackCalled = false;
callbackCalled = false

el.anim({ opacity: 0.5 }, 0, 'linear', function () {
t.assert($(this).is('#anim_zero_duration_callback_test'), "context for callback is wrong");
t.assertStyle('0.5', this, 'opacity');
callbackCalled = true;
});
t.assert($(this).is('#anim_zero_duration_callback_test'), "context for callback is wrong")
t.assertStyle('0.5', this, 'opacity')
callbackCalled = true
})

defer(function(){ t.assert(callbackCalled) }, 30);
t.pause()
defer(function(){
t.resume(function(){
t.assert(callbackCalled)
})
},30)
},

testKeyFrameAnimation: function (t) {
t.pause();
var el = $('#keyframetest').anim('animName', 2);
testKeyFrameAnimation: function(t){
t.pause()
var el = $('#keyframetest').anim('animName', 2)
defer(function(){
t.resume(function(){
t.assertStyle('animName', el, 'animation-name');
});
});
t.assertStyle('animName', el, 'animation-name')
})
})
}
});
})();
})
})()
</script>
</body>
</html>
6 changes: 6 additions & 0 deletions test/fx_functional.html
Expand Up @@ -29,5 +29,11 @@ <h1>Zepto fx functional</h1>
<button onclick="$('#fx_test').fadeIn('slow')">Fade in</button>
<button onclick="$('#fx_test').fadeOut('slow')">Fade out</button>
<button onclick="$('#fx_test').fadeToggle('slow')">Fade toggle</button>

<div id="browser"> </div>

<script>
$('#browser').text(navigator.userAgent)
</script>
</body>
</html>
12 changes: 8 additions & 4 deletions test/gesture_functional.html
Expand Up @@ -16,17 +16,21 @@ <h1>Zepto gestures functional test</h1>
gesture events test
</div>

<div id="browser"> </div>

<script>
$('#browser').text(navigator.userAgent)

$('#gesture_test')
.pinch(function(){
$(this).append(' | pinch!');
$(this).append(' | pinch!')
})
.pinchIn(function(){
$(this).append(' | pinch in!');
$(this).append(' | pinch in!')
})
.pinchOut(function(){
$(this).append(' | pinch out!');
});
$(this).append(' | pinch out!')
})
</script>
</body>
</html>
18 changes: 9 additions & 9 deletions test/polyfill.html
Expand Up @@ -22,31 +22,31 @@ <h1>Compatibility tests</h1>

// test to see if we augment String.prototype.trim if not supported natively
testTrim: function(t){
t.assertEqual("blah", " blah ".trim());
t.assertEqual("blah", " blah ".trim())
},

// test to see if we augment Array.prototype.reduceif not supported natively
testReduce: function(t){
t.assertEqual(
10,
[0,1,2,3,4].reduce(function(p,c){ return p+c })
);
)

t.assertEqual(
20,
[0,1,2,3,4].reduce(function(p,c){ return p+c }, 10)
);
)

var flattened = [[0,1], [2,3], [4,5]].reduce(function(a,b){
return a.concat(b);
});
return a.concat(b)
})

t.assertEqual(6, flattened.length);
t.assertEqual(6, flattened.length)

for(var i=0;i<6;i++) t.assertEqual(i, flattened[i]);
for(var i=0;i<6;i++) t.assertEqual(i, flattened[i])
}
});
})();
})
})()
</script>
</body>
</html>
69 changes: 69 additions & 0 deletions test/runner.coffee
@@ -0,0 +1,69 @@
# Test runner for PhantomJS <phantomjs.org>
# Usage:
# $ phantomjs test/runner.coffee [<page1>, <page2>, ...]
#
# When no test pages specified, runs all automated tests.

system = require('system')
fs = require('fs')

if system.args.length > 1
# list of test pages to run
suites = system.args.slice(1)
else
# by default, run all test/*.html pages
modules = 'zepto ajax data detect event form fx selector stack'.split /\s+/
suites = modules.map (name)-> "test/#{name}.html"

page = require('webpage').create()

page.onConsoleMessage = (msg) ->
console.log msg

page.onError = (msg, trace) ->
console.log 'ERROR: ' + msg

# used for waiting until the tests finish running
waitFor = (testFn, onReady, timeout=3000) ->
start = new Date()
interval = setInterval ->
if testFn()
clearInterval interval
onReady()
else if new Date() - start > timeout
console.log "timed out."
phantom.exit(1)
, 100

loadNextSuite = ->
if not suites.length
phantom.exit()
else
url = suites.shift() + "?verbosity=WARN"
# PhantomJS chokes on the query string on relative paths
url = "file://#{fs.workingDirectory}/#{url}" if not /:\/\//.test url

page.open url, (status) ->
if status isnt "success"
console.log "failed opening #{url}"
phantom.exit(1)

waitFor ->
page.evaluate ->
# the "#results" element needs to have the "finished" class
res = document.getElementById 'results'
/finished/.test res.className if res
, ->
passed = page.evaluate ->
res = document.getElementById 'results'
paths = location.pathname.split('/')
# echo test results to the console
console.log "#{paths[paths.length - 1]} - " + res.textContent
/passed/.test res.className

if passed
loadNextSuite()
else
phantom.exit(1)

loadNextSuite()
60 changes: 60 additions & 0 deletions test/selector.html
@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="test.css">
<title>Zepto selector tests</title>
<script src="../vendor/evidence.js"></script>
<script src="evidence_runner.js"></script>
<script src="../src/polyfill.js"></script>
<script src="../src/zepto.js"></script>
<script src="../src/selector.js"></script>
</head>
<body>
<h1>Zepto selector tests</h1>
<p id="results">
Running… see browser console for results
</p>
<div id="fixtures">
<ul id=list><li>one</li><li>two</li><ul>
<div class=visibility id=vis>look at me!</div>
<div class=visibility id=invis style="display:none">can't see me</div>
</div><!-- fixtures -->

<script>
(function(){
Evidence('SelectorTest', {
testFirst: function(t) {
var li = $('#list li:first')
t.assertEqual(1, li.size())
t.assertEqual('one', li.text())
t.assertEqual('two', $('#list li:eq(1)').text())
},
testLast: function(t) {
var li = $('#list li:last')
t.assertEqual(1, li.size())
t.assertEqual('two', li.text())
},
testParent: function(t) {
var list = $('#list li:parent')
t.assertEqual(1, list.size())
t.assertEqual('list', list.attr('id'))
},
testContains: function(t) {
t.assertEqual('two', $('#list li:contains("two")').text())
},
testVisibility: function(t) {
t.assertEqual('vis', $('.visibility:visible').attr('id'))
t.assertEqual('invis', $('.visibility:hidden').attr('id'))
},
testIs: function(t) {
t.assert($('#list').is('ul'))
t.assert($('#vis').is(':visible'))
t.refute($('#invis').is(':visible'))
}
})
})()
</script>
</body>
</html>
64 changes: 64 additions & 0 deletions test/stack.html
@@ -0,0 +1,64 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="test.css">
<title>Zepto Stack unit tests</title>
<script src="../vendor/evidence.js"></script>
<script src="evidence_runner.js"></script>
<script src="../src/polyfill.js"></script>
<script src="../src/zepto.js"></script>
<script src="../src/stack.js"></script>
</head>
<body>
<h1>Zepto DOM unit tests</h1>
<p id="results">
Running… see browser console for results
</p>
<div id="fixtures">

<div id="end_test">
<div class="end_one"><b><span></span></b></div>
<div class="end_two"><b><span>1</span><span>2</span></b></div>
</div>

<div id="andself_test">
<div class="one"></div>
<div class="two"></div>
<div class="three"></div>
<div class="four"></div>
</div>

</div><!-- fixtures -->

<script>
(function(){

Evidence('ZeptoTest', {

testEnd: function (t) {
t.assert($().end().length == 0)

var $endTest = $('#end_test')
var $endTest2 = $('#end_test').find('div').find('span').end().end()
t.assertEqual($endTest.length, $endTest2.length)
t.assertEqual($endTest.get(0), $endTest2.get(0))
},

testAndSelf: function (t) {
var testDiv = $('#andself_test'),
secondEl = $('.two', testDiv),
thirdEl = $('.three', testDiv),
nextAndSelf = secondEl.next().andSelf()

t.assert(secondEl.get(0), nextAndSelf.get(0))
t.assert(thirdEl.get(0), nextAndSelf.get(1))
}

})

})()
</script>
</body>
</html>
229 changes: 229 additions & 0 deletions test/touch.html
@@ -0,0 +1,229 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="test.css">
<title>Zepto touch unit tests</title>
<script src="../vendor/evidence.js"></script>
<script src="evidence_runner.js"></script>
<script src="../src/polyfill.js"></script>
<script src="../src/zepto.js"></script>
<script src="../src/event.js"></script>
<script src="../src/touch.js"></script>
</head>
<body>
<h1>Touch tests</h1>
<p id="results">
Running… see browser console for results
</p>

<style>
#test {
position: absolute;
left: 0;
top: 0;
width: 100px;
height: 50px;
}
</style>

<script>
(function(){

// Fire a simulated touch event.
// While it is possible to fire real touch events,
// there are cross-browser issues, and this way we
// can test touch events in browsers that don't
// actually support touch input (like desktop Safari).
//
// Zepto's touch module only uses the `pageX/Y` and `target`
// properties of the first touch in the `touches` TouchList
function fire(type, element, x, y) {
var event = document.createEvent('Event'),
touch = { pageX: x, pageY: y, target: element }

event.initEvent('touch'+type, true, true)
event.touches = [touch]

element.dispatchEvent(event)
}

function down(element, x, y) {
fire('start', element, x, y)
}
function move(element, x,y) {
fire('move', element, x, y)
}
function up(element) {
fire('end', element)
}

Evidence('TouchTest', {
setUp: function(){
$('<div id=test>TEST ELEMENT</div>').appendTo('body')
},

tearDown: function(){
$('#test').off()
$('#test').remove()
},

testTap: function(t){
var count = 0, element = $('#test').get(0)

$('#test').on('tap', function(){
count++
})

down(element, 10, 10)
up(element)

t.assertEqual(1, count)
},

testSingleTapDoesNotInterfereWithTappingTwice: function(t){
var count = 0, element = $('#test').get(0)

$('#test').on('tap', function(){
count++
})

down(element, 10, 10)
up(element)

t.pause()
setTimeout(function(){
down(element, 10, 10)

t.resume(function(){
t.pause()

setTimeout(function(){
up(element)
t.resume(function(){
t.assertEqual(2, count)
})
}, 200)
})
}, 200)
},

// should be fired if there is one tap within 250ms
testSingleTap: function(t){
var singleCount = 0, doubleCount = 0, element = $('#test').get(0)

$('#test').on('singleTap', function(){
singleCount++
}).on('doubleTap', function(){
doubleCount++
})

down(element, 10, 10)
up(element)

t.pause()
setTimeout(function(){
t.resume(function(){
t.assertEqual(1, singleCount)
t.assertEqual(0, doubleCount)
})
}, 300)
},

// should be fired if there are two taps within 250ms
testDoubleTap: function(t){
var singleCount = 0, doubleCount = 0, element = $('#test').get(0)

$('#test').on('singleTap', function(){
singleCount++
}).on('doubleTap', function(){
doubleCount++
})

down(element, 10, 10)
up(element)

t.pause()
setTimeout(function(){
down(element, 12, 12)
up(element)

t.resume(function(){
t.assertEqual(0, singleCount)
t.assertEqual(1, doubleCount)
})
}, 100)
},

// should be fired if the finger is down in the same location for >750ms
testLongTap: function(t){
var count = 0, element = $('#test').get(0)

$('#test').on('longTap', function(){
count++
})

down(element, 10, 10)

t.pause()
setTimeout(function(){
up(element)

t.resume(function(){
t.assertEqual(1, count)
})
}, 900)
},

testLongTapDoesNotFireIfFingerIsMoved: function(t){
var count = 0, element = $('#test').get(0)

$('#test').on('longTap', function(){
count++
})

down(element, 10, 10)

t.pause()
setTimeout(function(){
move(element, 50, 10)
t.resume(function(){
t.pause()
setTimeout(function(){
up(element)
t.resume(function(){
t.assertEqual(0, count)
})
}, 450)
})
}, 450)
},

testSwipe: function(t){
var swipeCount = 0, element = $('#test').get(0)

$('#test').on('swipe', function(){
swipeCount++
})

down(element, 10, 10)

t.pause()
setTimeout(function(){
move(element, 70, 10)
up(element)

t.resume(function(){
t.assertEqual(1, swipeCount)
})
}, 50)
}

// TODO: test swipes in specific directions
})

})()
</script>
</body>
</html>
27 changes: 17 additions & 10 deletions test/touch_functional.html
Expand Up @@ -16,33 +16,40 @@ <h1>Zepto touch functional test</h1>
touch events test
</div>

<div id="browser"> </div>

<script>
$('body').bind('touchmove', function (e) {e.preventDefault();} );
$('#browser').text(navigator.userAgent)

$('body').bind('touchmove', function(e){ e.preventDefault() })
$('#touch_test')
.tap(function(){
$(this).append(' | tap!');
$(this).append(' | tap!')
})
.doubleTap(function(){
$(this).append(' | double tap!');
$(this).append(' | double tap!')
})
.swipe(function(){
$(this).append(' | swipe!');
$(this).append(' | swipe!')
})
.swipeLeft(function(){
$(this).append(' | swipe left!');
$(this).append(' | swipe left!')
})
.swipeRight(function(){
$(this).append(' | swipe right!');
$(this).append(' | swipe right!')
})
.swipeUp(function(){
$(this).append(' | swipe up!');
$(this).append(' | swipe up!')
})
.swipeDown(function(){
$(this).append(' | swipe down!');
$(this).append(' | swipe down!')
})
.longTap(function(){
$(this).append(' | long tap!');
});
$(this).append(' | long tap!')
})
.singleTap(function(){
$(this).append(' | single tap!')
})
</script>
</body>
</html>
35 changes: 23 additions & 12 deletions test/touchcancel_functional.html
Expand Up @@ -11,37 +11,48 @@
</head>
<body>
<h1>Zepto touch functional test</h1>
<p>Double-tap and hold until the JavaScript alert occurs. After closing the
alert, tap again. Without touchcancel you will see a double tap instead of a tap.</p>

<p>
Double-tap and hold until the JavaScript alert occurs. After closing the
alert, tap again. Without touchcancel you will see a double tap instead of a tap.
</p>

<div id="touch_test" style="width: 200px; height: 200px; background: #ddd">
touch events test
</div>

<div id="browser"> </div>

<script>
setTimeout(function () {alert("Alert! Now tap again, you should see a tap!, not a double tap!");}, 3000);
$('body').bind('touchmove', function (e) {e.preventDefault();} );
$('#browser').text(navigator.userAgent)

setTimeout(function(){
alert("Alert! Now tap again, you should see a tap!, not a double tap!")
}, 3000)

$('body').bind('touchmove', function(e){ e.preventDefault() })
$('#touch_test')
.tap(function(){
$(this).append(' | tap!');
$(this).append(' | tap!')
})
.doubleTap(function(){
$(this).append(' | double tap!');
$(this).append(' | double tap!')
})
.swipe(function(){
$(this).append(' | swipe!');
$(this).append(' | swipe!')
})
.swipeLeft(function(){
$(this).append(' | swipe left!');
$(this).append(' | swipe left!')
})
.swipeRight(function(){
$(this).append(' | swipe right!');
$(this).append(' | swipe right!')
})
.swipeUp(function(){
$(this).append(' | swipe up!');
$(this).append(' | swipe up!')
})
.swipeDown(function(){
$(this).append(' | swipe down!');
});
$(this).append(' | swipe down!')
})

</script>
</body>
Expand Down
2,329 changes: 1,288 additions & 1,041 deletions test/zepto.html

Large diffs are not rendered by default.

202 changes: 0 additions & 202 deletions vendor/google-compiler/COPYING

This file was deleted.

289 changes: 0 additions & 289 deletions vendor/google-compiler/README

This file was deleted.

Binary file removed vendor/google-compiler/compiler.jar
Binary file not shown.
140 changes: 0 additions & 140 deletions vendor/yuicompressor/README

This file was deleted.

Binary file removed vendor/yuicompressor/yuicompressor-2.4.2.jar
Binary file not shown.