summaryrefslogtreecommitdiffstats
path: root/browser/extensions/webcompat
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /browser/extensions/webcompat
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'browser/extensions/webcompat')
-rw-r--r--browser/extensions/webcompat/bootstrap.js9
-rw-r--r--browser/extensions/webcompat/install.rdf.in32
-rw-r--r--browser/extensions/webcompat/moz.build18
-rw-r--r--browser/extensions/webcompat/test/browser/.eslintrc.js7
-rw-r--r--browser/extensions/webcompat/test/browser/browser.ini3
-rw-r--r--browser/extensions/webcompat/test/browser/browser_check_installed.js13
6 files changed, 82 insertions, 0 deletions
diff --git a/browser/extensions/webcompat/bootstrap.js b/browser/extensions/webcompat/bootstrap.js
new file mode 100644
index 000000000..19141a0f5
--- /dev/null
+++ b/browser/extensions/webcompat/bootstrap.js
@@ -0,0 +1,9 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+function startup() {}
+function shutdown() {}
+function install() {}
+function uninstall() {}
diff --git a/browser/extensions/webcompat/install.rdf.in b/browser/extensions/webcompat/install.rdf.in
new file mode 100644
index 000000000..2c4406f25
--- /dev/null
+++ b/browser/extensions/webcompat/install.rdf.in
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+
+#filter substitution
+
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+
+ <Description about="urn:mozilla:install-manifest">
+ <em:id>webcompat@mozilla.org</em:id>
+ <em:version>1.0</em:version>
+ <em:type>2</em:type>
+ <em:bootstrap>true</em:bootstrap>
+ <em:multiprocessCompatible>true</em:multiprocessCompatible>
+
+ <!-- Target Application this extension can install into,
+ with minimum and maximum supported versions. -->
+ <em:targetApplication>
+ <Description>
+ <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+ <em:minVersion>@MOZ_APP_VERSION@</em:minVersion>
+ <em:maxVersion>@MOZ_APP_MAXVERSION@</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+
+ <!-- Front End MetaData -->
+ <em:name>Web Compat</em:name>
+ <em:description>Urgent post-release fixes for web compatibility.</em:description>
+ </Description>
+</RDF>
diff --git a/browser/extensions/webcompat/moz.build b/browser/extensions/webcompat/moz.build
new file mode 100644
index 000000000..2423511b4
--- /dev/null
+++ b/browser/extensions/webcompat/moz.build
@@ -0,0 +1,18 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+DEFINES['MOZ_APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
+DEFINES['MOZ_APP_MAXVERSION'] = CONFIG['MOZ_APP_MAXVERSION']
+
+FINAL_TARGET_FILES.features['webcompat@mozilla.org'] += [
+ 'bootstrap.js'
+]
+
+FINAL_TARGET_PP_FILES.features['webcompat@mozilla.org'] += [
+ 'install.rdf.in'
+]
+
+BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini']
diff --git a/browser/extensions/webcompat/test/browser/.eslintrc.js b/browser/extensions/webcompat/test/browser/.eslintrc.js
new file mode 100644
index 000000000..7c8021192
--- /dev/null
+++ b/browser/extensions/webcompat/test/browser/.eslintrc.js
@@ -0,0 +1,7 @@
+"use strict";
+
+module.exports = {
+ "extends": [
+ "../../../../../testing/mochitest/browser.eslintrc.js"
+ ]
+};
diff --git a/browser/extensions/webcompat/test/browser/browser.ini b/browser/extensions/webcompat/test/browser/browser.ini
new file mode 100644
index 000000000..500224636
--- /dev/null
+++ b/browser/extensions/webcompat/test/browser/browser.ini
@@ -0,0 +1,3 @@
+[DEFAULT]
+
+[browser_check_installed.js]
diff --git a/browser/extensions/webcompat/test/browser/browser_check_installed.js b/browser/extensions/webcompat/test/browser/browser_check_installed.js
new file mode 100644
index 000000000..b77458054
--- /dev/null
+++ b/browser/extensions/webcompat/test/browser/browser_check_installed.js
@@ -0,0 +1,13 @@
+"use strict";
+
+add_task(function* test_enabled() {
+ let addon = yield new Promise(
+ resolve => AddonManager.getAddonByID("webcompat@mozilla.org", resolve)
+ );
+ isnot(addon, null, "Check addon exists");
+ is(addon.version, "1.0", "Check version");
+ is(addon.name, "Web Compat", "Check name");
+ ok(addon.isCompatible, "Check application compatibility");
+ ok(!addon.appDisabled, "Check not app disabled");
+ ok(addon.isActive, "Check addon is active");
+});