Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* Any copyright is dedicated to the Public Domain. |
michael@0 | 2 | * http://creativecommons.org/publicdomain/zero/1.0/ |
michael@0 | 3 | */ |
michael@0 | 4 | |
michael@0 | 5 | // Test that all bundled add-ons are compatible. |
michael@0 | 6 | |
michael@0 | 7 | function test() { |
michael@0 | 8 | waitForExplicitFinish(); |
michael@0 | 9 | |
michael@0 | 10 | Services.prefs.setBoolPref(PREF_STRICT_COMPAT, true); |
michael@0 | 11 | ok(AddonManager.strictCompatibility, "Strict compatibility should be enabled"); |
michael@0 | 12 | |
michael@0 | 13 | AddonManager.getAllAddons(function gAACallback(aAddons) { |
michael@0 | 14 | // Sort add-ons (by type and name) to improve output. |
michael@0 | 15 | aAddons.sort(function compareTypeName(a, b) { |
michael@0 | 16 | return a.type.localeCompare(b.type) || a.name.localeCompare(b.name); |
michael@0 | 17 | }); |
michael@0 | 18 | |
michael@0 | 19 | let allCompatible = true; |
michael@0 | 20 | for (let a of aAddons) { |
michael@0 | 21 | // Ignore plugins. |
michael@0 | 22 | if (a.type == "plugin") |
michael@0 | 23 | continue; |
michael@0 | 24 | |
michael@0 | 25 | ok(a.isCompatible, a.type + " " + a.name + " " + a.version + " should be compatible"); |
michael@0 | 26 | allCompatible = allCompatible && a.isCompatible; |
michael@0 | 27 | } |
michael@0 | 28 | // Add a reminder. |
michael@0 | 29 | if (!allCompatible) |
michael@0 | 30 | ok(false, "As this test failed, test browser_bug557956.js should have failed, too."); |
michael@0 | 31 | |
michael@0 | 32 | finish(); |
michael@0 | 33 | }); |
michael@0 | 34 | } |