aboutsummaryrefslogtreecommitdiff
path: root/main_background.js
diff options
context:
space:
mode:
authorhackademix <giorgio@maone.net>2018-10-02 15:50:23 +0200
committerhackademix <giorgio@maone.net>2018-10-02 23:00:21 +0200
commit43502637288f9f60019be2759e5049d0fe9377fe (patch)
treec654cea77ca8abaa17df3adc5d1ce0114ee4544a /main_background.js
parent37774e035b5ebf53e2fde92b11e4f3419b53909c (diff)
Jasmine-based automated tests suite.
Diffstat (limited to 'main_background.js')
-rw-r--r--main_background.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/main_background.js b/main_background.js
index cdc987e..5c2e8df 100644
--- a/main_background.js
+++ b/main_background.js
@@ -1175,6 +1175,21 @@ async function init_addon() {
ResponseProcessor.install(ResponseHandler);
legacy_license_lib.init();
+
+
+ let Test = require("./common/Test");
+ if (Test.getURL()) {
+ // export testable functions to the global scope
+ this.LibreJS = {
+ editHtml,
+ handle_script,
+ ExternalLicenses,
+ };
+ // create or focus the autotest tab if it's a debugging session
+ if ((await browser.management.getSelf()).installType === "development") {
+ Test.getTab(true);
+ }
+ }
}