/usr/share/xul-ext/ubiquity/tests/systemtests.js is in xul-ext-ubiquity 0.6.4~pre20140729-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | EXPORTED_SYMBOLS = ['start'];
let Cc = Components.classes;
let Ci = Components.interfaces;
let events = {};
Components.utils.import("resource://jsbridge/modules/events.js", events);
Components.utils.import("resource://ubiquity/modules/utils.js");
Components.utils.import("resource://ubiquity/tests/framework.js");
let INTERVAL_MS = 100;
function runTests() {
let tests = {};
Components.utils.import("resource://ubiquity/tests/test_all.js", tests);
var suite = new TestSuite(DumpTestResponder, tests);
var success = true;
try {
suite.start();
} catch (e) {
dump(e + '\n');
success = false;
}
events.fireEvent('ubiquity:success', success);
}
function scheduleCheckForUbiquity() {
function doCheck() {
var win = Utils.currentChromeWindow;
if (win.gUbiquity) {
dump('Ubiquity found.\n');
runTests();
} else {
dump('Waiting ' + INTERVAL_MS + ' ms...\n');
scheduleCheckForUbiquity();
}
}
Utils.setTimeout(doCheck, INTERVAL_MS);
}
function start() {
scheduleCheckForUbiquity();
}
|