diff options
author | Maximilian Krambach <[email protected]> | 2018-04-26 15:13:34 +0000 |
---|---|---|
committer | Maximilian Krambach <[email protected]> | 2018-04-26 15:13:34 +0000 |
commit | 1f7b19512cfa7e1b153b99d6a2b40bad82a5496e (patch) | |
tree | 73a0392bd738eb5023b904e3ab7b7b4e0a820768 /lang/js/DemoExtension | |
parent | js: First testing and improvements (diff) | |
download | gpgme-1f7b19512cfa7e1b153b99d6a2b40bad82a5496e.tar.gz gpgme-1f7b19512cfa7e1b153b99d6a2b40bad82a5496e.zip |
js: created TestExtension and smaller fixes
--
* Extensions:
- Moved testapplication to Demoextension
- Created BrowserTestExtension.
Includes mocha and chai. For running tests that cannot be run
outside a WebExtension
Both Extensions can be found zipped in build/extensions after
running build_extensions.sh
* Code changes:
- src/Config: Place for the configuration
- small fixes raised during testing in Keyring.js, Message.js,
- src/gpgmejs_openpgpjs.js don't offer direct GpgME object to the
outside, as it only causes confusion
- index.js init() now checks the config for validity
* Tests:
- Reordered tests in test/.
- Input values are now in a separate file which may be of use for
bulk testing
* moved the build directory from dist to build
Diffstat (limited to '')
-rw-r--r-- | lang/js/DemoExtension/entry.js (renamed from lang/js/test_index.js) | 2 | ||||
-rw-r--r-- | lang/js/DemoExtension/maindemo.js (renamed from lang/js/testapplication.js) | 0 | ||||
-rw-r--r-- | lang/js/DemoExtension/mainui.html (renamed from lang/js/ui2.html) | 4 | ||||
-rw-r--r-- | lang/js/DemoExtension/manifest.json (renamed from lang/js/manifest.json) | 6 | ||||
-rw-r--r-- | lang/js/DemoExtension/popup.html (renamed from lang/js/testapplication_index.html) | 0 | ||||
-rw-r--r-- | lang/js/DemoExtension/testicon.png | bin | 0 -> 16192 bytes | |||
-rw-r--r-- | lang/js/DemoExtension/ui.css (renamed from lang/js/ui.css) | 0 |
7 files changed, 6 insertions, 6 deletions
diff --git a/lang/js/test_index.js b/lang/js/DemoExtension/entry.js index 9119d271..7e5e1ffe 100644 --- a/lang/js/test_index.js +++ b/lang/js/DemoExtension/entry.js @@ -20,6 +20,6 @@ */ document.addEventListener('DOMContentLoaded', function() { chrome.tabs.create({ - url: './ui2.html' + url: './uimainui.html' }); }); diff --git a/lang/js/testapplication.js b/lang/js/DemoExtension/maindemo.js index b2cb4c23..b2cb4c23 100644 --- a/lang/js/testapplication.js +++ b/lang/js/DemoExtension/maindemo.js diff --git a/lang/js/ui2.html b/lang/js/DemoExtension/mainui.html index 8d0abd97..d85e7a46 100644 --- a/lang/js/ui2.html +++ b/lang/js/DemoExtension/mainui.html @@ -3,8 +3,8 @@ <head> <meta charset="utf-8"> <link rel="stylesheet" href="ui.css"/> - <script src="dist/gpgmejs.bundle.js"></script> - <script src="testapplication.js"></script> + <script src="gpgmejs.bundle.js"></script> + <script src="maindemo.js"></script> </head> <body> <ul> diff --git a/lang/js/manifest.json b/lang/js/DemoExtension/manifest.json index e5e17aa5..9e057b35 100644 --- a/lang/js/manifest.json +++ b/lang/js/DemoExtension/manifest.json @@ -2,13 +2,13 @@ "manifest_version": 2, "name": "gpgme-json with native Messaging", - "description": "This should be able to encrypt a text using gpgme-json", + "description": "A simple demo application", "version": "0.1", - "content_security_policy": "default-src 'self' 'unsafe-eval' filesystem:", + "content_security_policy": "default-src 'self' filesystem:", "browser_action": { "default_icon": "testicon.png", "default_title": "gpgme.js", - "default_popup": "testapplication_index.html" + "default_popup": "popup.html" }, "permissions": ["nativeMessaging", "activeTab"] } diff --git a/lang/js/testapplication_index.html b/lang/js/DemoExtension/popup.html index 866b1135..866b1135 100644 --- a/lang/js/testapplication_index.html +++ b/lang/js/DemoExtension/popup.html diff --git a/lang/js/DemoExtension/testicon.png b/lang/js/DemoExtension/testicon.png Binary files differnew file mode 100644 index 00000000..12c3f5df --- /dev/null +++ b/lang/js/DemoExtension/testicon.png diff --git a/lang/js/ui.css b/lang/js/DemoExtension/ui.css index 9c88698b..9c88698b 100644 --- a/lang/js/ui.css +++ b/lang/js/DemoExtension/ui.css |