summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/Makefile11
-rw-r--r--common/content/bookmarks.js2
-rw-r--r--common/content/statusline.js2
-rw-r--r--common/locale/en-US/gui.xml5
-rw-r--r--common/modules/base.jsm4
-rw-r--r--common/modules/config.jsm3
-rw-r--r--common/modules/highlight.jsm8
-rw-r--r--common/modules/io.jsm2
-rw-r--r--common/modules/util.jsm2
9 files changed, 27 insertions, 12 deletions
diff --git a/common/Makefile b/common/Makefile
index 64441a35..f2460f4e 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -9,6 +9,9 @@ GOOGLE = https://$(GOOGLE_PROJ).googlecode.com/files
VERSION ?= $(shell sed -n 's/.*em:version\(>\|="\)\(.*\)["<].*/\2/p' $(TOP)/install.rdf | sed 1q)
UUID := $(shell sed -n 's/.*em:id\(>\|="\)\(.*\)["<].*/\2/p' $(TOP)/install.rdf | sed 1q)
MANGLE := $(shell date '+%s' | awk '{ printf "%x", $$1 }')
+MOZMILL = mozmill
+HOSTAPP_PATH = $(shell which $(HOSTAPP))
+TEST_DIR = $(BASE)/tests/functional
LOCALEDIR = locale
DOC_FILES = $(wildcard $(LOCALEDIR)/*/*.xml)
@@ -48,7 +51,7 @@ CURL ?= curl
#### rules
-TARGETS = all help info jar xpi install clean distclean install installxpi $(CHROME) $(JAR)
+TARGETS = all help info jar xpi install clean distclean install installxpi test $(CHROME) $(JAR)
$(TARGETS:%=\%.%):
echo MAKE $* $(@:$*.%=%)
$(MAKE) -C $* $(@:$*.%=%)
@@ -71,6 +74,7 @@ help:
@echo " make dist - uploads to Google Code (this is not for you)"
@echo " make clean - clean up"
@echo " make distclean - clean up more"
+ @echo " make test - run functional tests"
@echo
@echo "running some commands with V=1 will show more build details"
@@ -158,6 +162,11 @@ distclean:
@echo "More $(NAME) cleanup..."
rm -rf $(BUILD_DIR)
+# TODO: generalize log path
+test: $(XPI)
+ @echo "Running functional tests..."
+ $(MOZMILL) --show-all -l /tmp/dactyl-test.log -b $(HOSTAPP_PATH) --addons $(XPI) -t $(TEST_DIR)
+
#### xpi
$(XPI): $(CHROME)
diff --git a/common/content/bookmarks.js b/common/content/bookmarks.js
index 7fe61ab0..8b741d9a 100644
--- a/common/content/bookmarks.js
+++ b/common/content/bookmarks.js
@@ -105,7 +105,7 @@ var Bookmarks = Module("bookmarks", {
*/
addSearchKeyword: function (elem) {
if (elem instanceof HTMLFormElement || elem.form)
- var [url, post,, charset] = util.parseForm(elem);
+ var [url, post, charset] = util.parseForm(elem);
else
var [url, post, charset] = [elem.href || elem.src, null, elem.ownerDocument.characterSet];
diff --git a/common/content/statusline.js b/common/content/statusline.js
index ccc3b454..f76eac28 100644
--- a/common/content/statusline.js
+++ b/common/content/statusline.js
@@ -12,7 +12,7 @@ var StatusLine = Module("statusline", {
init: function () {
this._statusLine = document.getElementById("status-bar");
this.statusBar = document.getElementById("addon-bar") || this._statusLine;
- this.statusBar.collapsed = true; // it is later restored unless the user sets laststatus=0
+ this.statusBar.collapsed = true;
this.baseGroup = this.statusBar == this._statusLine ? "StatusLine " : "";
if (this.statusBar.localName == "toolbar") {
diff --git a/common/locale/en-US/gui.xml b/common/locale/en-US/gui.xml
index e7054858..ed6e13e9 100644
--- a/common/locale/en-US/gui.xml
+++ b/common/locale/en-US/gui.xml
@@ -211,8 +211,9 @@
<h2 tag="status-line status-bar">Status line</h2>
<p>
- The status line appears at the bottom of each window. The <o>laststatus</o>
- option can be used to specify when the status line appears.
+ The status line appears at the bottom of each window. You can use
+ <o>guioptions</o> to specify if and when the status line appears, as well
+ as its relation to the command line and messages.
</p>
<p>
diff --git a/common/modules/base.jsm b/common/modules/base.jsm
index 2ffc9586..1a5e5b7a 100644
--- a/common/modules/base.jsm
+++ b/common/modules/base.jsm
@@ -169,8 +169,12 @@ function endModule() {
function require(obj, name, from) {
try {
+ if (arguments.length === 1)
+ [obj, name] = [{}, obj];
+
defineModule.loadLog.push((from || "require") + ": loading " + name + " into " + obj.NAME);
JSMLoader.load(name + ".jsm", obj);
+ return obj;
}
catch (e) {
defineModule.dump("loading " + String.quote(name + ".jsm") + "\n");
diff --git a/common/modules/config.jsm b/common/modules/config.jsm
index ca65a065..0e818d3f 100644
--- a/common/modules/config.jsm
+++ b/common/modules/config.jsm
@@ -8,6 +8,7 @@
try {
+let global = this;
Components.utils.import("resource://dactyl/bootstrap.jsm");
defineModule("config", {
exports: ["ConfigBase", "Config", "config"],
@@ -54,7 +55,7 @@ var ConfigBase = Class("ConfigBase", {
addon: Class.memoize(function () {
let addon = services.fuel.storage.get("dactyl.bootstrap", {}).addon;
if (!addon)
- addon = AddonManager.getAddonByID(this.addonID);
+ addon = require("addons").AddonManager.getAddonByID(this.addonID);
return addon;
}),
diff --git a/common/modules/highlight.jsm b/common/modules/highlight.jsm
index ac9496f0..9065a44f 100644
--- a/common/modules/highlight.jsm
+++ b/common/modules/highlight.jsm
@@ -145,10 +145,10 @@ var Highlights = Module("Highlight", {
let highlight = this.highlight[key] || this._create(false, [key]);
- let extends = extend || highlight.extend;
+ let bases = extend || highlight.extend;
if (append) {
newStyle = Styles.append(highlight.value || "", newStyle);
- extends = highlight.extends.concat(extends);
+ bases = highlight.extends.concat(bases);
}
if (/^\s*$/.test(newStyle))
@@ -161,11 +161,11 @@ var Highlights = Module("Highlight", {
return null;
}
newStyle = highlight.defaultValue;
- extends = highlight.defaultExtends;
+ bases = highlight.defaultExtends;
}
highlight.set("value", newStyle || "");
- highlight.extends = array.uniq(extends, true);
+ highlight.extends = array.uniq(bases, true);
if (force)
highlight.style.enabled = true;
this.highlight[highlight.class] = highlight;
diff --git a/common/modules/io.jsm b/common/modules/io.jsm
index 0aaa3c9e..a60c4ea5 100644
--- a/common/modules/io.jsm
+++ b/common/modules/io.jsm
@@ -836,7 +836,7 @@ unlet s:cpo_save
let result = io.system(arg);
if (result.returnValue != 0)
- result.output += "\nshell returned " + res;
+ result.output += "\nshell returned " + result.returnValue;
modules.commandline.command = "!" + arg;
modules.commandline.commandOutput(<span highlight="CmdOutput">{result.output}</span>);
diff --git a/common/modules/util.jsm b/common/modules/util.jsm
index 3f521db7..f66fac87 100644
--- a/common/modules/util.jsm
+++ b/common/modules/util.jsm
@@ -1179,7 +1179,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
}
}
if (post)
- return [url, elems.join('&'), elems, charset];
+ return [url, elems.join('&'), charset, elems];
return [url + "?" + elems.join('&'), null, charset];
},