/
fx.html
38 lines (33 loc) · 1.14 KB
/
fx.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Zepto FX unit tests</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script src="../src/zepto.js"></script>
<script src="../src/fx.js"></script>
<script src="evidence.js"></script>
</head>
<body>
<h1>Zepto FX unit tests</h1>
<p>
See the browser console for results.
</p>
<div id="animtest" style="width:40px;height:40px;background:red"></div>
<script>
Evidence.TestCase.extend('ZeptoFXTest', {
testAnim: function(t){
var el = $('#animtest').get(0);
$('#animtest').anim({
translate3d: '100px, 100px, 100px',
rotateZ: '90deg',
opacity: 0.5
}, 2, 'ease-out');
t.assertEqual('translate3d(100px, 100px, 100px) rotateZ(90deg)', el.style.webkitTransform);
t.assertEqual('ease-out', el.style.webkitTransitionTimingFunction);
t.assertEqual('0.5', el.style.opacity);
}
});
</script>
</body>
</html>