xultestrunner 0.2.9 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +4 -1
- data/LICENSE +17 -18
- data/README.rdoc +18 -0
- data/Rakefile +65 -40
- data/VERSION +1 -1
- data/bin/xultest +1 -12
- data/lib/xultestrunner.rb +1 -1
- data/test/test_helper.rb +9 -0
- data/test/xultestrunner_test.rb +7 -0
- data/xpcomcore/app/application.ini +12 -0
- data/xpcomcore/app/chrome/chrome.manifest +1 -0
- data/xpcomcore/app/chrome/content/xul/main_window.xul +6 -0
- data/xpcomcore/app/components/bootstrapper.js +70 -0
- data/xpcomcore/app/defaults/preferences/prefs.js +7 -0
- data/xultestrunner.gemspec +21 -150
- metadata +27 -153
- data/.gitmodules +0 -3
- data/README +0 -17
- data/xulapp/application.ini +0 -9
- data/xulapp/chrome/chrome.manifest +0 -2
- data/xulapp/chrome/content/interface/boot.xul +0 -20
- data/xulapp/chrome/content/interface/testharness.html +0 -30
- data/xulapp/chrome/content/lib/xultestcase.js +0 -140
- data/xulapp/chrome/content/lib/xultestrunner.js +0 -120
- data/xulapp/chrome/content/vendor/prototype/LICENSE +0 -16
- data/xulapp/chrome/content/vendor/prototype/prototype.js +0 -4874
- data/xulapp/chrome/content/vendor/scriptaculous/LICENSE +0 -20
- data/xulapp/chrome/content/vendor/scriptaculous/test.css +0 -90
- data/xulapp/chrome/content/vendor/scriptaculous/unittest.js +0 -566
- data/xulapp/chrome/content/vendor/xpcomcore/LICENSE +0 -21
- data/xulapp/chrome/content/vendor/xpcomcore/README +0 -27
- data/xulapp/chrome/content/vendor/xpcomcore/Rakefile +0 -83
- data/xulapp/chrome/content/vendor/xpcomcore/VERSION.yml +0 -5
- data/xulapp/chrome/content/vendor/xpcomcore/bootstrapper.js +0 -32
- data/xulapp/chrome/content/vendor/xpcomcore/components/XPCOMCore.js +0 -120
- data/xulapp/chrome/content/vendor/xpcomcore/doc/files.html +0 -241
- data/xulapp/chrome/content/vendor/xpcomcore/doc/index.html +0 -243
- data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/Error.html +0 -256
- data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/Kernel.html +0 -1030
- data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/LoadError.html +0 -319
- data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/SelfConceptError.html +0 -319
- data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/_global_.html +0 -316
- data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/src/lib_file.js.html +0 -53
- data/xulapp/chrome/content/vendor/xpcomcore/doc/symbols/src/lib_kernel.js.html +0 -251
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/README.txt +0 -186
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Chain.js +0 -102
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Dumper.js +0 -144
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Hash.js +0 -84
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Link.js +0 -153
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Namespace.js +0 -10
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Opt.js +0 -134
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Reflection.js +0 -26
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/String.js +0 -93
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Testrun.js +0 -129
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame.js +0 -33
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/handlers/FOODOC.js +0 -26
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC/DomReader.js +0 -159
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC/XMLDoc.js +0 -16
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC/XMLParse.js +0 -292
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC.js +0 -26
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/DocComment.js +0 -200
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/DocTag.js +0 -294
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/JsDoc.js +0 -126
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/JsPlate.js +0 -109
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Lang.js +0 -144
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Parser.js +0 -145
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/PluginManager.js +0 -33
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Symbol.js +0 -645
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/SymbolSet.js +0 -241
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/TextStream.js +0 -41
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Token.js +0 -18
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/TokenReader.js +0 -332
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/TokenStream.js +0 -133
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Util.js +0 -32
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Walker.js +0 -474
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC.js +0 -104
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/main.js +0 -111
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/commentSrcJson.js +0 -20
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/frameworkPrototype.js +0 -16
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/functionCall.js +0 -10
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/publishSrcHilite.js +0 -62
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/symbolLink.js +0 -10
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/tagParamConfig.js +0 -31
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/tagSynonyms.js +0 -43
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/run.js +0 -348
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/t/TestDoc.js +0 -144
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/t/runner.js +0 -13
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/addon.js +0 -24
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/anon_inner.js +0 -14
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/augments.js +0 -31
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/augments2.js +0 -26
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/borrows.js +0 -46
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/borrows2.js +0 -23
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/config.js +0 -22
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/constructs.js +0 -18
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/encoding.js +0 -10
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/encoding_other.js +0 -12
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/event.js +0 -54
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/exports.js +0 -14
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/functions_anon.js +0 -39
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/functions_nested.js +0 -33
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/global.js +0 -13
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/globals.js +0 -25
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/ignore.js +0 -10
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/inner.js +0 -16
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/jsdoc_test.js +0 -477
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/lend.js +0 -33
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/memberof.js +0 -19
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/memberof_constructor.js +0 -17
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/module.js +0 -17
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/name.js +0 -19
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/namespace_nested.js +0 -23
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/nocode.js +0 -13
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/oblit_anon.js +0 -20
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/overview.js +0 -20
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/param_inline.js +0 -37
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/params_optional.js +0 -8
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/prototype.js +0 -17
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/prototype_nested.js +0 -9
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/prototype_oblit.js +0 -13
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/prototype_oblit_constructor.js +0 -24
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/public.js +0 -10
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/scripts/code.js +0 -5
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/scripts/notcode.txt +0 -5
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/shared.js +0 -42
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/shared2.js +0 -2
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/shortcuts.js +0 -22
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/static_this.js +0 -13
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/synonyms.js +0 -31
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/tosource.js +0 -23
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/variable_redefine.js +0 -14
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test.js +0 -325
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/changes.txt +0 -96
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/conf/sample.conf +0 -31
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/java/build.xml +0 -36
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/java/build_1.4.xml +0 -36
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/java/classes/js.jar +0 -0
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/java/src/JsDebugRun.java +0 -21
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/java/src/JsRun.java +0 -21
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/jsdebug.jar +0 -0
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/jsrun.jar +0 -0
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/jsrun.sh +0 -52
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/allclasses.tmpl +0 -17
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/allfiles.tmpl +0 -56
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/class.tmpl +0 -646
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/index.tmpl +0 -39
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/publish.js +0 -200
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/static/default.css +0 -162
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/static/header.html +0 -2
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/static/index.html +0 -19
- data/xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/symbol.tmpl +0 -35
- data/xulapp/chrome/content/vendor/xpcomcore/lib/file.js +0 -46
- data/xulapp/chrome/content/vendor/xpcomcore/lib/kernel.js +0 -244
- data/xulapp/chrome/content/vendor/xpcomcore/test/file_test.js +0 -16
- data/xulapp/chrome/content/vendor/xpcomcore/test/fixtures/love.js +0 -1
- data/xulapp/chrome/content/vendor/xpcomcore/test/fixtures/mad_love.js +0 -1
- data/xulapp/chrome/content/vendor/xpcomcore/test/fixtures/mad_world.js +0 -1
- data/xulapp/chrome/content/vendor/xpcomcore/test/fixtures/syntax_error.js +0 -1
- data/xulapp/chrome/content/vendor/xpcomcore/test/kernel_test.js +0 -88
- data/xulapp/components/bootstrap.js +0 -93
- data/xulapp/defaults/preferences/prefs.js +0 -14
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xultestrunner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriel Gironda
|
@@ -9,10 +9,19 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
12
|
+
date: 2009-10-11 00:00:00 -05:00
|
13
13
|
default_executable: xultest
|
14
|
-
dependencies:
|
15
|
-
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: xpcomcore-rubygem
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.5.3
|
24
|
+
version:
|
16
25
|
description: XUL based test runner for running your JS unit tests.
|
17
26
|
email: contact@gironda.org
|
18
27
|
executables:
|
@@ -21,159 +30,23 @@ extensions: []
|
|
21
30
|
|
22
31
|
extra_rdoc_files:
|
23
32
|
- LICENSE
|
24
|
-
- README
|
33
|
+
- README.rdoc
|
25
34
|
files:
|
35
|
+
- .document
|
26
36
|
- .gitignore
|
27
|
-
- .gitmodules
|
28
37
|
- LICENSE
|
29
|
-
- README
|
38
|
+
- README.rdoc
|
30
39
|
- Rakefile
|
31
40
|
- VERSION
|
32
41
|
- bin/xultest
|
33
42
|
- lib/xultestrunner.rb
|
34
|
-
-
|
35
|
-
-
|
36
|
-
-
|
37
|
-
-
|
38
|
-
-
|
39
|
-
-
|
40
|
-
-
|
41
|
-
- xulapp/chrome/content/vendor/prototype/prototype.js
|
42
|
-
- xulapp/chrome/content/vendor/scriptaculous/LICENSE
|
43
|
-
- xulapp/chrome/content/vendor/scriptaculous/test.css
|
44
|
-
- xulapp/chrome/content/vendor/scriptaculous/unittest.js
|
45
|
-
- xulapp/chrome/content/vendor/xpcomcore/LICENSE
|
46
|
-
- xulapp/chrome/content/vendor/xpcomcore/README
|
47
|
-
- xulapp/chrome/content/vendor/xpcomcore/Rakefile
|
48
|
-
- xulapp/chrome/content/vendor/xpcomcore/VERSION.yml
|
49
|
-
- xulapp/chrome/content/vendor/xpcomcore/bootstrapper.js
|
50
|
-
- xulapp/chrome/content/vendor/xpcomcore/components/XPCOMCore.js
|
51
|
-
- xulapp/chrome/content/vendor/xpcomcore/doc/files.html
|
52
|
-
- xulapp/chrome/content/vendor/xpcomcore/doc/index.html
|
53
|
-
- xulapp/chrome/content/vendor/xpcomcore/doc/symbols/Error.html
|
54
|
-
- xulapp/chrome/content/vendor/xpcomcore/doc/symbols/Kernel.html
|
55
|
-
- xulapp/chrome/content/vendor/xpcomcore/doc/symbols/LoadError.html
|
56
|
-
- xulapp/chrome/content/vendor/xpcomcore/doc/symbols/SelfConceptError.html
|
57
|
-
- xulapp/chrome/content/vendor/xpcomcore/doc/symbols/_global_.html
|
58
|
-
- xulapp/chrome/content/vendor/xpcomcore/doc/symbols/src/lib_file.js.html
|
59
|
-
- xulapp/chrome/content/vendor/xpcomcore/doc/symbols/src/lib_kernel.js.html
|
60
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/README.txt
|
61
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame.js
|
62
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Chain.js
|
63
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Dumper.js
|
64
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Hash.js
|
65
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Link.js
|
66
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Namespace.js
|
67
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Opt.js
|
68
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Reflection.js
|
69
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/String.js
|
70
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/frame/Testrun.js
|
71
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/handlers/FOODOC.js
|
72
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC.js
|
73
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC/DomReader.js
|
74
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC/XMLDoc.js
|
75
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC/XMLParse.js
|
76
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC.js
|
77
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/DocComment.js
|
78
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/DocTag.js
|
79
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/JsDoc.js
|
80
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/JsPlate.js
|
81
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Lang.js
|
82
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Parser.js
|
83
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/PluginManager.js
|
84
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Symbol.js
|
85
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/SymbolSet.js
|
86
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/TextStream.js
|
87
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Token.js
|
88
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/TokenReader.js
|
89
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/TokenStream.js
|
90
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Util.js
|
91
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Walker.js
|
92
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/main.js
|
93
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/commentSrcJson.js
|
94
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/frameworkPrototype.js
|
95
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/functionCall.js
|
96
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/publishSrcHilite.js
|
97
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/symbolLink.js
|
98
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/tagParamConfig.js
|
99
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/plugins/tagSynonyms.js
|
100
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/run.js
|
101
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/t/TestDoc.js
|
102
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/t/runner.js
|
103
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test.js
|
104
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/addon.js
|
105
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/anon_inner.js
|
106
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/augments.js
|
107
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/augments2.js
|
108
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/borrows.js
|
109
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/borrows2.js
|
110
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/config.js
|
111
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/constructs.js
|
112
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/encoding.js
|
113
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/encoding_other.js
|
114
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/event.js
|
115
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/exports.js
|
116
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/functions_anon.js
|
117
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/functions_nested.js
|
118
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/global.js
|
119
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/globals.js
|
120
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/ignore.js
|
121
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/inner.js
|
122
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/jsdoc_test.js
|
123
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/lend.js
|
124
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/memberof.js
|
125
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/memberof_constructor.js
|
126
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/module.js
|
127
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/name.js
|
128
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/namespace_nested.js
|
129
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/nocode.js
|
130
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/oblit_anon.js
|
131
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/overview.js
|
132
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/param_inline.js
|
133
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/params_optional.js
|
134
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/prototype.js
|
135
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/prototype_nested.js
|
136
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/prototype_oblit.js
|
137
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/prototype_oblit_constructor.js
|
138
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/public.js
|
139
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/scripts/code.js
|
140
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/scripts/notcode.txt
|
141
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/shared.js
|
142
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/shared2.js
|
143
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/shortcuts.js
|
144
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/static_this.js
|
145
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/synonyms.js
|
146
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/tosource.js
|
147
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/app/test/variable_redefine.js
|
148
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/changes.txt
|
149
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/conf/sample.conf
|
150
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/java/build.xml
|
151
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/java/build_1.4.xml
|
152
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/java/classes/js.jar
|
153
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/java/src/JsDebugRun.java
|
154
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/java/src/JsRun.java
|
155
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/jsdebug.jar
|
156
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/jsrun.jar
|
157
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/jsrun.sh
|
158
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/allclasses.tmpl
|
159
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/allfiles.tmpl
|
160
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/class.tmpl
|
161
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/index.tmpl
|
162
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/publish.js
|
163
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/static/default.css
|
164
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/static/header.html
|
165
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/static/index.html
|
166
|
-
- xulapp/chrome/content/vendor/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/symbol.tmpl
|
167
|
-
- xulapp/chrome/content/vendor/xpcomcore/lib/file.js
|
168
|
-
- xulapp/chrome/content/vendor/xpcomcore/lib/kernel.js
|
169
|
-
- xulapp/chrome/content/vendor/xpcomcore/test/file_test.js
|
170
|
-
- xulapp/chrome/content/vendor/xpcomcore/test/fixtures/love.js
|
171
|
-
- xulapp/chrome/content/vendor/xpcomcore/test/fixtures/mad_love.js
|
172
|
-
- xulapp/chrome/content/vendor/xpcomcore/test/fixtures/mad_world.js
|
173
|
-
- xulapp/chrome/content/vendor/xpcomcore/test/fixtures/syntax_error.js
|
174
|
-
- xulapp/chrome/content/vendor/xpcomcore/test/kernel_test.js
|
175
|
-
- xulapp/components/bootstrap.js
|
176
|
-
- xulapp/defaults/preferences/prefs.js
|
43
|
+
- test/test_helper.rb
|
44
|
+
- test/xultestrunner_test.rb
|
45
|
+
- xpcomcore/app/application.ini
|
46
|
+
- xpcomcore/app/chrome/chrome.manifest
|
47
|
+
- xpcomcore/app/chrome/content/xul/main_window.xul
|
48
|
+
- xpcomcore/app/components/bootstrapper.js
|
49
|
+
- xpcomcore/app/defaults/preferences/prefs.js
|
177
50
|
- xultestrunner.gemspec
|
178
51
|
has_rdoc: true
|
179
52
|
homepage: http://github.com/gabrielg/xultestrunner
|
@@ -199,9 +72,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
199
72
|
requirements: []
|
200
73
|
|
201
74
|
rubyforge_project:
|
202
|
-
rubygems_version: 1.3.
|
75
|
+
rubygems_version: 1.3.5
|
203
76
|
signing_key:
|
204
77
|
specification_version: 3
|
205
78
|
summary: XUL based test runner for running your JS unit tests.
|
206
|
-
test_files:
|
207
|
-
|
79
|
+
test_files:
|
80
|
+
- test/test_helper.rb
|
81
|
+
- test/xultestrunner_test.rb
|
data/.gitmodules
DELETED
data/README
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
XULTestRunner
|
2
|
-
=============
|
3
|
-
|
4
|
-
This is a XUL based test runner for running the quasi-scriptaculous-unittest.js-based tests that Conflagration and WaterTower and XPCOMCore use.
|
5
|
-
|
6
|
-
Yes, it is a XUL app in a RubyGem, yes I am in touch with this.
|
7
|
-
|
8
|
-
NOTE
|
9
|
-
====
|
10
|
-
|
11
|
-
This project uses git submodules. Remember to 'git submodule init' and 'git submodule update'.
|
12
|
-
|
13
|
-
TODO
|
14
|
-
====
|
15
|
-
|
16
|
-
* Better error output.
|
17
|
-
* Write its own tests in itself.
|
data/xulapp/application.ini
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
<?xml version="1.0"?>
|
2
|
-
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
3
|
-
|
4
|
-
<window id="main" title="XULTestRunner Console" width="800" height="600" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
5
|
-
<script type="text/javascript">XPCOMCore({scope: this});</script>
|
6
|
-
<script type="text/javascript" src="resource://xultestrunner/vendor/prototype/prototype.js" />
|
7
|
-
<script type="text/javascript" src="resource://xultestrunner/lib/xultestrunner.js" />
|
8
|
-
<script type="text/javascript">
|
9
|
-
window.addEventListener('load', function(){
|
10
|
-
var cmdService = $Cc["@conflagrationjs.org/xultestrunner/app-startup-clh;1"].getService().wrappedJSObject;
|
11
|
-
var harnessURI = "chrome://xultestrunner/content/interface/testharness.html";
|
12
|
-
var xulTestRunner = XULTestRunner.initializeFromCmdArgs(cmdService.args, {browser: $('test-browser'), harnessURI: harnessURI});
|
13
|
-
xulTestRunner.go();
|
14
|
-
}, false);
|
15
|
-
</script>
|
16
|
-
|
17
|
-
<caption label="XULTestRunner Console" />
|
18
|
-
<browser src="about:blank" id="test-browser" type="content-primary" flex="1" />
|
19
|
-
|
20
|
-
</window>
|
@@ -1,30 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
3
|
-
<head>
|
4
|
-
<title>Unit Test Harness</title>
|
5
|
-
<script type="text/javascript">XPCOMCore({scope: this});</script>
|
6
|
-
<script type="text/javascript" src="resource://xultestrunner/vendor/prototype/prototype.js"></script>
|
7
|
-
<script type="text/javascript" src="resource://xultestrunner/vendor/scriptaculous/unittest.js"></script>
|
8
|
-
<link rel="stylesheet" href="resource://xultestrunner/vendor/scriptaculous/test.css" type="text/css" />
|
9
|
-
<script type="text/javascript">
|
10
|
-
$(document).observe('dom:loaded', function(){
|
11
|
-
// FIXME - add stuff to xpcomcore for doing this jacked up crap
|
12
|
-
var ioService = $Cc["@mozilla.org/network/io-service;1"].getService($Ci.nsIIOService);
|
13
|
-
var resProt = ioService.getProtocolHandler("resource").QueryInterface($Ci.nsIResProtocolHandler);
|
14
|
-
var libPath = ioService.newURI(resProt.resolveURI(ioService.newURI("resource://xultestrunner/lib", null, null)), null, null).QueryInterface(Components.interfaces.nsIURL).path;
|
15
|
-
|
16
|
-
$LOAD_PATH.push(libPath);
|
17
|
-
require("xultestcase");
|
18
|
-
|
19
|
-
var qp = window.location.search.toQueryParams();
|
20
|
-
var testCase = XULTestCase.loadFromFile(qp.testFile);
|
21
|
-
testCase.go();
|
22
|
-
});
|
23
|
-
</script>
|
24
|
-
</head>
|
25
|
-
<body>
|
26
|
-
<h1>Unit Test Harness</h1>
|
27
|
-
<!-- Log output -->
|
28
|
-
<div id="testlog"></div>
|
29
|
-
</body>
|
30
|
-
</html>
|
@@ -1,140 +0,0 @@
|
|
1
|
-
var XULTestCase = Class.create({
|
2
|
-
initialize: function(testName, testDef) {
|
3
|
-
this.testRunner = new XULTestCase.TestRunner(testDef);
|
4
|
-
this.testRunner.name = testName;
|
5
|
-
},
|
6
|
-
|
7
|
-
go: function() {
|
8
|
-
this.testRunner.runTests();
|
9
|
-
}
|
10
|
-
|
11
|
-
});
|
12
|
-
|
13
|
-
Object.extend(XULTestCase, {
|
14
|
-
create: function(testName, testDefinitionFunc) {
|
15
|
-
var tests = {};
|
16
|
-
var setupCollector = function(givenSetup) { tests['setup'] = givenSetup; };
|
17
|
-
var teardownCollector = function(givenTeardown) { tests['teardown'] = givenTeardown; };
|
18
|
-
var testCollector = function(testName, testDef) { tests["test " + testName] = testDef; };
|
19
|
-
testDefinitionFunc(setupCollector, teardownCollector, testCollector);
|
20
|
-
var testCase = new XULTestCase(testName, tests);
|
21
|
-
this.__LAST_DEFINED_TESTCASE__ = testCase;
|
22
|
-
return testCase
|
23
|
-
},
|
24
|
-
|
25
|
-
loadFromFile: function(fileURI) {
|
26
|
-
try {
|
27
|
-
load(fileURI);
|
28
|
-
if (this.__LAST_DEFINED_TESTCASE__) {
|
29
|
-
return this.__LAST_DEFINED_TESTCASE__;
|
30
|
-
} else {
|
31
|
-
throw("Wuh Oh");
|
32
|
-
}
|
33
|
-
} catch (e) {
|
34
|
-
this._handleTestLoadError(fileURI, e);
|
35
|
-
} finally {
|
36
|
-
this.__LAST_DEFINED_TESTCASE__ = null;
|
37
|
-
}
|
38
|
-
},
|
39
|
-
|
40
|
-
_handleTestLoadError: function(fileURI, e) {
|
41
|
-
// Notify observers we failed and hope for the best
|
42
|
-
// FIXME - this sucks error reporting wise
|
43
|
-
var observerService = $Cc["@mozilla.org/observer-service;1"].getService($Ci.nsIObserverService);
|
44
|
-
observerService.notifyObservers(null, "xultestrunner-testloaderror", Object.toJSON({file: fileURI, exception: e.toString()}));
|
45
|
-
}
|
46
|
-
|
47
|
-
});
|
48
|
-
|
49
|
-
XULTestCase.Logger = Class.create(Test.Unit.Logger, {
|
50
|
-
consoleOutputMapping: {failed: 'F', error: 'E', passed: '.'},
|
51
|
-
|
52
|
-
initialize: function($super, log) {
|
53
|
-
$super(log);
|
54
|
-
this.unpassedTests = [];
|
55
|
-
},
|
56
|
-
|
57
|
-
finish: function ($super, status, summary) {
|
58
|
-
$super(status, summary);
|
59
|
-
print(this.consoleOutputMapping[status]);
|
60
|
-
if (status != "passed") {
|
61
|
-
this.unpassedTests.push({name: this.testName, status: status, summary: summary});
|
62
|
-
}
|
63
|
-
}
|
64
|
-
});
|
65
|
-
|
66
|
-
var testUnitInspect = Test.Unit.inspect;
|
67
|
-
Test.Unit.inspect = function(object) {
|
68
|
-
// FIXME - kinda seedy way to check if we got an Error rather than
|
69
|
-
// anything else and inspect it differently
|
70
|
-
if (object.stack && object.message) {
|
71
|
-
return "#{name}: #{message}\nFile: #{fileName} - Line: #{lineNumber}\n#{stack}".interpolate(object);
|
72
|
-
} else {
|
73
|
-
return testUnitInspect(object);
|
74
|
-
}
|
75
|
-
};
|
76
|
-
|
77
|
-
XULTestCase.TestRunner = Class.create(Test.Unit.Runner, {
|
78
|
-
// FIXME - ugh. straight rip from unittest.js just so we can ditch the settimeout
|
79
|
-
// and instantiate our own logger.
|
80
|
-
|
81
|
-
initialize: function(testcases) {
|
82
|
-
this.options = Object.extend({
|
83
|
-
testLog: 'testlog'
|
84
|
-
}, arguments[1] || {});
|
85
|
-
this.options.resultsURL = this.parseResultsURLQueryParameter();
|
86
|
-
this.options.tests = this.parseTestsQueryParameter();
|
87
|
-
if (this.options.testLog) {
|
88
|
-
this.options.testLog = $(this.options.testLog) || null;
|
89
|
-
}
|
90
|
-
if(this.options.tests) {
|
91
|
-
this.tests = [];
|
92
|
-
for(var i = 0; i < this.options.tests.length; i++) {
|
93
|
-
if(/^test/.test(this.options.tests[i])) {
|
94
|
-
this.tests.push(new Test.Unit.Testcase(this.options.tests[i], testcases[this.options.tests[i]], testcases["setup"], testcases["teardown"]));
|
95
|
-
}
|
96
|
-
}
|
97
|
-
} else {
|
98
|
-
if (this.options.test) {
|
99
|
-
this.tests = [new Test.Unit.Testcase(this.options.test, testcases[this.options.test], testcases["setup"], testcases["teardown"])];
|
100
|
-
} else {
|
101
|
-
this.tests = [];
|
102
|
-
for(var testcase in testcases) {
|
103
|
-
if(/^test/.test(testcase)) {
|
104
|
-
this.tests.push(
|
105
|
-
new Test.Unit.Testcase(
|
106
|
-
this.options.context ? ' -> ' + this.options.titles[testcase] : testcase,
|
107
|
-
testcases[testcase], testcases["setup"], testcases["teardown"]
|
108
|
-
));
|
109
|
-
}
|
110
|
-
}
|
111
|
-
}
|
112
|
-
}
|
113
|
-
this.currentTest = 0;
|
114
|
-
this.logger = new XULTestCase.Logger(this.options.testLog);
|
115
|
-
},
|
116
|
-
|
117
|
-
postResults: function($super) {
|
118
|
-
$super();
|
119
|
-
this._finishUpTestCase();
|
120
|
-
},
|
121
|
-
|
122
|
-
_finishUpTestCase: function() {
|
123
|
-
var observerService = $Cc["@mozilla.org/observer-service;1"].getService($Ci.nsIObserverService);
|
124
|
-
var data = {name: this.name, unpassedTests: this.logger.unpassedTests,
|
125
|
-
summary: this._summaryData(), testLength: this.tests.length};
|
126
|
-
// Need to pass between observers as JSON to avoid crashes. Wee.
|
127
|
-
observerService.notifyObservers(null, "xultestrunner-testdone", Object.toJSON(data));
|
128
|
-
},
|
129
|
-
|
130
|
-
_summaryData: function() {
|
131
|
-
var assertions = 0, failures = 0, errors = 0;
|
132
|
-
$A(this.tests).each(function(test) {
|
133
|
-
assertions += test.assertions;
|
134
|
-
failures += test.failures;
|
135
|
-
errors += test.errors;
|
136
|
-
});
|
137
|
-
return {assertions: assertions, failures: failures, errors: errors};
|
138
|
-
}
|
139
|
-
|
140
|
-
});
|
@@ -1,120 +0,0 @@
|
|
1
|
-
var XULTestRunner = Class.create({
|
2
|
-
initialize: function(options) {
|
3
|
-
this.options = options;
|
4
|
-
this._testResults = [];
|
5
|
-
this.appStartup = $Cc["@mozilla.org/toolkit/app-startup;1"].getService($Ci.nsIAppStartup);
|
6
|
-
},
|
7
|
-
|
8
|
-
handleExit: function (exitWithFailure) {
|
9
|
-
if (exitWithFailure) {
|
10
|
-
puts("Test Failures!");
|
11
|
-
// We kill ourselves this way because we need a non-zero exit status. This is really hacky.
|
12
|
-
// Really, really hacky.
|
13
|
-
var envFile = $Cc["@mozilla.org/file/local;1"].createInstance($Ci.nsILocalFile);
|
14
|
-
envFile.initWithPath("/usr/bin/env");
|
15
|
-
var process = $Cc["@mozilla.org/process/util;1"].createInstance($Ci.nsIProcess);
|
16
|
-
process.init(envFile);
|
17
|
-
process.run(true, ["ruby", "-e", "Process.kill(9, Process.ppid)"], 3);
|
18
|
-
}
|
19
|
-
this.appStartup.quit($Ci.nsIAppStartup.eForceQuit);
|
20
|
-
},
|
21
|
-
|
22
|
-
|
23
|
-
go: function () {
|
24
|
-
this._registerObservers();
|
25
|
-
var testsToRun = $A(this.options.tests).collect(function(testFile) { return '"' + testFile.path + '"'; });
|
26
|
-
puts("Running tests...");
|
27
|
-
puts(testsToRun.join(" ") + "\n");
|
28
|
-
this._runNextTest();
|
29
|
-
},
|
30
|
-
|
31
|
-
observe: function(subject, topic, data) {
|
32
|
-
// Need to pass between observers as JSON to avoid XPCOM crashes. Wee.
|
33
|
-
var data = data.evalJSON();
|
34
|
-
if (topic == "xultestrunner-testdone") {
|
35
|
-
this._testResults.push(data);
|
36
|
-
} else if (topic == "xultestrunner-testloaderror") {
|
37
|
-
puts("There was an error loading test '#{file}': #{exception}".interpolate(data));
|
38
|
-
}
|
39
|
-
this._runNextTest();
|
40
|
-
},
|
41
|
-
|
42
|
-
_runNextTest: function() {
|
43
|
-
var testFile = this.options.tests.shift();
|
44
|
-
if (testFile) {
|
45
|
-
this._runTest(testFile);
|
46
|
-
} else {
|
47
|
-
this._finishTestRun()
|
48
|
-
}
|
49
|
-
},
|
50
|
-
|
51
|
-
_runTest: function(testFile) {
|
52
|
-
var qs = Object.toQueryString({testFile: encodeURI(testFile.path)});
|
53
|
-
var harnessWithPath = this.options.harnessURI + "?" + qs;
|
54
|
-
this.options.browser.loadURI(harnessWithPath);
|
55
|
-
},
|
56
|
-
|
57
|
-
_finishTestRun: function() {
|
58
|
-
print("\n\n");
|
59
|
-
var exitWithFailure = this._doSummary();
|
60
|
-
this.handleExit(exitWithFailure);
|
61
|
-
},
|
62
|
-
|
63
|
-
_doSummary: function() {
|
64
|
-
var testRunners = 0, testCases = 0, unpassedLength = 0, assertions = 0, failures = 0, errors = 0;
|
65
|
-
$A(this._testResults).each(function(testResult) {
|
66
|
-
$A(testResult.unpassedTests).each(function(unpassedTest) {
|
67
|
-
unpassedLength += 1;
|
68
|
-
this._showSummaryForTestResult(testResult.name, unpassedTest, unpassedLength);
|
69
|
-
}, this);
|
70
|
-
testRunners++;
|
71
|
-
testCases += testResult.testLength;
|
72
|
-
assertions += testResult.summary.assertions;
|
73
|
-
failures += testResult.summary.failures;
|
74
|
-
errors += testResult.summary.errors;
|
75
|
-
}, this);
|
76
|
-
|
77
|
-
var overallSummary = "\n\n#{runners} runners, #{cases} cases, #{unpassed} unpassed, #{assertions} assertions, #{failures} failures, #{errors} errors.\n";
|
78
|
-
puts(overallSummary.interpolate({runners: testRunners, cases: testCases,
|
79
|
-
unpassed: unpassedLength, assertions: assertions, failures: failures, errors: errors}));
|
80
|
-
return unpassedLength > 0;
|
81
|
-
},
|
82
|
-
|
83
|
-
_showSummaryForTestResult: function(testName, testResult, failureIndex) {
|
84
|
-
puts("#{index}) #{testName} - #{name}".interpolate({index: failureIndex, testName: testName, name: testResult.name}));
|
85
|
-
puts(" " + testResult.status.toUpperCase() + ":\n");
|
86
|
-
puts(testResult.summary.replace(/^/mg, " ") + "\n\n");
|
87
|
-
},
|
88
|
-
|
89
|
-
_registerObservers: function() {
|
90
|
-
var observerService = $Cc["@mozilla.org/observer-service;1"].getService($Ci.nsIObserverService);
|
91
|
-
observerService.addObserver(this, "xultestrunner-testdone", false);
|
92
|
-
observerService.addObserver(this, "xultestrunner-testloaderror", false);
|
93
|
-
}
|
94
|
-
});
|
95
|
-
|
96
|
-
Object.extend(XULTestRunner, {
|
97
|
-
testFileMatcher: /_test\.js$/,
|
98
|
-
initializeFromCmdArgs: function(cmdArgs, options) {
|
99
|
-
if (cmdArgs.testDir) {
|
100
|
-
var tests = this._findTestsFromDir(cmdArgs.testDir);
|
101
|
-
} else if (cmdArgs.testFile) {
|
102
|
-
var tests = [cmdArgs.testFile];
|
103
|
-
}
|
104
|
-
return new this(Object.extend({tests: $A(tests)}, options));
|
105
|
-
},
|
106
|
-
|
107
|
-
_findTestsFromDir: function(rootDir) {
|
108
|
-
var testFiles = [];
|
109
|
-
var entries = rootDir.directoryEntries;
|
110
|
-
while (entries.hasMoreElements()) {
|
111
|
-
var entry = entries.getNext().QueryInterface($Ci.nsIFile);
|
112
|
-
if (entry.isDirectory()) {
|
113
|
-
testFiles = testFiles.concat(this._findTestsFromDir(entry));
|
114
|
-
} else if (this.testFileMatcher.test(entry.path)) {
|
115
|
-
testFiles.push(entry);
|
116
|
-
}
|
117
|
-
}
|
118
|
-
return testFiles;
|
119
|
-
}
|
120
|
-
});
|
@@ -1,16 +0,0 @@
|
|
1
|
-
Copyright (c) 2005-2008 Sam Stephenson
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
-
of this software and associated documentation files (the "Software"), to deal
|
5
|
-
in the Software without restriction, including without limitation the rights
|
6
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
-
copies of the Software, and to permit persons to whom the Software is
|
8
|
-
furnished to do so, subject to the following conditions:
|
9
|
-
|
10
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
11
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
12
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
13
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
14
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
15
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
16
|
-
SOFTWARE.
|