From 43502637288f9f60019be2759e5049d0fe9377fe Mon Sep 17 00:00:00 2001 From: hackademix Date: Tue, 2 Oct 2018 15:50:23 +0200 Subject: Jasmine-based automated tests suite. --- main_background.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'main_background.js') 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); + } + } } -- cgit v1.2.3