smparkes-envjs 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/envjsrb +157 -73
- data/bin/jquery-1.3.2-test.js +11 -4
- data/lib/envjs/env.js +935 -11028
- data/lib/envjs/net/cgi.rb +94 -0
- data/lib/envjs/net/file.rb +4 -4
- data/lib/envjs/runtime.rb +80 -24
- data/test/call-load-test.js +0 -2
- 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/html/malformed.html +1 -0
- data/test/index.html +21 -19
- data/test/{primaryTests.js → primary-tests.js} +1 -3
- data/test/{prototype.js → prototype-test.js} +0 -2
- data/test/qunit/qunit/qunit.css +0 -0
- data/test/qunit/qunit/qunit.js +2 -2
- data/test/{qunit/qunit/qunit.js.smp → specs/dist/env.spec.js} +539 -7
- 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/{qunit.smp/qunit → specs}/qunit.css +0 -0
- data/test/{qunit.smp/qunit → specs}/qunit.js +2 -2
- 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/elementmembers.js +31 -0
- data/test/unit/nu.validator.js +34 -0
- data/test/unit/onload.js +1 -3
- data/test/unit/parser.js +106 -98
- data/test/unit/prototypecompat.js +2 -2
- data/test/vendor/jQuery/1.3.2/ChangeLog.txt +98 -0
- data/test/vendor/jQuery/1.3.2/GPL-LICENSE.txt +278 -0
- data/test/vendor/jQuery/1.3.2/MIT-LICENSE.txt +20 -0
- data/test/vendor/jQuery/1.3.2/Makefile +154 -0
- data/test/vendor/jQuery/1.3.2/README +67 -0
- data/test/vendor/jQuery/1.3.2/build/ant-contrib-0.6.jar +0 -0
- data/test/vendor/jQuery/1.3.2/build/build/min.js +11 -0
- data/test/vendor/jQuery/1.3.2/build/build/pack.js +19 -0
- data/test/vendor/jQuery/1.3.2/build/js/Packer.js +209 -0
- data/test/vendor/jQuery/1.3.2/build/js/ParseMaster.js +106 -0
- data/test/vendor/jQuery/1.3.2/build/js/Words.js +62 -0
- data/test/vendor/jQuery/1.3.2/build/js/base2.js +978 -0
- data/test/vendor/jQuery/1.3.2/build/js/jsmin.js +316 -0
- data/test/vendor/jQuery/1.3.2/build/js/json.js +117 -0
- data/test/vendor/jQuery/1.3.2/build/js/pack.js +316 -0
- data/test/vendor/jQuery/1.3.2/build/js/parse.js +105 -0
- data/test/vendor/jQuery/1.3.2/build/js/writeFile.js +19 -0
- data/test/vendor/jQuery/1.3.2/build/js/xml.js +25 -0
- data/test/vendor/jQuery/1.3.2/build/js.jar +0 -0
- data/test/vendor/jQuery/1.3.2/build/runtest/env.js +1 -0
- data/test/vendor/jQuery/1.3.2/build/runtest/test.js +106 -0
- data/test/vendor/jQuery/1.3.2/build/runtest/testrunner.js +197 -0
- data/test/vendor/jQuery/1.3.2/build/speed/benchmarker.css +65 -0
- data/test/vendor/jQuery/1.3.2/build/speed/benchmarker.js +181 -0
- data/test/vendor/jQuery/1.3.2/build/speed/index.html +72 -0
- data/test/vendor/jQuery/1.3.2/build/speed/jquery-basis.js +3549 -0
- data/test/vendor/jQuery/1.3.2/build/style.xsl +99 -0
- data/test/vendor/jQuery/1.3.2/build/yuicompressor-2.4.2.jar +0 -0
- data/test/vendor/jQuery/1.3.2/build.xml +123 -0
- data/test/vendor/jQuery/1.3.2/dist/jquery.js +4376 -0
- data/test/vendor/jQuery/1.3.2/reminder.txt +3 -0
- data/test/vendor/jQuery/1.3.2/src/ajax.js +541 -0
- data/test/vendor/jQuery/1.3.2/src/core.js +1255 -0
- data/test/vendor/jQuery/1.3.2/src/data.js +145 -0
- data/test/vendor/jQuery/1.3.2/src/dimensions.js +49 -0
- data/test/vendor/jQuery/1.3.2/src/event.js +684 -0
- data/test/vendor/jQuery/1.3.2/src/fx.js +407 -0
- data/test/vendor/jQuery/1.3.2/src/intro.js +13 -0
- data/test/vendor/jQuery/1.3.2/src/offset.js +155 -0
- data/test/vendor/jQuery/1.3.2/src/outro.js +1 -0
- data/test/vendor/jQuery/1.3.2/src/selector.js +1015 -0
- data/test/vendor/jQuery/1.3.2/src/support.js +112 -0
- data/test/vendor/jQuery/1.3.2/test/data/cow.jpg +0 -0
- data/test/vendor/jQuery/1.3.2/test/data/dashboard.xml +11 -0
- data/test/vendor/jQuery/1.3.2/test/data/echoQuery.php +1 -0
- data/test/vendor/jQuery/1.3.2/test/data/iframe.html +8 -0
- data/test/vendor/jQuery/1.3.2/test/data/json.php +9 -0
- data/test/vendor/jQuery/1.3.2/test/data/json_assigned_obj.js +1 -0
- data/test/vendor/jQuery/1.3.2/test/data/json_obj.js +1 -0
- data/test/vendor/jQuery/1.3.2/test/data/jsonp.php +10 -0
- data/test/vendor/jQuery/1.3.2/test/data/name.html +1 -0
- data/test/vendor/jQuery/1.3.2/test/data/name.php +29 -0
- data/test/vendor/jQuery/1.3.2/test/data/offset/absolute.html +39 -0
- data/test/vendor/jQuery/1.3.2/test/data/offset/body.html +24 -0
- data/test/vendor/jQuery/1.3.2/test/data/offset/fixed.html +33 -0
- data/test/vendor/jQuery/1.3.2/test/data/offset/relative.html +31 -0
- data/test/vendor/jQuery/1.3.2/test/data/offset/scroll.html +39 -0
- data/test/vendor/jQuery/1.3.2/test/data/offset/static.html +31 -0
- data/test/vendor/jQuery/1.3.2/test/data/offset/table.html +43 -0
- data/test/vendor/jQuery/1.3.2/test/data/params_html.php +12 -0
- data/test/vendor/jQuery/1.3.2/test/data/test.html +7 -0
- data/test/vendor/jQuery/1.3.2/test/data/test.js +3 -0
- data/test/vendor/jQuery/1.3.2/test/data/test.php +7 -0
- data/test/vendor/jQuery/1.3.2/test/data/test2.html +5 -0
- data/test/vendor/jQuery/1.3.2/test/data/test3.html +3 -0
- data/test/vendor/jQuery/1.3.2/test/data/testrunner.js +1 -0
- data/test/vendor/jQuery/1.3.2/test/data/text.php +12 -0
- data/test/vendor/jQuery/1.3.2/test/data/with_fries.xml +25 -0
- data/test/vendor/jQuery/1.3.2/test/index.html +229 -0
- data/test/vendor/jQuery/1.3.2/test/jqenv-1259090275493.html +247 -0
- data/test/vendor/jQuery/1.3.2/test/jqenv-1259091671501.html +247 -0
- data/test/vendor/jQuery/1.3.2/test/jqenv-1259175319655.html +247 -0
- data/test/vendor/jQuery/1.3.2/test/offset.html +28 -0
- data/test/vendor/jQuery/1.3.2/test/otherlibs/jquery/1.2.1/jquery.js +11 -0
- data/test/vendor/jQuery/1.3.2/test/otherlibs/jquery/1.2.3/jquery.js +11 -0
- data/test/vendor/jQuery/1.3.2/test/otherlibs/mootools/1.11/mootools.js +1577 -0
- data/test/vendor/jQuery/1.3.2/test/otherlibs/prototype/1.6.0.2/prototype.js +4221 -0
- data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.7.0/builder.js +131 -0
- data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.7.0/controls.js +835 -0
- data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.7.0/dragdrop.js +944 -0
- data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.7.0/effects.js +1090 -0
- data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.7.0/scriptaculous.js +51 -0
- data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.7.0/slider.js +278 -0
- data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.7.0/unittest.js +564 -0
- data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.8.1/builder.js +136 -0
- data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.8.1/controls.js +965 -0
- data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.8.1/dragdrop.js +974 -0
- data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.8.1/effects.js +1122 -0
- data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.8.1/scriptaculous.js +58 -0
- data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.8.1/slider.js +275 -0
- data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.8.1/sound.js +55 -0
- data/test/vendor/jQuery/1.3.2/test/otherlibs/scriptaculous/1.8.1/unittest.js +568 -0
- data/test/vendor/jQuery/1.3.2/test/polluted.php +64 -0
- data/test/vendor/jQuery/1.3.2/test/qunit/testrunner.js +780 -0
- data/test/vendor/jQuery/1.3.2/test/qunit/testsuite.css +120 -0
- data/test/vendor/jQuery/1.3.2/test/test.js +41 -0
- data/test/vendor/jQuery/1.3.2/test/unit/ajax.js +856 -0
- data/test/vendor/jQuery/1.3.2/test/unit/core.js +1872 -0
- data/test/vendor/jQuery/1.3.2/test/unit/data.js +160 -0
- data/test/vendor/jQuery/1.3.2/test/unit/dimensions.js +86 -0
- data/test/vendor/jQuery/1.3.2/test/unit/event.js +670 -0
- data/test/vendor/jQuery/1.3.2/test/unit/fx.js +451 -0
- data/test/vendor/jQuery/1.3.2/test/unit/offset.js +173 -0
- data/test/vendor/jQuery/1.3.2/test/unit/selector.js +395 -0
- data/test/vendor/jQuery/1.3.2/test/xhtml.php +5 -0
- data/test/vendor/jQuery/1.3.2/version.txt +1 -0
- metadata +158 -22
- data/lib/envjs/runtime.rb.smp +0 -133
- data/test/envjs-call-load-test.js +0 -5
- data/test/envjs-prototype.js +0 -5
- data/test/qunit/package.json +0 -21
- data/test/qunit/test/index.html +0 -17
- data/test/qunit/test/same.js +0 -1368
- data/test/qunit/test/test.js +0 -136
- data/test/qunit.smp/package.json +0 -21
- data/test/qunit.smp/test/index.html +0 -17
- data/test/qunit.smp/test/same.js +0 -1368
- data/test/qunit.smp/test/test.js +0 -136
- data/test/rhino-call-load-test.js +0 -5
- data/test/rhino-prototype.js +0 -5
- data/test/test-with-envs-jar.js +0 -8
- data/test/test-with-rhino-jar.js +0 -9
data/test/qunit.smp/test/test.js
DELETED
@@ -1,136 +0,0 @@
|
|
1
|
-
test("module without setup/teardown (default)", function() {
|
2
|
-
expect(1);
|
3
|
-
ok(true);
|
4
|
-
});
|
5
|
-
|
6
|
-
test("expect in test", 3, function() {
|
7
|
-
ok(true);
|
8
|
-
ok(true);
|
9
|
-
ok(true);
|
10
|
-
});
|
11
|
-
|
12
|
-
test("expect in test", 1, function() {
|
13
|
-
ok(true);
|
14
|
-
});
|
15
|
-
|
16
|
-
module("setup test", {
|
17
|
-
setup: function() {
|
18
|
-
ok(true);
|
19
|
-
}
|
20
|
-
});
|
21
|
-
|
22
|
-
test("module with setup", function() {
|
23
|
-
expect(2);
|
24
|
-
ok(true);
|
25
|
-
});
|
26
|
-
|
27
|
-
var state;
|
28
|
-
|
29
|
-
module("setup/teardown test", {
|
30
|
-
setup: function() {
|
31
|
-
state = true;
|
32
|
-
ok(true);
|
33
|
-
},
|
34
|
-
teardown: function() {
|
35
|
-
ok(true);
|
36
|
-
}
|
37
|
-
});
|
38
|
-
|
39
|
-
test("module with setup/teardown", function() {
|
40
|
-
expect(3);
|
41
|
-
ok(true);
|
42
|
-
});
|
43
|
-
|
44
|
-
module("setup/teardown test 2");
|
45
|
-
|
46
|
-
test("module without setup/teardown", function() {
|
47
|
-
expect(1);
|
48
|
-
ok(true);
|
49
|
-
});
|
50
|
-
|
51
|
-
if (typeof setTimeout !== 'undefined') {
|
52
|
-
state = 'fail';
|
53
|
-
|
54
|
-
module("teardown and stop", {
|
55
|
-
teardown: function() {
|
56
|
-
equals(state, "done", "Test teardown.");
|
57
|
-
}
|
58
|
-
});
|
59
|
-
|
60
|
-
test("teardown must be called after test ended", function() {
|
61
|
-
expect(1);
|
62
|
-
stop();
|
63
|
-
setTimeout(function() {
|
64
|
-
state = "done";
|
65
|
-
start();
|
66
|
-
}, 13);
|
67
|
-
});
|
68
|
-
} // end setTimeout tests
|
69
|
-
|
70
|
-
if (typeof asyncTest !== 'undefined') {
|
71
|
-
module("asyncTest");
|
72
|
-
|
73
|
-
asyncTest("asyncTest", function() {
|
74
|
-
expect(2);
|
75
|
-
ok(true);
|
76
|
-
setTimeout(function() {
|
77
|
-
state = "done";
|
78
|
-
ok(true);
|
79
|
-
start();
|
80
|
-
}, 13);
|
81
|
-
});
|
82
|
-
|
83
|
-
asyncTest("asyncTest", 2, function() {
|
84
|
-
ok(true);
|
85
|
-
setTimeout(function() {
|
86
|
-
state = "done";
|
87
|
-
ok(true);
|
88
|
-
start();
|
89
|
-
}, 13);
|
90
|
-
});
|
91
|
-
} // end asyncTest tests
|
92
|
-
|
93
|
-
module("save scope", {
|
94
|
-
setup: function() {
|
95
|
-
this.foo = "bar";
|
96
|
-
},
|
97
|
-
teardown: function() {
|
98
|
-
same(this.foo, "bar");
|
99
|
-
}
|
100
|
-
});
|
101
|
-
test("scope check", function() {
|
102
|
-
expect(2);
|
103
|
-
same(this.foo, "bar");
|
104
|
-
});
|
105
|
-
|
106
|
-
module("simple testEnvironment setup", {
|
107
|
-
foo: "bar",
|
108
|
-
bugid: "#5311" // example of meta-data
|
109
|
-
});
|
110
|
-
test("scope check", function() {
|
111
|
-
same(this.foo, "bar");
|
112
|
-
});
|
113
|
-
test("modify testEnvironment",function() {
|
114
|
-
this.foo="hamster";
|
115
|
-
});
|
116
|
-
test("testEnvironment reset for next test",function() {
|
117
|
-
same(this.foo, "bar");
|
118
|
-
});
|
119
|
-
|
120
|
-
module("testEnvironment with object", {
|
121
|
-
options:{
|
122
|
-
recipe:"soup",
|
123
|
-
ingredients:["hamster","onions"]
|
124
|
-
}
|
125
|
-
});
|
126
|
-
test("scope check", function() {
|
127
|
-
same(this.options, {recipe:"soup",ingredients:["hamster","onions"]}) ;
|
128
|
-
});
|
129
|
-
test("modify testEnvironment",function() {
|
130
|
-
// since we do a shallow copy, the testEnvironment can be modified
|
131
|
-
this.options.ingredients.push("carrots");
|
132
|
-
});
|
133
|
-
test("testEnvironment reset for next test",function() {
|
134
|
-
same(this.options, {recipe:"soup",ingredients:["hamster","onions","carrots"]}, "Is this a bug or a feature? Could do a deep copy") ;
|
135
|
-
});
|
136
|
-
|
data/test/rhino-prototype.js
DELETED
data/test/test-with-envs-jar.js
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
// Run 'test.js', letting it know that we're running with our customized
|
2
|
-
// version of the JS interpreter: env-js.jar
|
3
|
-
|
4
|
-
whichJarFile = "envjs";
|
5
|
-
whichInterpreter = whichJarFile + " interpreter jar";
|
6
|
-
multiwindow = true;
|
7
|
-
load("dist/env.rhino.js");
|
8
|
-
load("test/primaryTests.js");
|
data/test/test-with-rhino-jar.js
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
// Run 'test.js', letting it know that we're running with the vanilla
|
2
|
-
// unmodified version of the Rhino JS interpreter: rhino.jar
|
3
|
-
|
4
|
-
whichJarFile = "rhino"
|
5
|
-
whichInterpreter = whichJarFile + " interpreter jar";
|
6
|
-
multiwindow = false;
|
7
|
-
load("dist/env.rhino.js");
|
8
|
-
load("test/primaryTests.js");
|
9
|
-
|