add tests - WIP

This commit is contained in:
Alex Adam 2019-04-15 20:28:10 +03:00
parent 612a62ecac
commit 467962e565
8 changed files with 373 additions and 0 deletions

View file

@ -1,3 +1,34 @@
///////////////////
///////////////////
///////////////////
///////////////////
/// Only for testing
chrome.runtime.onInstalled.addListener(details => {
if (navigator.userAgent === 'PuppeteerTestingAgent') {
let TEST_TIMER = null
chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
if (TEST_TIMER) {
clearTimeout(TEST_TIMER)
}
TEST_TIMER = setTimeout(()=> {
executeCommand({type: 'save-page'})
}, 2000)
});
}
});
///////////////////
///////////////////
///////////////////
///////////////////
var isBusy = false;
var defaultStyles = [