summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/extensions/test/browser/browser_globalinformations.js
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2018-02-11 07:03:16 -0500
committerMatt A. Tobin <email@mattatobin.com>2018-02-11 07:03:16 -0500
commit203eb0f61a09372310a2a8fb57e169cb3f47800b (patch)
tree8490329d3dae4de3c7ffd127bce1f65fdc009abd /toolkit/mozapps/extensions/test/browser/browser_globalinformations.js
parente45706ca3acbb6530419433212becc61d5953a2d (diff)
parent8f6d3dab81c7f8f97ef197e26ab9439b09735b8f (diff)
downloadUXP-ed96a7148c31f5448b81800287c09ce7169223cc.tar
UXP-ed96a7148c31f5448b81800287c09ce7169223cc.tar.gz
UXP-ed96a7148c31f5448b81800287c09ce7169223cc.tar.lz
UXP-ed96a7148c31f5448b81800287c09ce7169223cc.tar.xz
UXP-ed96a7148c31f5448b81800287c09ce7169223cc.zip
Merge branch 'ext-work'FF_Checkpoint_1
Diffstat (limited to 'toolkit/mozapps/extensions/test/browser/browser_globalinformations.js')
-rw-r--r--toolkit/mozapps/extensions/test/browser/browser_globalinformations.js55
1 files changed, 55 insertions, 0 deletions
diff --git a/toolkit/mozapps/extensions/test/browser/browser_globalinformations.js b/toolkit/mozapps/extensions/test/browser/browser_globalinformations.js
new file mode 100644
index 000000000..33890d8f5
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/browser/browser_globalinformations.js
@@ -0,0 +1,55 @@
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+// Bug 656269 - Add link to Mozilla plugin check from Add-ons Manager
+
+const MAIN_URL = "https://example.com/" + RELATIVE_DIR + "discovery.html";
+const PREF_PLUGINCHECKURL = "plugins.update.url";
+
+function test() {
+ waitForExplicitFinish();
+
+ Services.prefs.setCharPref(PREF_PLUGINCHECKURL, MAIN_URL);
+ registerCleanupFunction(function() {
+ Services.prefs.clearUserPref(PREF_PLUGINCHECKURL);
+ });
+
+ run_next_test();
+}
+
+function end_test() {
+ finish();
+}
+
+add_test(function() {
+ open_manager("addons://list/extension", function(aManager) {
+ info("Testing plugin check information");
+ var button = aManager.document.querySelector("#list-view button.global-info-plugincheck");
+ is_element_hidden(button, "Plugin Check message button should be hidden");
+
+ info("Changing view to plugins")
+ EventUtils.synthesizeMouseAtCenter(aManager.document.getElementById("category-plugin"), { }, aManager);
+
+ wait_for_view_load(aManager, function(aManager) {
+ var button = aManager.document.querySelector("#list-view button.global-info-plugincheck");
+ is_element_visible(button, "Plugin Check message button should be visible");
+
+ info("Clicking 'Plugin Check' button");
+ EventUtils.synthesizeMouseAtCenter(button, { }, aManager);
+ gBrowser.addEventListener("load", function(event) {
+ if (!(event.target instanceof Document) ||
+ event.target.location.href == "about:blank")
+ return;
+ gBrowser.removeEventListener("load", arguments.callee, true);
+
+ is(gBrowser.currentURI.spec, Services.urlFormatter.formatURLPref("plugins.update.url"), "Plugin Check URL should match");
+
+ gBrowser.removeCurrentTab();
+ close_manager(aManager, function() {
+ run_next_test();
+ });
+ }, true);
+ });
+ });
+}); \ No newline at end of file