gabrielg-xultestrunner 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/xulapp/application.ini +2 -2
- data/xulapp/chrome/content/interface/boot.xul +1 -1
- data/xulapp/chrome/content/interface/testharness.html +2 -2
- data/xulapp/chrome/content/vendor/xpcomcore/LICENSE +21 -0
- data/xulapp/chrome/content/vendor/xpcomcore/README +11 -15
- data/xulapp/chrome/content/vendor/xpcomcore/Rakefile +69 -2
- data/xulapp/chrome/content/vendor/xpcomcore/VERSION.yml +5 -0
- data/xulapp/chrome/content/vendor/xpcomcore/bootstrapper.js +32 -0
- data/xulapp/chrome/content/vendor/xpcomcore/components/XPCOMCore.js +120 -0
- data/xulapp/chrome/content/vendor/xpcomcore/doc/Kernel.html +648 -0
- data/xulapp/chrome/content/vendor/xpcomcore/doc/LoadError.html +262 -0
- data/xulapp/chrome/content/vendor/xpcomcore/doc/SelfConceptError.html +262 -0
- data/xulapp/chrome/content/vendor/xpcomcore/doc/allclasses-frame.html +49 -0
- data/xulapp/chrome/content/vendor/xpcomcore/doc/allclasses-noframe.html +48 -0
- data/xulapp/chrome/content/vendor/xpcomcore/doc/help-doc.html +160 -0
- data/xulapp/chrome/content/vendor/xpcomcore/doc/index-all.html +263 -0
- data/xulapp/chrome/content/vendor/xpcomcore/doc/index.html +22 -0
- data/xulapp/chrome/content/vendor/xpcomcore/doc/overview-summary-kernel.js.html +371 -0
- data/xulapp/chrome/content/vendor/xpcomcore/doc/overview-summary.html +179 -0
- data/xulapp/chrome/content/vendor/xpcomcore/doc/overview-tree.html +127 -0
- data/xulapp/chrome/content/vendor/xpcomcore/doc/stylesheet.css +39 -0
- data/xulapp/chrome/content/vendor/xpcomcore/lib/kernel.js +146 -36
- data/xulapp/chrome/content/vendor/xpcomcore/test/kernel_test.js +5 -1
- data/xulapp/components/bootstrap.js +87 -102
- data/xultestrunner.gemspec +18 -4
- metadata +18 -4
- data/xulapp/chrome/content/vendor/xpcomcore/bootstrap.js +0 -108
- data/xulapp/chrome/content/vendor/xpcomcore/lib/loader.js +0 -16
data/xultestrunner.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{xultestrunner}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Gabriel Gironda"]
|
12
|
-
s.date = %q{2009-09-
|
12
|
+
s.date = %q{2009-09-14}
|
13
13
|
s.default_executable = %q{xultest}
|
14
14
|
s.description = %q{XUL based test runner for running your JS unit tests.}
|
15
15
|
s.email = %q{contact@gironda.org}
|
@@ -38,11 +38,25 @@ Gem::Specification.new do |s|
|
|
38
38
|
"xulapp/chrome/content/vendor/scriptaculous/LICENSE",
|
39
39
|
"xulapp/chrome/content/vendor/scriptaculous/test.css",
|
40
40
|
"xulapp/chrome/content/vendor/scriptaculous/unittest.js",
|
41
|
+
"xulapp/chrome/content/vendor/xpcomcore/LICENSE",
|
41
42
|
"xulapp/chrome/content/vendor/xpcomcore/README",
|
42
43
|
"xulapp/chrome/content/vendor/xpcomcore/Rakefile",
|
43
|
-
"xulapp/chrome/content/vendor/xpcomcore/
|
44
|
+
"xulapp/chrome/content/vendor/xpcomcore/VERSION.yml",
|
45
|
+
"xulapp/chrome/content/vendor/xpcomcore/bootstrapper.js",
|
46
|
+
"xulapp/chrome/content/vendor/xpcomcore/components/XPCOMCore.js",
|
47
|
+
"xulapp/chrome/content/vendor/xpcomcore/doc/Kernel.html",
|
48
|
+
"xulapp/chrome/content/vendor/xpcomcore/doc/LoadError.html",
|
49
|
+
"xulapp/chrome/content/vendor/xpcomcore/doc/SelfConceptError.html",
|
50
|
+
"xulapp/chrome/content/vendor/xpcomcore/doc/allclasses-frame.html",
|
51
|
+
"xulapp/chrome/content/vendor/xpcomcore/doc/allclasses-noframe.html",
|
52
|
+
"xulapp/chrome/content/vendor/xpcomcore/doc/help-doc.html",
|
53
|
+
"xulapp/chrome/content/vendor/xpcomcore/doc/index-all.html",
|
54
|
+
"xulapp/chrome/content/vendor/xpcomcore/doc/index.html",
|
55
|
+
"xulapp/chrome/content/vendor/xpcomcore/doc/overview-summary-kernel.js.html",
|
56
|
+
"xulapp/chrome/content/vendor/xpcomcore/doc/overview-summary.html",
|
57
|
+
"xulapp/chrome/content/vendor/xpcomcore/doc/overview-tree.html",
|
58
|
+
"xulapp/chrome/content/vendor/xpcomcore/doc/stylesheet.css",
|
44
59
|
"xulapp/chrome/content/vendor/xpcomcore/lib/kernel.js",
|
45
|
-
"xulapp/chrome/content/vendor/xpcomcore/lib/loader.js",
|
46
60
|
"xulapp/chrome/content/vendor/xpcomcore/test/kernel_test.js",
|
47
61
|
"xulapp/components/bootstrap.js",
|
48
62
|
"xulapp/defaults/preferences/prefs.js",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gabrielg-xultestrunner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriel Gironda
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-09-
|
12
|
+
date: 2009-09-14 00:00:00 -07:00
|
13
13
|
default_executable: xultest
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -42,11 +42,25 @@ files:
|
|
42
42
|
- xulapp/chrome/content/vendor/scriptaculous/LICENSE
|
43
43
|
- xulapp/chrome/content/vendor/scriptaculous/test.css
|
44
44
|
- xulapp/chrome/content/vendor/scriptaculous/unittest.js
|
45
|
+
- xulapp/chrome/content/vendor/xpcomcore/LICENSE
|
45
46
|
- xulapp/chrome/content/vendor/xpcomcore/README
|
46
47
|
- xulapp/chrome/content/vendor/xpcomcore/Rakefile
|
47
|
-
- xulapp/chrome/content/vendor/xpcomcore/
|
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/Kernel.html
|
52
|
+
- xulapp/chrome/content/vendor/xpcomcore/doc/LoadError.html
|
53
|
+
- xulapp/chrome/content/vendor/xpcomcore/doc/SelfConceptError.html
|
54
|
+
- xulapp/chrome/content/vendor/xpcomcore/doc/allclasses-frame.html
|
55
|
+
- xulapp/chrome/content/vendor/xpcomcore/doc/allclasses-noframe.html
|
56
|
+
- xulapp/chrome/content/vendor/xpcomcore/doc/help-doc.html
|
57
|
+
- xulapp/chrome/content/vendor/xpcomcore/doc/index-all.html
|
58
|
+
- xulapp/chrome/content/vendor/xpcomcore/doc/index.html
|
59
|
+
- xulapp/chrome/content/vendor/xpcomcore/doc/overview-summary-kernel.js.html
|
60
|
+
- xulapp/chrome/content/vendor/xpcomcore/doc/overview-summary.html
|
61
|
+
- xulapp/chrome/content/vendor/xpcomcore/doc/overview-tree.html
|
62
|
+
- xulapp/chrome/content/vendor/xpcomcore/doc/stylesheet.css
|
48
63
|
- xulapp/chrome/content/vendor/xpcomcore/lib/kernel.js
|
49
|
-
- xulapp/chrome/content/vendor/xpcomcore/lib/loader.js
|
50
64
|
- xulapp/chrome/content/vendor/xpcomcore/test/kernel_test.js
|
51
65
|
- xulapp/components/bootstrap.js
|
52
66
|
- xulapp/defaults/preferences/prefs.js
|
@@ -1,108 +0,0 @@
|
|
1
|
-
(function(backStage) {
|
2
|
-
if (typeof(COMPONENTS) == 'undefined') {
|
3
|
-
throw("Please define a COMPONENTS array before loading XPCOMCore.");
|
4
|
-
};
|
5
|
-
|
6
|
-
var requiredMinGeckoVersion = '1.9.0'; // RequiredMinGeckoVersion - Do not remove this comment.
|
7
|
-
var xpcomCoreVersion = '0.1.0'; // XPCOMCoreVersion - Do not remove this comment.
|
8
|
-
|
9
|
-
var checkGeckoVersion = function() {
|
10
|
-
var versionComparator = Components.classes["@mozilla.org/xpcom/version-comparator;1"].getService(Components.interfaces.nsIVersionComparator);
|
11
|
-
var appInfo = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULAppInfo);
|
12
|
-
if (versionComparator.compare(appInfo.platformVersion, requiredMinGeckoVersion) < 0) {
|
13
|
-
throw("Gecko version '" + appInfo.platformVersion + "' is unable to use XPCOMCore.");
|
14
|
-
}
|
15
|
-
};
|
16
|
-
|
17
|
-
var setupXPCOMCore = function() {
|
18
|
-
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
19
|
-
|
20
|
-
var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
|
21
|
-
var resProt = ioService.getProtocolHandler("resource").QueryInterface(Components.interfaces.nsIResProtocolHandler);
|
22
|
-
// FIXME IN GENERAL - refactor all this shit code
|
23
|
-
|
24
|
-
var ourFileURIString = function() {
|
25
|
-
// FIXME - Great. All this is a dance around the fact line #289 of mozJSSubScriptLoader.cpp in mozilla 1.9.1
|
26
|
-
// thinks that the best way to delimit script files is with a fucking ASCII arrow YOU FUCKS
|
27
|
-
var thisFile = (new Error).stack.split("\n")[2].split("@")[1].split(" -> ").slice(-1)[0].split(/:[0-9]/)[0];
|
28
|
-
return thisFile;
|
29
|
-
};
|
30
|
-
|
31
|
-
var ourFileURI = function() {
|
32
|
-
return ioService.newURI(ourFileURIString(), null, null).QueryInterface(Components.interfaces.nsIURL);
|
33
|
-
};
|
34
|
-
|
35
|
-
// FIXME - hilariously non-cross-platform
|
36
|
-
var ourLibDir = function() {
|
37
|
-
var fileURI = ourFileURI();
|
38
|
-
if (fileURI.scheme == "resource") {
|
39
|
-
var thisDir = ioService.newURI(resProt.resolveURI(fileURI), null, null).QueryInterface(Components.interfaces.nsIURL).directory;
|
40
|
-
} else {
|
41
|
-
// Assumes we're a file:// URI
|
42
|
-
var thisDir = fileURI.directory;
|
43
|
-
}
|
44
|
-
return thisDir + "lib/";
|
45
|
-
};
|
46
|
-
|
47
|
-
// FIXME - hilariously non-cross-platform
|
48
|
-
var setupResourceSubstition = function() {
|
49
|
-
resProt.setSubstitution("xpcomcore", ioService.newURI("file://" + ourLibDir(), null, null));
|
50
|
-
};
|
51
|
-
|
52
|
-
setupResourceSubstition();
|
53
|
-
var libDirectory = ourLibDir();
|
54
|
-
|
55
|
-
// Private XPCOMCoreMCP method. This is the jank that finally sets up our resouce substition
|
56
|
-
// and loads Kernel methods into the given scope and .
|
57
|
-
var loadKernel = function(scope) {
|
58
|
-
|
59
|
-
// Copy properties from Kernel to the scope as getters as part of the kernel loading
|
60
|
-
// TODO - skip non-function properties
|
61
|
-
for (p in scope.Kernel) {
|
62
|
-
scope.__defineGetter__(p, function() { return scope.Kernel[p] });
|
63
|
-
}
|
64
|
-
};
|
65
|
-
|
66
|
-
// XPCOMCoreMCP is a singleton
|
67
|
-
var xpcomCoreInstance = null;
|
68
|
-
var XPCOMCoreMCP = function() {
|
69
|
-
if (xpcomCoreInstance) { return xpcomCoreInstance; }
|
70
|
-
xpcomCoreInstance = this.wrappedJSObject = this;
|
71
|
-
|
72
|
-
};
|
73
|
-
|
74
|
-
XPCOMCoreMCP.prototype = {
|
75
|
-
classDescription: "XPCOMCore Core Object",
|
76
|
-
contractID: "@conflagrationjs.org/xpcomcore/core;1",
|
77
|
-
classID: Components.ID("{f562f600-9c25-11de-8a39-0800200c9a66}"),
|
78
|
-
QueryInterface: XPCOMUtils.generateQI(),
|
79
|
-
_xpcom_categories: [{category: "JavaScript global property", entry: "XPCOMCoreMCP"}],
|
80
|
-
|
81
|
-
get version() { return new String(xpcomCoreVersion); },
|
82
|
-
get libRoot() { return new String(libDirectory); },
|
83
|
-
|
84
|
-
loadInto: function(loadScope) {
|
85
|
-
if (!loadScope || loadScope.XPCOMCoreLoaded) {
|
86
|
-
return false;
|
87
|
-
} else {
|
88
|
-
loadKernel(loadScope);
|
89
|
-
loadScope.XPCOMCoreLoaded = true;
|
90
|
-
return true;
|
91
|
-
}
|
92
|
-
}
|
93
|
-
};
|
94
|
-
|
95
|
-
backStage.XPCOMCoreMCP = XPCOMCoreMCP;
|
96
|
-
// Make sure we actually register the component or everything blows up
|
97
|
-
COMPONENTS.push(XPCOMCoreMCP);
|
98
|
-
|
99
|
-
};
|
100
|
-
|
101
|
-
try {
|
102
|
-
checkGeckoVersion();
|
103
|
-
setupXPCOMCore();
|
104
|
-
} catch (e) {
|
105
|
-
dump("Couldn't register XPCOMCore: " + e + "\n");
|
106
|
-
}
|
107
|
-
|
108
|
-
})(this);
|
@@ -1,16 +0,0 @@
|
|
1
|
-
// FIXME - If we're still backstage, load differently. Need a better way to check for being backstage.
|
2
|
-
// FIXME - wow, this is all so seedy.
|
3
|
-
var _coreObj = null;
|
4
|
-
if (this.toString() == "[object BackstagePass]" && typeof(XPCOMCore) == 'undefined') {
|
5
|
-
_coreObj = new this.XPCOMCoreMCP();
|
6
|
-
} else if (this.XPCOMCoreMCP && typeof(XPCOMCore) == 'undefined') {
|
7
|
-
var privileges = 'UniversalXPConnect UniversalBrowserRead UniversalBrowserWrite ' +
|
8
|
-
'UniversalPreferencesRead UniversalPreferencesWrite CapabilityPreferencesAccess UniversalFileRead';
|
9
|
-
netscape.security.PrivilegeManager.enablePrivilege(privileges);
|
10
|
-
_coreObj = this.XPCOMCoreMCP.wrappedJSObject;
|
11
|
-
};
|
12
|
-
|
13
|
-
const XPCOMCore = _coreObj;
|
14
|
-
|
15
|
-
var loader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader);
|
16
|
-
loader.loadSubScript("resource://xpcomcore/kernel.js");
|