smparkes-envjs 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/envjsrb +2 -0
- data/lib/envjs/env.js +25 -76
- data/lib/envjs/net/file.rb +6 -0
- data/lib/envjs/options.rb +11 -0
- data/lib/envjs/runtime.rb +62 -0
- data/lib/envjs/runtime.rb.smp +133 -0
- data/test/html/script.js +1 -0
- data/test/index.html +29 -10
- data/test/qunit.smp/package.json +21 -0
- data/test/qunit.smp/qunit/qunit.css +17 -0
- data/test/qunit.smp/qunit/qunit.js +997 -0
- data/test/qunit.smp/test/index.html +17 -0
- data/test/qunit.smp/test/same.js +1368 -0
- data/test/qunit.smp/test/test.js +136 -0
- data/test/qunit/qunit/qunit.js.smp +1002 -0
- data/test/unit/onload.js +17 -13
- metadata +12 -2
data/test/unit/onload.js
CHANGED
@@ -14,7 +14,7 @@ test("Execution of onload events in top-level document",
|
|
14
14
|
function() {
|
15
15
|
|
16
16
|
// top-level window-onload works, or test framework wouldn't run.....
|
17
|
-
expect(
|
17
|
+
expect(10);
|
18
18
|
|
19
19
|
var mtch = document.getElementById('pCreatedByBodyOnload').innerHTML.
|
20
20
|
match(/dynamically-generated paragraph/);
|
@@ -22,8 +22,6 @@ test("Execution of onload events in top-level document",
|
|
22
22
|
"Got confirmation that body-onload handler executed");
|
23
23
|
}catch(e){print(e);}
|
24
24
|
|
25
|
-
print("here",document);
|
26
|
-
|
27
25
|
/*
|
28
26
|
mtch = document.getElementById('pCreatedByIframeOnload').innerHTML.
|
29
27
|
match(/iframe-onload event handler/);
|
@@ -63,23 +61,29 @@ print("here",document);
|
|
63
61
|
"img-onload handler executes when img.src assigned");
|
64
62
|
}catch(e){print(e);}
|
65
63
|
|
66
|
-
mtch = document.getElementById('
|
67
|
-
match(/script
|
64
|
+
mtch = document.getElementById('pCreatedByScriptA').innerHTML.
|
65
|
+
match(/script event handler/);
|
68
66
|
try{ ok(mtch && mtch.length > 0,
|
69
|
-
|
70
|
-
|
67
|
+
"Got confirmation that script-onerror handler executed");
|
68
|
+
}catch(e){print(e);}
|
71
69
|
|
72
|
-
|
73
|
-
|
74
|
-
|
70
|
+
try{ ok(!document.getElementById('pCreatedByScriptB'),
|
71
|
+
"Got confirmation that script-onload handler did not execute");
|
72
|
+
}catch(e){print(e);}
|
73
|
+
|
74
|
+
mtch = document.getElementById('pCreatedByScriptD').innerHTML.
|
75
|
+
match(/script event handler/);
|
75
76
|
try{ ok(mtch && mtch.length > 0,
|
76
|
-
"
|
77
|
+
"Got confirmation that script-onload handler executed");
|
78
|
+
}catch(e){print(e);}
|
79
|
+
|
80
|
+
try{ ok(!document.getElementById('pCreatedByScriptC'),
|
81
|
+
"Got confirmation that script-onerror handler did not execute");
|
77
82
|
}catch(e){print(e);}
|
78
|
-
*/
|
79
83
|
|
80
84
|
mtch = document.getElementById('pShouldntBeCreated');
|
81
85
|
try{ ok(!(mtch),
|
82
|
-
"Confirmed that script-onload handler that shouldn't execute actually didn't");
|
86
|
+
"Confirmed that script-onload handler that shouldn't execute actually didn't");
|
83
87
|
}catch(e){print(e);}
|
84
88
|
});
|
85
89
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smparkes-envjs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Resig
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-11-
|
13
|
+
date: 2009-11-09 00:00:00 -08:00
|
14
14
|
default_executable: envjsrb
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -45,7 +45,9 @@ files:
|
|
45
45
|
- lib/envjs/env.js
|
46
46
|
- lib/envjs/net.rb
|
47
47
|
- lib/envjs/net/file.rb
|
48
|
+
- lib/envjs/options.rb
|
48
49
|
- lib/envjs/runtime.rb
|
50
|
+
- lib/envjs/runtime.rb.smp
|
49
51
|
- lib/envjs/tempfile.rb
|
50
52
|
- test/call-load-test.js
|
51
53
|
- test/debug.js
|
@@ -59,6 +61,7 @@ files:
|
|
59
61
|
- test/html/iframeN.html
|
60
62
|
- test/html/malformed.html
|
61
63
|
- test/html/scope.html
|
64
|
+
- test/html/script.js
|
62
65
|
- test/html/trivial.html
|
63
66
|
- test/html/with_js.html
|
64
67
|
- test/index.html
|
@@ -66,9 +69,16 @@ files:
|
|
66
69
|
- test/primaryTests.js
|
67
70
|
- test/prototype.js
|
68
71
|
- test/qunit.js
|
72
|
+
- test/qunit.smp/package.json
|
73
|
+
- test/qunit.smp/qunit/qunit.css
|
74
|
+
- test/qunit.smp/qunit/qunit.js
|
75
|
+
- test/qunit.smp/test/index.html
|
76
|
+
- test/qunit.smp/test/same.js
|
77
|
+
- test/qunit.smp/test/test.js
|
69
78
|
- test/qunit/package.json
|
70
79
|
- test/qunit/qunit/qunit.css
|
71
80
|
- test/qunit/qunit/qunit.js
|
81
|
+
- test/qunit/qunit/qunit.js.smp
|
72
82
|
- test/qunit/test/index.html
|
73
83
|
- test/qunit/test/same.js
|
74
84
|
- test/qunit/test/test.js
|