harmony 0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +5 -0
- data/LICENSE +19 -0
- data/Manifest +117 -0
- data/README.md +155 -0
- data/Rakefile +39 -0
- data/docs.watchr +25 -0
- data/harmony.gemspec +18 -0
- data/lib/harmony.rb +5 -0
- data/lib/harmony/page.rb +123 -0
- data/specs.watchr +36 -0
- data/test/harmony_test.rb +8 -0
- data/test/page_test.rb +73 -0
- data/test/test_helper.rb +13 -0
- data/vendor/README +1 -0
- data/vendor/envjs/README +36 -0
- data/vendor/envjs/bin/envjsrb +255 -0
- data/vendor/envjs/bin/jquery-1.2.6-test.js +33 -0
- data/vendor/envjs/bin/jquery-1.3.1-test.js +33 -0
- data/vendor/envjs/bin/jquery-1.3.2-test.js +106 -0
- data/vendor/envjs/bin/prototype-1.6.0.3-test.js +82 -0
- data/vendor/envjs/bin/prototype_1.6.0.3_tmpl.txt +27 -0
- data/vendor/envjs/bin/test-jquery.sh +58 -0
- data/vendor/envjs/bin/test-prototype.sh +54 -0
- data/vendor/envjs/bin/tidy +0 -0
- data/vendor/envjs/lib/envjs.rb +23 -0
- data/vendor/envjs/lib/envjs/env.js +21665 -0
- data/vendor/envjs/lib/envjs/net.rb +3 -0
- data/vendor/envjs/lib/envjs/net/cgi.rb +94 -0
- data/vendor/envjs/lib/envjs/net/file.rb +75 -0
- data/vendor/envjs/lib/envjs/options.rb +11 -0
- data/vendor/envjs/lib/envjs/runtime.rb +351 -0
- data/vendor/envjs/lib/envjs/tempfile.rb +24 -0
- data/vendor/envjs/test/base64.js +80 -0
- data/vendor/envjs/test/call-load-test.js +15 -0
- data/vendor/envjs/test/data.js +45 -0
- data/vendor/envjs/test/debug.js +53 -0
- data/vendor/envjs/test/firebug/errorIcon.png +0 -0
- data/vendor/envjs/test/firebug/firebug.css +209 -0
- data/vendor/envjs/test/firebug/firebug.html +23 -0
- data/vendor/envjs/test/firebug/firebug.js +672 -0
- data/vendor/envjs/test/firebug/firebugx.js +10 -0
- data/vendor/envjs/test/firebug/infoIcon.png +0 -0
- data/vendor/envjs/test/firebug/warningIcon.png +0 -0
- data/vendor/envjs/test/fixtures/html/events.html +171 -0
- data/vendor/envjs/test/fixtures/html/iframe1.html +46 -0
- data/vendor/envjs/test/fixtures/html/iframe1a.html +46 -0
- data/vendor/envjs/test/fixtures/html/iframe2.html +45 -0
- data/vendor/envjs/test/fixtures/html/iframe3.html +28 -0
- data/vendor/envjs/test/fixtures/html/iframeN.html +57 -0
- data/vendor/envjs/test/fixtures/html/malformed.html +181 -0
- data/vendor/envjs/test/fixtures/html/scope.html +81 -0
- data/vendor/envjs/test/fixtures/html/trivial.html +19 -0
- data/vendor/envjs/test/fixtures/html/with_js.html +26 -0
- data/vendor/envjs/test/fixtures/images/icon-blue.png +0 -0
- data/vendor/envjs/test/fixtures/js/external_script.js +1 -0
- data/vendor/envjs/test/fixtures/js/script.js +1 -0
- data/vendor/envjs/test/fixtures/js/script_error.js +2 -0
- data/vendor/envjs/test/html/events.html +171 -0
- data/vendor/envjs/test/html/iframe1.html +46 -0
- data/vendor/envjs/test/html/iframe1a.html +46 -0
- data/vendor/envjs/test/html/iframe2.html +45 -0
- data/vendor/envjs/test/html/iframe3.html +30 -0
- data/vendor/envjs/test/html/iframeN.html +57 -0
- data/vendor/envjs/test/html/malformed.html +181 -0
- data/vendor/envjs/test/html/scope.html +87 -0
- data/vendor/envjs/test/html/script.js +1 -0
- data/vendor/envjs/test/html/trivial.html +19 -0
- data/vendor/envjs/test/html/with_js.html +26 -0
- data/vendor/envjs/test/index.html +328 -0
- data/vendor/envjs/test/java-prototype.js +9 -0
- data/vendor/envjs/test/primary-tests.js +24 -0
- data/vendor/envjs/test/prototype-test.js +13 -0
- data/vendor/envjs/test/qunit.js +61 -0
- data/vendor/envjs/test/qunit/qunit/qunit.css +17 -0
- data/vendor/envjs/test/qunit/qunit/qunit.js +997 -0
- data/vendor/envjs/test/scope.rb +25 -0
- data/vendor/envjs/test/specs/dist/env.spec.js +1534 -0
- data/vendor/envjs/test/specs/envjs.spec.css +46 -0
- data/vendor/envjs/test/specs/parser/html.js +31 -0
- data/vendor/envjs/test/specs/parser/spec.html +40 -0
- data/vendor/envjs/test/specs/parser/xml.js +31 -0
- data/vendor/envjs/test/specs/qunit.bdd.js +210 -0
- data/vendor/envjs/test/specs/qunit.css +17 -0
- data/vendor/envjs/test/specs/qunit.js +997 -0
- data/vendor/envjs/test/specs/template/spec-0.js +31 -0
- data/vendor/envjs/test/specs/template/spec-1.js +31 -0
- data/vendor/envjs/test/specs/template/spec.html +40 -0
- data/vendor/envjs/test/specs/window/css.js +23 -0
- data/vendor/envjs/test/specs/window/dialog.js +25 -0
- data/vendor/envjs/test/specs/window/document.js +23 -0
- data/vendor/envjs/test/specs/window/event.js +25 -0
- data/vendor/envjs/test/specs/window/history.js +34 -0
- data/vendor/envjs/test/specs/window/location.js +34 -0
- data/vendor/envjs/test/specs/window/navigator.js +71 -0
- data/vendor/envjs/test/specs/window/screen.js +42 -0
- data/vendor/envjs/test/specs/window/spec.html +48 -0
- data/vendor/envjs/test/specs/window/timer.js +26 -0
- data/vendor/envjs/test/specs/window/window.js +53 -0
- data/vendor/envjs/test/specs/xhr/spec.html +47 -0
- data/vendor/envjs/test/specs/xhr/xhr.js +31 -0
- data/vendor/envjs/test/test.js +10 -0
- data/vendor/envjs/test/unit/dom.js +44 -0
- data/vendor/envjs/test/unit/elementmembers.js +60 -0
- data/vendor/envjs/test/unit/events.js +195 -0
- data/vendor/envjs/test/unit/fixtures/external_script.js +1 -0
- data/vendor/envjs/test/unit/iframe.js +234 -0
- data/vendor/envjs/test/unit/multi-window.js +212 -0
- data/vendor/envjs/test/unit/nu.validator.js +34 -0
- data/vendor/envjs/test/unit/onload.js +90 -0
- data/vendor/envjs/test/unit/parser.js +121 -0
- data/vendor/envjs/test/unit/prototypecompat.js +22 -0
- data/vendor/envjs/test/unit/proxy.js +6 -0
- data/vendor/envjs/test/unit/scope.js +209 -0
- data/vendor/envjs/test/unit/timer.js +115 -0
- data/vendor/envjs/test/unit/window.js +41 -0
- data/vendor/envjs/test/vendor/jQuery/README +2 -0
- data/vendor/envjs/test/vendor/prototype-1.6.0.3.js +4320 -0
- metadata +200 -0
@@ -0,0 +1,31 @@
|
|
1
|
+
/**
|
2
|
+
* @author thatcher
|
3
|
+
*/
|
4
|
+
(function(Q){
|
5
|
+
|
6
|
+
Q.describe('TEMPLATE Spec',{
|
7
|
+
before:function(){
|
8
|
+
//setup
|
9
|
+
},
|
10
|
+
after:function(){
|
11
|
+
//tear down
|
12
|
+
}
|
13
|
+
|
14
|
+
}).should('provide the required w3c interfaces', function(){
|
15
|
+
|
16
|
+
expect(1);
|
17
|
+
ok(true, 'good job');
|
18
|
+
|
19
|
+
}).should('do something else', function(){
|
20
|
+
|
21
|
+
expect(1);
|
22
|
+
ok(true, 'good job');
|
23
|
+
|
24
|
+
}).pending('should do something new soon', function(){
|
25
|
+
|
26
|
+
expect(1);
|
27
|
+
ok(false, 'todo');
|
28
|
+
});
|
29
|
+
|
30
|
+
})(QUnit);
|
31
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
/**
|
2
|
+
* @author thatcher
|
3
|
+
*/
|
4
|
+
|
5
|
+
(function(Q){
|
6
|
+
|
7
|
+
Q.describe('Another TEMPLATE Spec',{
|
8
|
+
before:function(){
|
9
|
+
//setup
|
10
|
+
},
|
11
|
+
after:function(){
|
12
|
+
//tear down
|
13
|
+
}
|
14
|
+
|
15
|
+
}).should('do something', function(){
|
16
|
+
|
17
|
+
expect(1);
|
18
|
+
ok(true, 'good job');
|
19
|
+
|
20
|
+
}).should('do something else', function(){
|
21
|
+
|
22
|
+
expect(1);
|
23
|
+
ok(true, 'good job');
|
24
|
+
|
25
|
+
}).pending('should do something new soon', function(){
|
26
|
+
|
27
|
+
expect(1);
|
28
|
+
ok(false, 'todo');
|
29
|
+
});
|
30
|
+
|
31
|
+
})(QUnit);
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
5
|
+
<title>TEMPLATE Spec</title>
|
6
|
+
<link rel="stylesheet" media="screen" href="../qunit.css"/>
|
7
|
+
<link rel="stylesheet" media="screen" href="../envjs.spec.css"/>
|
8
|
+
<link rel="stylesheet" media="screen" href="http://www.envjs.com/css/blueprint/screen.css"/>
|
9
|
+
<link rel="stylesheet" media="screen" href="http://www.envjs.com/css/site.css"/>
|
10
|
+
<script type='text/javascript' src='../qunit.js'></script>
|
11
|
+
<script type='text/javascript' src='../qunit.bdd.js'></script>
|
12
|
+
|
13
|
+
<!-- specs for this general api 'module' -->
|
14
|
+
<script type='text/javascript' src='spec-0.js'></script>
|
15
|
+
<script type='text/javascript' src='spec-1.js'></script>
|
16
|
+
</head>
|
17
|
+
<body class='container'>
|
18
|
+
<h2 id="qunit-banner">
|
19
|
+
<img id="envjs-icon"
|
20
|
+
src="../../fixtures/images/icon-blue.png"
|
21
|
+
height='40'/>
|
22
|
+
<span id="spec-title">Envjs TEMPLATE Spec</span>
|
23
|
+
</h2>
|
24
|
+
<h2 id="qunit-userAgent"></h2>
|
25
|
+
<div id='qunit-testrunner-toolbar'></div>
|
26
|
+
<div id='qunit-test-summary'>
|
27
|
+
<ol id='qunit-tests'></ol>
|
28
|
+
</div>
|
29
|
+
<div id="qunit-main" style="display:none;">
|
30
|
+
<!--
|
31
|
+
Test HTML here:
|
32
|
+
|
33
|
+
not required to be in here but it makes it convenient
|
34
|
+
by convention to avoid having to look at the html
|
35
|
+
artifacts the test may require or have generated as
|
36
|
+
a side effect.
|
37
|
+
-->
|
38
|
+
</div>
|
39
|
+
</body>
|
40
|
+
</html>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
/**
|
2
|
+
* @author thatcher
|
3
|
+
*/
|
4
|
+
(function(Q){
|
5
|
+
|
6
|
+
Q.describe('Window CSS',{
|
7
|
+
|
8
|
+
before:function(){
|
9
|
+
//setup
|
10
|
+
},
|
11
|
+
after:function(){
|
12
|
+
//tear down
|
13
|
+
}
|
14
|
+
|
15
|
+
}).should('provide the required w3c interfaces', function(){
|
16
|
+
|
17
|
+
expect(1);
|
18
|
+
ok(window.getComputedStyle, 'window.getComputedStyle');
|
19
|
+
|
20
|
+
});
|
21
|
+
|
22
|
+
})(QUnit);
|
23
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
/**
|
2
|
+
* @author thatcher
|
3
|
+
*/
|
4
|
+
|
5
|
+
(function(Q){
|
6
|
+
|
7
|
+
Q.describe('Window Dialog',{
|
8
|
+
|
9
|
+
before:function(){
|
10
|
+
//setup
|
11
|
+
},
|
12
|
+
after:function(){
|
13
|
+
//tear down
|
14
|
+
}
|
15
|
+
|
16
|
+
}).should('provide the required w3c interfaces', function(){
|
17
|
+
|
18
|
+
expect(3);
|
19
|
+
ok(alert, 'alert');
|
20
|
+
ok(confirm, 'confirm');
|
21
|
+
ok(prompt, 'prompt');
|
22
|
+
|
23
|
+
});
|
24
|
+
|
25
|
+
})(QUnit);
|
@@ -0,0 +1,23 @@
|
|
1
|
+
/**
|
2
|
+
* @author thatcher
|
3
|
+
*/
|
4
|
+
|
5
|
+
(function(Q){
|
6
|
+
|
7
|
+
Q.describe('Window Document',{
|
8
|
+
|
9
|
+
before:function(){
|
10
|
+
//setup
|
11
|
+
},
|
12
|
+
after:function(){
|
13
|
+
//tear down
|
14
|
+
}
|
15
|
+
|
16
|
+
}).should('provide the required w3c interfaces', function(){
|
17
|
+
|
18
|
+
expect(1);
|
19
|
+
ok(window.document === document, 'document is window.document');
|
20
|
+
|
21
|
+
});
|
22
|
+
|
23
|
+
})(QUnit);
|
@@ -0,0 +1,25 @@
|
|
1
|
+
/**
|
2
|
+
* @author thatcher
|
3
|
+
*/
|
4
|
+
|
5
|
+
(function(Q){
|
6
|
+
|
7
|
+
Q.describe('Window Event',{
|
8
|
+
|
9
|
+
before:function(){
|
10
|
+
//setup
|
11
|
+
},
|
12
|
+
after:function(){
|
13
|
+
//tear down
|
14
|
+
}
|
15
|
+
|
16
|
+
}).should('provide the required w3c interfaces', function(){
|
17
|
+
|
18
|
+
expect(3);
|
19
|
+
ok(addEventListener, 'addEventListener');
|
20
|
+
ok(removeEventListener, 'removeEventListener');
|
21
|
+
ok(dispatchEvent, 'dispatchEvent');
|
22
|
+
|
23
|
+
})
|
24
|
+
|
25
|
+
})(QUnit);
|
@@ -0,0 +1,34 @@
|
|
1
|
+
/**
|
2
|
+
* @author thatcher
|
3
|
+
*/
|
4
|
+
|
5
|
+
(function(Q){
|
6
|
+
|
7
|
+
Q.describe('Window History',{
|
8
|
+
|
9
|
+
before:function(){
|
10
|
+
//setup
|
11
|
+
},
|
12
|
+
after:function(){
|
13
|
+
//tear down
|
14
|
+
}
|
15
|
+
|
16
|
+
}).should('provide the required w3c interfaces', function(){
|
17
|
+
|
18
|
+
expect(8);
|
19
|
+
ok(history === window.history, "history is window.history");
|
20
|
+
ok(history.length, 'history.length');
|
21
|
+
ok(history.back, 'history.back');
|
22
|
+
ok(history.forward, 'history.forward');
|
23
|
+
ok(history.go, 'history.go');
|
24
|
+
ok(history.item, 'history.item');
|
25
|
+
|
26
|
+
//these are generally secured properties of the history
|
27
|
+
//object so we only check that the are defined since
|
28
|
+
//trying to access them will throw an exception
|
29
|
+
ok('current' in history, 'history.current');
|
30
|
+
ok('previous' in history, 'history.previous');
|
31
|
+
|
32
|
+
});
|
33
|
+
|
34
|
+
})(QUnit);
|
@@ -0,0 +1,34 @@
|
|
1
|
+
/**
|
2
|
+
* @author thatcher
|
3
|
+
*/
|
4
|
+
|
5
|
+
(function(Q){
|
6
|
+
|
7
|
+
Q.describe('Window Location',{
|
8
|
+
|
9
|
+
before:function(){
|
10
|
+
//setup
|
11
|
+
},
|
12
|
+
after:function(){
|
13
|
+
//tear down
|
14
|
+
}
|
15
|
+
|
16
|
+
}).should('provide required w3c interfaces', function(){
|
17
|
+
|
18
|
+
expect(12);
|
19
|
+
ok(location === window.location, "location is window.location");
|
20
|
+
ok('href' in location, 'location.href');
|
21
|
+
ok('hash' in location, 'location.hash');
|
22
|
+
ok('host' in location, 'location.host');
|
23
|
+
ok('hostname' in location, 'location.hostname');
|
24
|
+
ok('pathname' in location, 'location.pathname');
|
25
|
+
ok('port' in location, 'location.port');
|
26
|
+
ok('search' in location, 'location.search');
|
27
|
+
ok(location.protocol, 'location.protocol');
|
28
|
+
ok(location.reload, 'location.reload');
|
29
|
+
ok(location.replace, 'location.replace');
|
30
|
+
ok(location.assign, 'location.assign');
|
31
|
+
|
32
|
+
});
|
33
|
+
|
34
|
+
})(QUnit);
|
@@ -0,0 +1,71 @@
|
|
1
|
+
/**
|
2
|
+
* @author thatcher
|
3
|
+
*/
|
4
|
+
|
5
|
+
(function(Q){
|
6
|
+
|
7
|
+
Q.describe('Window Navigator',{
|
8
|
+
|
9
|
+
before:function(){
|
10
|
+
//setup
|
11
|
+
},
|
12
|
+
after:function(){
|
13
|
+
//tear down
|
14
|
+
}
|
15
|
+
|
16
|
+
}).should('provide the required w3c interfaces', function(){
|
17
|
+
|
18
|
+
expect(24);
|
19
|
+
ok(navigator === window.navigator, 'navigator is window.navigator');
|
20
|
+
ok(navigator.userAgent, 'userAgent');
|
21
|
+
ok(navigator.appCodeName, 'appCodeName');
|
22
|
+
ok(navigator.appName, 'appName');
|
23
|
+
ok(navigator.appVersion, 'appVersion');
|
24
|
+
ok(navigator.language, 'language');
|
25
|
+
ok(navigator.mimeTypes, 'mimeTypes');
|
26
|
+
ok(navigator.platform, 'platform');
|
27
|
+
ok(navigator.oscpu, 'oscpu');
|
28
|
+
ok(navigator.product, 'product');
|
29
|
+
ok(navigator.productSub, 'productSub');
|
30
|
+
ok(navigator.plugins, 'plugins');
|
31
|
+
ok(navigator.cookieEnabled, 'cookieEnabled');
|
32
|
+
ok(navigator.buildID, 'buildID');
|
33
|
+
ok(navigator.javaEnabled, 'javaEnabled');
|
34
|
+
ok(navigator.taintEnabled, 'taintEnabled');
|
35
|
+
ok(navigator.preference, 'preference');
|
36
|
+
ok(navigator.geolocation, 'geolocation');
|
37
|
+
ok(navigator.registerContentHandler, 'registerContentHandler');
|
38
|
+
ok(navigator.registerProtocolHandler, 'registerProtocolHandler');
|
39
|
+
|
40
|
+
//several properties will throw a security exception if they
|
41
|
+
//are accessed, so we only check that they exist
|
42
|
+
ok("vendor" in navigator, 'vendor');
|
43
|
+
ok("vendorSub" in navigator, 'vendorSub');
|
44
|
+
ok("securityPolicy" in navigator, 'securityPolicy');
|
45
|
+
ok("onLine" in navigator, 'onLine');
|
46
|
+
|
47
|
+
}).should('have the expected values', function(){
|
48
|
+
|
49
|
+
ok(navigator.userAgent, 'userAgent');
|
50
|
+
ok(navigator.appCodeName, 'appCodeName');
|
51
|
+
ok(navigator.appName, 'appName');
|
52
|
+
ok(navigator.appVersion, 'appVersion');
|
53
|
+
ok(navigator.language, 'language');
|
54
|
+
ok(navigator.mimeTypes, 'mimeTypes');
|
55
|
+
ok(navigator.platform, 'platform');
|
56
|
+
ok(navigator.oscpu, 'oscpu');
|
57
|
+
ok(navigator.product, 'product');
|
58
|
+
ok(navigator.productSub, 'productSub');
|
59
|
+
ok(navigator.plugins, 'plugins');
|
60
|
+
ok(navigator.cookieEnabled, 'cookieEnabled');
|
61
|
+
ok(navigator.buildID, 'buildID');
|
62
|
+
ok(navigator.javaEnabled, 'javaEnabled');
|
63
|
+
ok(navigator.taintEnabled, 'taintEnabled');
|
64
|
+
ok(navigator.preference, 'preference');
|
65
|
+
ok(navigator.geolocation, 'geolocation');
|
66
|
+
ok(navigator.registerContentHandler, 'registerContentHandler');
|
67
|
+
ok(navigator.registerProtocolHandler, 'registerProtocolHandler');
|
68
|
+
|
69
|
+
});
|
70
|
+
|
71
|
+
})(QUnit);
|
@@ -0,0 +1,42 @@
|
|
1
|
+
/**
|
2
|
+
* @author thatcher
|
3
|
+
*/
|
4
|
+
(function(Q){
|
5
|
+
|
6
|
+
Q.describe('Window Screen',{
|
7
|
+
|
8
|
+
before:function(){
|
9
|
+
//setup
|
10
|
+
},
|
11
|
+
after:function(){
|
12
|
+
//tear down
|
13
|
+
}
|
14
|
+
|
15
|
+
}).should('provide the required w3c interfaces', function(){
|
16
|
+
|
17
|
+
expect(18);
|
18
|
+
ok(screen === window.screen , 'screen is window screen');
|
19
|
+
ok("top" in screen, 'top');
|
20
|
+
ok(screen.height, 'height');
|
21
|
+
ok(screen.width, 'width');
|
22
|
+
ok("left" in screen, 'left');
|
23
|
+
ok(screen.pixelDepth, 'pixelDepth');
|
24
|
+
ok(screen.colorDepth, 'colorDepth');
|
25
|
+
ok(screen.availWidth, 'availWidth');
|
26
|
+
ok(screen.availHeight, 'availHeight');
|
27
|
+
ok("availLeft" in screen, 'availLeft');
|
28
|
+
ok(screen.availTop, 'availTop');
|
29
|
+
|
30
|
+
//closely related function available at window
|
31
|
+
ok(moveBy, 'moveBy');
|
32
|
+
ok(moveTo, 'moveTo');
|
33
|
+
ok(resizeBy, 'resizeBy');
|
34
|
+
ok(resizeTo, 'resizeTo');
|
35
|
+
ok(scroll, 'scroll');
|
36
|
+
ok(scrollBy, 'scrollBy');
|
37
|
+
ok(scrollTo, 'scrollTo');
|
38
|
+
|
39
|
+
});
|
40
|
+
|
41
|
+
})(QUnit);
|
42
|
+
|
@@ -0,0 +1,48 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
5
|
+
<title>Envjs Window Spec</title>
|
6
|
+
<link rel="stylesheet" media="screen" href="../qunit.css"/>
|
7
|
+
<link rel="stylesheet" media="screen" href="../envjs.spec.css"/>
|
8
|
+
<link rel="stylesheet" media="screen" href="http://www.envjs.com/css/blueprint/screen.css"/>
|
9
|
+
<link rel="stylesheet" media="screen" href="http://www.envjs.com/css/site.css"/>
|
10
|
+
<script type='text/javascript' src='../qunit.js'></script>
|
11
|
+
<script type='text/javascript' src='../qunit.bdd.js'></script>
|
12
|
+
|
13
|
+
<!-- specs for this general api 'module' -->
|
14
|
+
<script type='text/javascript' src='window.js'></script>
|
15
|
+
<script type='text/javascript' src='css.js'></script>
|
16
|
+
<script type='text/javascript' src='dialog.js'></script>
|
17
|
+
<script type='text/javascript' src='document.js'></script>
|
18
|
+
<script type='text/javascript' src='event.js'></script>
|
19
|
+
<script type='text/javascript' src='history.js'></script>
|
20
|
+
<script type='text/javascript' src='location.js'></script>
|
21
|
+
<script type='text/javascript' src='navigator.js'></script>
|
22
|
+
<script type='text/javascript' src='screen.js'></script>
|
23
|
+
<script type='text/javascript' src='timer.js'></script>
|
24
|
+
</head>
|
25
|
+
<body class='container'>
|
26
|
+
<h2 id="qunit-banner">
|
27
|
+
<img id="envjs-icon"
|
28
|
+
src="../../fixtures/images/icon-blue.png"
|
29
|
+
height='40'/>
|
30
|
+
<span id="spec-title">Envjs Window Spec</span>
|
31
|
+
</h2>
|
32
|
+
<h2 id="qunit-userAgent"></h2>
|
33
|
+
<div id='qunit-testrunner-toolbar'></div>
|
34
|
+
<div id='qunit-test-summary'>
|
35
|
+
<ol id='qunit-tests'></ol>
|
36
|
+
</div>
|
37
|
+
<div id="qunit-main" style="display:none;">
|
38
|
+
<!--
|
39
|
+
Test HTML here:
|
40
|
+
|
41
|
+
not required to be in here but it makes it convenient
|
42
|
+
by convention to avoid having to look at the html
|
43
|
+
artifacts the test may require or have generated as
|
44
|
+
a side effect.
|
45
|
+
-->
|
46
|
+
</div>
|
47
|
+
</body>
|
48
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
/**
|
2
|
+
* @author thatcher
|
3
|
+
*/
|
4
|
+
|
5
|
+
(function(Q){
|
6
|
+
|
7
|
+
Q.describe('Window Timer',{
|
8
|
+
|
9
|
+
before:function(){
|
10
|
+
//setup
|
11
|
+
},
|
12
|
+
after:function(){
|
13
|
+
//tear down
|
14
|
+
}
|
15
|
+
|
16
|
+
}).should('provide the required w3c interfaces', function(){
|
17
|
+
|
18
|
+
expect(4);
|
19
|
+
ok(setTimeout, 'setTimeout');
|
20
|
+
ok(setInterval, 'setInterval');
|
21
|
+
ok(clearTimeout, 'clearTimeout');
|
22
|
+
ok(clearInterval, 'clearInterval');
|
23
|
+
|
24
|
+
});
|
25
|
+
|
26
|
+
})(QUnit);
|