diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /toolkit/mozapps/extensions/test/mochitest/test_default_theme.html | |
parent | Initial commit. (diff) | |
download | thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/mozapps/extensions/test/mochitest/test_default_theme.html')
-rw-r--r-- | toolkit/mozapps/extensions/test/mochitest/test_default_theme.html | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/toolkit/mozapps/extensions/test/mochitest/test_default_theme.html b/toolkit/mozapps/extensions/test/mochitest/test_default_theme.html new file mode 100644 index 0000000000..3896b22032 --- /dev/null +++ b/toolkit/mozapps/extensions/test/mochitest/test_default_theme.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <title>Test for correct installation of default theme</title> + <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> + <script src="chrome://mochikit/content/tests/SimpleTest/ExtensionTestUtils.js"></script> + <link rel="stylesheet" href="chrome://mochikit/contents/tests/SimpleTest/test.css"> +</head> +<body> + +<script> +"use strict"; + +const {AddonManager} = ChromeUtils.import("resource://gre/modules/AddonManager.jsm"); +const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); + +add_task(async function() { + let addon = await AddonManager.getAddonByID("default-theme@mozilla.org"); + + // Dev edition uses a different default theme on desktop. + const expectActive = (!AppConstants.MOZ_DEV_EDITION || + AppConstants.MOZ_BUILD_APP !== "browser"); + + ok(addon != null, "Default theme exists"); + is(addon.type, "theme", "Add-on type is correct"); + is(addon.isActive, expectActive, "Add-on is active?"); + is(addon.hidden, false, "Add-on is not hidden"); +}); + +</script> +</body> +</html> |