envjs19 0.3.8.20101029121421

Sign up to get free protection for your applications and to get access to all the features.
Files changed (279) hide show
  1. data/.jslintrbrc +30 -0
  2. data/.project +17 -0
  3. data/CHANGELOG.rdoc +57 -0
  4. data/DTD/xhtml-lat1.ent +196 -0
  5. data/DTD/xhtml-special.ent +80 -0
  6. data/DTD/xhtml-symbol.ent +237 -0
  7. data/DTD/xhtml.soc +14 -0
  8. data/DTD/xhtml1-frameset.dtd +1235 -0
  9. data/DTD/xhtml1-strict.dtd +978 -0
  10. data/DTD/xhtml1-transitional.dtd +1201 -0
  11. data/DTD/xhtml1.dcl +192 -0
  12. data/Makefile +7 -0
  13. data/Manifest.txt +280 -0
  14. data/README.rdoc +65 -0
  15. data/Rakefile +196 -0
  16. data/Wakefile +11 -0
  17. data/bin/envjsrb +257 -0
  18. data/build.properties +9 -0
  19. data/build.xml +247 -0
  20. data/gm/jquery.js +6002 -0
  21. data/gm/mainx.js +2648 -0
  22. data/gm/sensx.js +135 -0
  23. data/gm/t.js +6 -0
  24. data/gm/x.html +76 -0
  25. data/htmlparser/BrowserTreeBuilder.java +456 -0
  26. data/htmlparser/README +34 -0
  27. data/htmlparser/build.sh +38 -0
  28. data/jsl/jsl +0 -0
  29. data/jsl/jsl.default.conf +129 -0
  30. data/jsl/jsl.exe +0 -0
  31. data/lib/envjs.rb +35 -0
  32. data/lib/envjs/event_loop.js +206 -0
  33. data/lib/envjs/net.rb +3 -0
  34. data/lib/envjs/net/cgi.rb +94 -0
  35. data/lib/envjs/net/file.rb +69 -0
  36. data/lib/envjs/options.rb +11 -0
  37. data/lib/envjs/runtime.rb +346 -0
  38. data/lib/envjs/tempfile.rb +24 -0
  39. data/licenses/GPL-LICENSE.txt +278 -0
  40. data/licenses/MIT-LICENSE.txt +20 -0
  41. data/src/base64.js +80 -0
  42. data/src/build.js +6 -0
  43. data/src/cruft/bad.html +24 -0
  44. data/src/cruft/dom.js +606 -0
  45. data/src/cruft/element.js +297 -0
  46. data/src/cruft/good.html +30 -0
  47. data/src/cruft/good.js +32 -0
  48. data/src/cruft/internal.js +81 -0
  49. data/src/cruft/parser.js +458 -0
  50. data/src/css/properties.js +293 -0
  51. data/src/css/rule.js +22 -0
  52. data/src/css/sizzle.js +717 -0
  53. data/src/css/stylesheet.js +52 -0
  54. data/src/dom/attr.js +55 -0
  55. data/src/dom/cdatasection.js +31 -0
  56. data/src/dom/characterdata.js +119 -0
  57. data/src/dom/comment.js +30 -0
  58. data/src/dom/doctype.js +9 -0
  59. data/src/dom/document.js +1023 -0
  60. data/src/dom/dom.js +134 -0
  61. data/src/dom/element.js +217 -0
  62. data/src/dom/entities.js +273 -0
  63. data/src/dom/exception.js +28 -0
  64. data/src/dom/fragment.js +37 -0
  65. data/src/dom/implementation.js +140 -0
  66. data/src/dom/instruction.js +51 -0
  67. data/src/dom/namednodemap.js +374 -0
  68. data/src/dom/namespace.js +50 -0
  69. data/src/dom/node.js +618 -0
  70. data/src/dom/nodelist.js +195 -0
  71. data/src/dom/parser.js +1207 -0
  72. data/src/dom/text.js +73 -0
  73. data/src/event/event.js +47 -0
  74. data/src/event/mouseevent.js +4 -0
  75. data/src/event/uievent.js +8 -0
  76. data/src/html/a.js +110 -0
  77. data/src/html/anchor.js +80 -0
  78. data/src/html/area.js +57 -0
  79. data/src/html/base.js +26 -0
  80. data/src/html/blockquote-q.js +19 -0
  81. data/src/html/body.js +19 -0
  82. data/src/html/button.js +21 -0
  83. data/src/html/canvas.js +14 -0
  84. data/src/html/col-colgroup.js +49 -0
  85. data/src/html/collection.js +72 -0
  86. data/src/html/cookie.js +153 -0
  87. data/src/html/del-ins.js +25 -0
  88. data/src/html/div.js +28 -0
  89. data/src/html/document.js +364 -0
  90. data/src/html/element.js +382 -0
  91. data/src/html/fieldset.js +19 -0
  92. data/src/html/form.js +484 -0
  93. data/src/html/frame.js +89 -0
  94. data/src/html/frameset.js +25 -0
  95. data/src/html/head.js +44 -0
  96. data/src/html/html.js +0 -0
  97. data/src/html/htmlparser.js +340 -0
  98. data/src/html/iframe.js +26 -0
  99. data/src/html/image.js +0 -0
  100. data/src/html/img.js +62 -0
  101. data/src/html/input-elements.js +307 -0
  102. data/src/html/input.js +65 -0
  103. data/src/html/label.js +26 -0
  104. data/src/html/legend.js +19 -0
  105. data/src/html/link.js +82 -0
  106. data/src/html/map.js +22 -0
  107. data/src/html/meta.js +37 -0
  108. data/src/html/object.js +89 -0
  109. data/src/html/optgroup.js +25 -0
  110. data/src/html/option.js +103 -0
  111. data/src/html/param.js +38 -0
  112. data/src/html/script.js +122 -0
  113. data/src/html/select.js +132 -0
  114. data/src/html/style.js +31 -0
  115. data/src/html/table.js +199 -0
  116. data/src/html/tbody-thead-tfoot.js +92 -0
  117. data/src/html/td-th.js +18 -0
  118. data/src/html/textarea.js +31 -0
  119. data/src/html/title.js +20 -0
  120. data/src/html/tr.js +114 -0
  121. data/src/intro.js +141 -0
  122. data/src/outro.js +70 -0
  123. data/src/parser/html5.detailed.js +10762 -0
  124. data/src/parser/html5.min.js +503 -0
  125. data/src/parser/html5.pretty.js +10815 -0
  126. data/src/parser/intro.js +42 -0
  127. data/src/parser/outro.js +9 -0
  128. data/src/platform/core.js +323 -0
  129. data/src/platform/johnson.js +484 -0
  130. data/src/platform/rhino.js +327 -0
  131. data/src/platform/static/intro.js +41 -0
  132. data/src/platform/static/outro.js +30 -0
  133. data/src/profile/aop.js +238 -0
  134. data/src/profile/profile.js +402 -0
  135. data/src/serializer/xml.js +21 -0
  136. data/src/svg/animatedstring.js +25 -0
  137. data/src/svg/document.js +25 -0
  138. data/src/svg/element.js +22 -0
  139. data/src/svg/locatable.js +17 -0
  140. data/src/svg/rect.js +18 -0
  141. data/src/svg/rectelement.js +24 -0
  142. data/src/svg/stylable.js +49 -0
  143. data/src/svg/svgelement.js +22 -0
  144. data/src/svg/transformable.js +15 -0
  145. data/src/window/css.js +15 -0
  146. data/src/window/dialog.js +16 -0
  147. data/src/window/document.js +28 -0
  148. data/src/window/event.js +265 -0
  149. data/src/window/history.js +62 -0
  150. data/src/window/location.js +156 -0
  151. data/src/window/navigator.js +48 -0
  152. data/src/window/screen.js +53 -0
  153. data/src/window/timer.js +21 -0
  154. data/src/window/window.js +284 -0
  155. data/src/window/xhr.js +135 -0
  156. data/src/xpath/expression.js +49 -0
  157. data/src/xpath/implementation.js +2505 -0
  158. data/src/xpath/result.js +67 -0
  159. data/src/xpath/util.js +551 -0
  160. data/src/xpath/xmltoken.js +149 -0
  161. data/src/xslt/COPYING +34 -0
  162. data/src/xslt/ajaxslt-0.8.1/AUTHORS +1 -0
  163. data/src/xslt/ajaxslt-0.8.1/ChangeLog +136 -0
  164. data/src/xslt/ajaxslt-0.8.1/Makefile +49 -0
  165. data/src/xslt/ajaxslt-0.8.1/README +102 -0
  166. data/src/xslt/ajaxslt-0.8.1/TODO +15 -0
  167. data/src/xslt/ajaxslt-0.8.1/dom.js +566 -0
  168. data/src/xslt/ajaxslt-0.8.1/dom_unittest.html +24 -0
  169. data/src/xslt/ajaxslt-0.8.1/dom_unittest.js +131 -0
  170. data/src/xslt/ajaxslt-0.8.1/simplelog.js +79 -0
  171. data/src/xslt/ajaxslt-0.8.1/test/xpath.html +18 -0
  172. data/src/xslt/ajaxslt-0.8.1/test/xpath_script.js +45 -0
  173. data/src/xslt/ajaxslt-0.8.1/test/xslt.html +58 -0
  174. data/src/xslt/ajaxslt-0.8.1/test/xslt_script.js +33 -0
  175. data/src/xslt/ajaxslt-0.8.1/unittestsuite.html +26 -0
  176. data/src/xslt/ajaxslt-0.8.1/xmltoken.js +149 -0
  177. data/src/xslt/ajaxslt-0.8.1/xmltoken_unittest.html +18 -0
  178. data/src/xslt/ajaxslt-0.8.1/xmltoken_unittest.js +811 -0
  179. data/src/xslt/ajaxslt-0.8.1/xpath_unittest.html +39 -0
  180. data/src/xslt/ajaxslt-0.8.1/xpath_unittest.js +557 -0
  181. data/src/xslt/ajaxslt-0.8.1/xpathdebug.js +234 -0
  182. data/src/xslt/ajaxslt-0.8.1/xslt_unittest.html +138 -0
  183. data/src/xslt/ajaxslt-0.8.1/xslt_unittest.js +68 -0
  184. data/src/xslt/implementation.js +625 -0
  185. data/src/xslt/processor.js +37 -0
  186. data/src/xslt/util.js +449 -0
  187. data/test/base64.js +80 -0
  188. data/test/call-load-test.js +15 -0
  189. data/test/data.js +45 -0
  190. data/test/debug.js +53 -0
  191. data/test/firebug/errorIcon.png +0 -0
  192. data/test/firebug/firebug.css +209 -0
  193. data/test/firebug/firebug.html +23 -0
  194. data/test/firebug/firebug.js +672 -0
  195. data/test/firebug/firebugx.js +10 -0
  196. data/test/firebug/infoIcon.png +0 -0
  197. data/test/firebug/warningIcon.png +0 -0
  198. data/test/fixtures/html/events.html +171 -0
  199. data/test/fixtures/html/iframe1.html +46 -0
  200. data/test/fixtures/html/iframe1a.html +46 -0
  201. data/test/fixtures/html/iframe2.html +45 -0
  202. data/test/fixtures/html/iframe3.html +28 -0
  203. data/test/fixtures/html/iframeN.html +57 -0
  204. data/test/fixtures/html/malformed.html +181 -0
  205. data/test/fixtures/html/scope.html +81 -0
  206. data/test/fixtures/html/trivial.html +19 -0
  207. data/test/fixtures/html/with_js.html +26 -0
  208. data/test/fixtures/images/icon-blue.png +0 -0
  209. data/test/fixtures/js/external_script.js +1 -0
  210. data/test/fixtures/js/script.js +1 -0
  211. data/test/fixtures/js/script_error.js +2 -0
  212. data/test/foo.html +8 -0
  213. data/test/foo.js +40 -0
  214. data/test/html/events.html +171 -0
  215. data/test/html/iframe1.html +46 -0
  216. data/test/html/iframe1a.html +46 -0
  217. data/test/html/iframe2.html +45 -0
  218. data/test/html/iframe3.html +30 -0
  219. data/test/html/iframeN.html +57 -0
  220. data/test/html/malformed.html +181 -0
  221. data/test/html/scope.html +87 -0
  222. data/test/html/script.js +1 -0
  223. data/test/html/trivial.html +19 -0
  224. data/test/html/with_js.html +26 -0
  225. data/test/index.html +328 -0
  226. data/test/java-prototype.js +9 -0
  227. data/test/jquery.js +6002 -0
  228. data/test/primary-tests.js +26 -0
  229. data/test/prototype-test.js +13 -0
  230. data/test/qunit.js +61 -0
  231. data/test/qunit/qunit/qunit.css +17 -0
  232. data/test/qunit/qunit/qunit.js +997 -0
  233. data/test/scope.html +19 -0
  234. data/test/scope.rb +24 -0
  235. data/test/smp/dmathieu/index.html +8 -0
  236. data/test/specs/dist/env.spec.js +1534 -0
  237. data/test/specs/envjs.spec.css +46 -0
  238. data/test/specs/parser/html.js +31 -0
  239. data/test/specs/parser/spec.html +40 -0
  240. data/test/specs/parser/xml.js +31 -0
  241. data/test/specs/qunit.bdd.js +210 -0
  242. data/test/specs/qunit.css +17 -0
  243. data/test/specs/qunit.js +997 -0
  244. data/test/specs/template/spec-0.js +31 -0
  245. data/test/specs/template/spec-1.js +31 -0
  246. data/test/specs/template/spec.html +40 -0
  247. data/test/specs/window/css.js +23 -0
  248. data/test/specs/window/dialog.js +25 -0
  249. data/test/specs/window/document.js +23 -0
  250. data/test/specs/window/event.js +25 -0
  251. data/test/specs/window/history.js +34 -0
  252. data/test/specs/window/location.js +34 -0
  253. data/test/specs/window/navigator.js +71 -0
  254. data/test/specs/window/screen.js +42 -0
  255. data/test/specs/window/spec.html +48 -0
  256. data/test/specs/window/timer.js +26 -0
  257. data/test/specs/window/window.js +53 -0
  258. data/test/specs/xhr/spec.html +47 -0
  259. data/test/specs/xhr/xhr.js +31 -0
  260. data/test/test.js +10 -0
  261. data/test/unit/dom.js +44 -0
  262. data/test/unit/elementmembers.js +92 -0
  263. data/test/unit/events.js +195 -0
  264. data/test/unit/fixtures/external_script.js +1 -0
  265. data/test/unit/form.js +40 -0
  266. data/test/unit/iframe.js +234 -0
  267. data/test/unit/insertion.js +23 -0
  268. data/test/unit/multi-window.js +212 -0
  269. data/test/unit/nu.validator.js +34 -0
  270. data/test/unit/onload.js +90 -0
  271. data/test/unit/parser.js +122 -0
  272. data/test/unit/prototypecompat.js +22 -0
  273. data/test/unit/proxy.js +6 -0
  274. data/test/unit/scope.js +209 -0
  275. data/test/unit/timer.js +115 -0
  276. data/test/unit/window.js +57 -0
  277. data/test/x.js +1 -0
  278. data/test/y.js +1 -0
  279. metadata +367 -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>