envjs19 0.3.8.20101029121421
Sign up to get free protection for your applications and to get access to all the features.
- data/.jslintrbrc +30 -0
- data/.project +17 -0
- data/CHANGELOG.rdoc +57 -0
- data/DTD/xhtml-lat1.ent +196 -0
- data/DTD/xhtml-special.ent +80 -0
- data/DTD/xhtml-symbol.ent +237 -0
- data/DTD/xhtml.soc +14 -0
- data/DTD/xhtml1-frameset.dtd +1235 -0
- data/DTD/xhtml1-strict.dtd +978 -0
- data/DTD/xhtml1-transitional.dtd +1201 -0
- data/DTD/xhtml1.dcl +192 -0
- data/Makefile +7 -0
- data/Manifest.txt +280 -0
- data/README.rdoc +65 -0
- data/Rakefile +196 -0
- data/Wakefile +11 -0
- data/bin/envjsrb +257 -0
- data/build.properties +9 -0
- data/build.xml +247 -0
- data/gm/jquery.js +6002 -0
- data/gm/mainx.js +2648 -0
- data/gm/sensx.js +135 -0
- data/gm/t.js +6 -0
- data/gm/x.html +76 -0
- data/htmlparser/BrowserTreeBuilder.java +456 -0
- data/htmlparser/README +34 -0
- data/htmlparser/build.sh +38 -0
- data/jsl/jsl +0 -0
- data/jsl/jsl.default.conf +129 -0
- data/jsl/jsl.exe +0 -0
- data/lib/envjs.rb +35 -0
- data/lib/envjs/event_loop.js +206 -0
- data/lib/envjs/net.rb +3 -0
- data/lib/envjs/net/cgi.rb +94 -0
- data/lib/envjs/net/file.rb +69 -0
- data/lib/envjs/options.rb +11 -0
- data/lib/envjs/runtime.rb +346 -0
- data/lib/envjs/tempfile.rb +24 -0
- data/licenses/GPL-LICENSE.txt +278 -0
- data/licenses/MIT-LICENSE.txt +20 -0
- data/src/base64.js +80 -0
- data/src/build.js +6 -0
- data/src/cruft/bad.html +24 -0
- data/src/cruft/dom.js +606 -0
- data/src/cruft/element.js +297 -0
- data/src/cruft/good.html +30 -0
- data/src/cruft/good.js +32 -0
- data/src/cruft/internal.js +81 -0
- data/src/cruft/parser.js +458 -0
- data/src/css/properties.js +293 -0
- data/src/css/rule.js +22 -0
- data/src/css/sizzle.js +717 -0
- data/src/css/stylesheet.js +52 -0
- data/src/dom/attr.js +55 -0
- data/src/dom/cdatasection.js +31 -0
- data/src/dom/characterdata.js +119 -0
- data/src/dom/comment.js +30 -0
- data/src/dom/doctype.js +9 -0
- data/src/dom/document.js +1023 -0
- data/src/dom/dom.js +134 -0
- data/src/dom/element.js +217 -0
- data/src/dom/entities.js +273 -0
- data/src/dom/exception.js +28 -0
- data/src/dom/fragment.js +37 -0
- data/src/dom/implementation.js +140 -0
- data/src/dom/instruction.js +51 -0
- data/src/dom/namednodemap.js +374 -0
- data/src/dom/namespace.js +50 -0
- data/src/dom/node.js +618 -0
- data/src/dom/nodelist.js +195 -0
- data/src/dom/parser.js +1207 -0
- data/src/dom/text.js +73 -0
- data/src/event/event.js +47 -0
- data/src/event/mouseevent.js +4 -0
- data/src/event/uievent.js +8 -0
- data/src/html/a.js +110 -0
- data/src/html/anchor.js +80 -0
- data/src/html/area.js +57 -0
- data/src/html/base.js +26 -0
- data/src/html/blockquote-q.js +19 -0
- data/src/html/body.js +19 -0
- data/src/html/button.js +21 -0
- data/src/html/canvas.js +14 -0
- data/src/html/col-colgroup.js +49 -0
- data/src/html/collection.js +72 -0
- data/src/html/cookie.js +153 -0
- data/src/html/del-ins.js +25 -0
- data/src/html/div.js +28 -0
- data/src/html/document.js +364 -0
- data/src/html/element.js +382 -0
- data/src/html/fieldset.js +19 -0
- data/src/html/form.js +484 -0
- data/src/html/frame.js +89 -0
- data/src/html/frameset.js +25 -0
- data/src/html/head.js +44 -0
- data/src/html/html.js +0 -0
- data/src/html/htmlparser.js +340 -0
- data/src/html/iframe.js +26 -0
- data/src/html/image.js +0 -0
- data/src/html/img.js +62 -0
- data/src/html/input-elements.js +307 -0
- data/src/html/input.js +65 -0
- data/src/html/label.js +26 -0
- data/src/html/legend.js +19 -0
- data/src/html/link.js +82 -0
- data/src/html/map.js +22 -0
- data/src/html/meta.js +37 -0
- data/src/html/object.js +89 -0
- data/src/html/optgroup.js +25 -0
- data/src/html/option.js +103 -0
- data/src/html/param.js +38 -0
- data/src/html/script.js +122 -0
- data/src/html/select.js +132 -0
- data/src/html/style.js +31 -0
- data/src/html/table.js +199 -0
- data/src/html/tbody-thead-tfoot.js +92 -0
- data/src/html/td-th.js +18 -0
- data/src/html/textarea.js +31 -0
- data/src/html/title.js +20 -0
- data/src/html/tr.js +114 -0
- data/src/intro.js +141 -0
- data/src/outro.js +70 -0
- data/src/parser/html5.detailed.js +10762 -0
- data/src/parser/html5.min.js +503 -0
- data/src/parser/html5.pretty.js +10815 -0
- data/src/parser/intro.js +42 -0
- data/src/parser/outro.js +9 -0
- data/src/platform/core.js +323 -0
- data/src/platform/johnson.js +484 -0
- data/src/platform/rhino.js +327 -0
- data/src/platform/static/intro.js +41 -0
- data/src/platform/static/outro.js +30 -0
- data/src/profile/aop.js +238 -0
- data/src/profile/profile.js +402 -0
- data/src/serializer/xml.js +21 -0
- data/src/svg/animatedstring.js +25 -0
- data/src/svg/document.js +25 -0
- data/src/svg/element.js +22 -0
- data/src/svg/locatable.js +17 -0
- data/src/svg/rect.js +18 -0
- data/src/svg/rectelement.js +24 -0
- data/src/svg/stylable.js +49 -0
- data/src/svg/svgelement.js +22 -0
- data/src/svg/transformable.js +15 -0
- data/src/window/css.js +15 -0
- data/src/window/dialog.js +16 -0
- data/src/window/document.js +28 -0
- data/src/window/event.js +265 -0
- data/src/window/history.js +62 -0
- data/src/window/location.js +156 -0
- data/src/window/navigator.js +48 -0
- data/src/window/screen.js +53 -0
- data/src/window/timer.js +21 -0
- data/src/window/window.js +284 -0
- data/src/window/xhr.js +135 -0
- data/src/xpath/expression.js +49 -0
- data/src/xpath/implementation.js +2505 -0
- data/src/xpath/result.js +67 -0
- data/src/xpath/util.js +551 -0
- data/src/xpath/xmltoken.js +149 -0
- data/src/xslt/COPYING +34 -0
- data/src/xslt/ajaxslt-0.8.1/AUTHORS +1 -0
- data/src/xslt/ajaxslt-0.8.1/ChangeLog +136 -0
- data/src/xslt/ajaxslt-0.8.1/Makefile +49 -0
- data/src/xslt/ajaxslt-0.8.1/README +102 -0
- data/src/xslt/ajaxslt-0.8.1/TODO +15 -0
- data/src/xslt/ajaxslt-0.8.1/dom.js +566 -0
- data/src/xslt/ajaxslt-0.8.1/dom_unittest.html +24 -0
- data/src/xslt/ajaxslt-0.8.1/dom_unittest.js +131 -0
- data/src/xslt/ajaxslt-0.8.1/simplelog.js +79 -0
- data/src/xslt/ajaxslt-0.8.1/test/xpath.html +18 -0
- data/src/xslt/ajaxslt-0.8.1/test/xpath_script.js +45 -0
- data/src/xslt/ajaxslt-0.8.1/test/xslt.html +58 -0
- data/src/xslt/ajaxslt-0.8.1/test/xslt_script.js +33 -0
- data/src/xslt/ajaxslt-0.8.1/unittestsuite.html +26 -0
- data/src/xslt/ajaxslt-0.8.1/xmltoken.js +149 -0
- data/src/xslt/ajaxslt-0.8.1/xmltoken_unittest.html +18 -0
- data/src/xslt/ajaxslt-0.8.1/xmltoken_unittest.js +811 -0
- data/src/xslt/ajaxslt-0.8.1/xpath_unittest.html +39 -0
- data/src/xslt/ajaxslt-0.8.1/xpath_unittest.js +557 -0
- data/src/xslt/ajaxslt-0.8.1/xpathdebug.js +234 -0
- data/src/xslt/ajaxslt-0.8.1/xslt_unittest.html +138 -0
- data/src/xslt/ajaxslt-0.8.1/xslt_unittest.js +68 -0
- data/src/xslt/implementation.js +625 -0
- data/src/xslt/processor.js +37 -0
- data/src/xslt/util.js +449 -0
- data/test/base64.js +80 -0
- data/test/call-load-test.js +15 -0
- data/test/data.js +45 -0
- data/test/debug.js +53 -0
- data/test/firebug/errorIcon.png +0 -0
- data/test/firebug/firebug.css +209 -0
- data/test/firebug/firebug.html +23 -0
- data/test/firebug/firebug.js +672 -0
- data/test/firebug/firebugx.js +10 -0
- data/test/firebug/infoIcon.png +0 -0
- data/test/firebug/warningIcon.png +0 -0
- data/test/fixtures/html/events.html +171 -0
- data/test/fixtures/html/iframe1.html +46 -0
- data/test/fixtures/html/iframe1a.html +46 -0
- data/test/fixtures/html/iframe2.html +45 -0
- data/test/fixtures/html/iframe3.html +28 -0
- data/test/fixtures/html/iframeN.html +57 -0
- data/test/fixtures/html/malformed.html +181 -0
- data/test/fixtures/html/scope.html +81 -0
- data/test/fixtures/html/trivial.html +19 -0
- data/test/fixtures/html/with_js.html +26 -0
- data/test/fixtures/images/icon-blue.png +0 -0
- data/test/fixtures/js/external_script.js +1 -0
- data/test/fixtures/js/script.js +1 -0
- data/test/fixtures/js/script_error.js +2 -0
- data/test/foo.html +8 -0
- data/test/foo.js +40 -0
- data/test/html/events.html +171 -0
- data/test/html/iframe1.html +46 -0
- data/test/html/iframe1a.html +46 -0
- data/test/html/iframe2.html +45 -0
- data/test/html/iframe3.html +30 -0
- data/test/html/iframeN.html +57 -0
- data/test/html/malformed.html +181 -0
- data/test/html/scope.html +87 -0
- data/test/html/script.js +1 -0
- data/test/html/trivial.html +19 -0
- data/test/html/with_js.html +26 -0
- data/test/index.html +328 -0
- data/test/java-prototype.js +9 -0
- data/test/jquery.js +6002 -0
- data/test/primary-tests.js +26 -0
- data/test/prototype-test.js +13 -0
- data/test/qunit.js +61 -0
- data/test/qunit/qunit/qunit.css +17 -0
- data/test/qunit/qunit/qunit.js +997 -0
- data/test/scope.html +19 -0
- data/test/scope.rb +24 -0
- data/test/smp/dmathieu/index.html +8 -0
- data/test/specs/dist/env.spec.js +1534 -0
- data/test/specs/envjs.spec.css +46 -0
- data/test/specs/parser/html.js +31 -0
- data/test/specs/parser/spec.html +40 -0
- data/test/specs/parser/xml.js +31 -0
- data/test/specs/qunit.bdd.js +210 -0
- data/test/specs/qunit.css +17 -0
- data/test/specs/qunit.js +997 -0
- data/test/specs/template/spec-0.js +31 -0
- data/test/specs/template/spec-1.js +31 -0
- data/test/specs/template/spec.html +40 -0
- data/test/specs/window/css.js +23 -0
- data/test/specs/window/dialog.js +25 -0
- data/test/specs/window/document.js +23 -0
- data/test/specs/window/event.js +25 -0
- data/test/specs/window/history.js +34 -0
- data/test/specs/window/location.js +34 -0
- data/test/specs/window/navigator.js +71 -0
- data/test/specs/window/screen.js +42 -0
- data/test/specs/window/spec.html +48 -0
- data/test/specs/window/timer.js +26 -0
- data/test/specs/window/window.js +53 -0
- data/test/specs/xhr/spec.html +47 -0
- data/test/specs/xhr/xhr.js +31 -0
- data/test/test.js +10 -0
- data/test/unit/dom.js +44 -0
- data/test/unit/elementmembers.js +92 -0
- data/test/unit/events.js +195 -0
- data/test/unit/fixtures/external_script.js +1 -0
- data/test/unit/form.js +40 -0
- data/test/unit/iframe.js +234 -0
- data/test/unit/insertion.js +23 -0
- data/test/unit/multi-window.js +212 -0
- data/test/unit/nu.validator.js +34 -0
- data/test/unit/onload.js +90 -0
- data/test/unit/parser.js +122 -0
- data/test/unit/prototypecompat.js +22 -0
- data/test/unit/proxy.js +6 -0
- data/test/unit/scope.js +209 -0
- data/test/unit/timer.js +115 -0
- data/test/unit/window.js +57 -0
- data/test/x.js +1 -0
- data/test/y.js +1 -0
- 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>
|