Created
January 5, 2018 18:51
-
-
Save rhelmer/7e8dd8508a1b041c314b24cd363d92e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/browser/extensions/moz.build b/browser/extensions/moz.build | |
--- a/browser/extensions/moz.build | |
+++ b/browser/extensions/moz.build | |
@@ -15,6 +15,7 @@ DIRS += [ | |
'pocket', | |
'screenshots', | |
'shield-recipe-client', | |
+ 'tracking-protection-study', | |
'webcompat', | |
] | |
diff --git a/browser/extensions/tracking-protection-study/jar.mn b/browser/extensions/tracking-protection-study/jar.mn | |
new file mode 100644 | |
--- /dev/null | |
+++ b/browser/extensions/tracking-protection-study/jar.mn | |
@@ -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/. | |
+ | |
+[features/tracking-protection-study@mozilla.org] chrome.jar: | |
+% resource tracking-protection-study %res/ | |
+ res/ (*.jsm) | |
+ res/ (*.css) | |
+ res/ (*.json) | |
diff --git a/browser/extensions/tracking-protection-study/moz.build b/browser/extensions/tracking-protection-study/moz.build | |
new file mode 100644 | |
--- /dev/null | |
+++ b/browser/extensions/tracking-protection-study/moz.build | |
@@ -0,0 +1,19 @@ | |
+# -*- 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/. | |
+ | |
+FINAL_TARGET_FILES.features['tracking-protection-study@mozilla.org'] += [ | |
+ 'bootstrap.js', | |
+] | |
+ | |
+FINAL_TARGET_FILES.features['tracking-protection-study@mozilla.org'] += [ | |
+ 'install.rdf' | |
+] | |
+ | |
+BROWSER_CHROME_MANIFESTS += [ | |
+ 'test/browser/browser.ini' | |
+] | |
+ | |
+JAR_MANIFESTS += ['jar.mn'] | |
diff --git a/browser/extensions/tracking-protection-study/test/browser/.eslintrc.yml b/browser/extensions/tracking-protection-study/test/browser/.eslintrc.yml | |
new file mode 100644 | |
--- /dev/null | |
+++ b/browser/extensions/tracking-protection-study/test/browser/.eslintrc.yml | |
@@ -0,0 +1,10 @@ | |
+env: | |
+ node: true | |
+ | |
+# TODO: re-enable | |
+#extends: | |
+# - plugin:mozilla/browser-test | |
+ | |
+rules: | |
+ no-unused-vars: off | |
+ no-undef: off | |
diff --git a/browser/extensions/tracking-protection-study/test/browser/browser.ini b/browser/extensions/tracking-protection-study/test/browser/browser.ini | |
new file mode 100644 | |
--- /dev/null | |
+++ b/browser/extensions/tracking-protection-study/test/browser/browser.ini | |
@@ -0,0 +1,5 @@ | |
+[DEFAULT] | |
+support-files = | |
+ head.js | |
+ | |
+[browser_tracking_protection_study_ui_check.js] | |
diff --git a/browser/extensions/tracking-protection-study/test/browser/browser_tracking_protection_study_ui_check.js b/browser/extensions/tracking-protection-study/test/browser/browser_tracking_protection_study_ui_check.js | |
new file mode 100644 | |
--- /dev/null | |
+++ b/browser/extensions/tracking-protection-study/test/browser/browser_tracking_protection_study_ui_check.js | |
@@ -0,0 +1,18 @@ | |
+/* eslint disable */ | |
+"use strict"; | |
+ | |
+const BUTTON_ID = "tracking-protection-study-button"; | |
+ | |
+function checkElements(expectPresent, l) { | |
+ for (let id of l) { | |
+ is(!!document.getElementById(id), expectPresent, "element " + id + (expectPresent ? " is" : " is not") + " present"); | |
+ } | |
+} | |
+ | |
+add_task(async function() { | |
+ await BrowserTestUtils.waitForCondition( | |
+ () => document.getElementById(BUTTON_ID), | |
+ "Tracking Protection Study button should be present", 100, 100); | |
+ | |
+ checkElements(true, [BUTTON_ID]); | |
+}); | |
diff --git a/browser/extensions/tracking-protection-study/test/browser/head.js b/browser/extensions/tracking-protection-study/test/browser/head.js | |
new file mode 100644 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment