aboutsummaryrefslogtreecommitdiff
path: root/main_background.js
diff options
context:
space:
mode:
authorRuben Rodriguez <ruben@gnu.org>2018-10-03 22:23:57 +0000
committerRuben Rodriguez <ruben@gnu.org>2018-10-03 22:23:57 +0000
commitdcba303f8d172f6748225d2e00f28a44ac13c453 (patch)
treed03607192a35e21a65fe1972f57bc273c53a25bb /main_background.js
parent5461a48cbeac01d5f8bc31a10d11ff72a295c7d9 (diff)
parent12bfe0f9fdad5bfea680d897c81319684ee82180 (diff)
Merge #25 `Adding automated test 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);
+ }
+ }
}