зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset b07431a83e6b (bug 1717871) for causing newtab failures in activity-stream:ASRTargeting docs
CLOSED TREE
This commit is contained in:
Родитель
05ad1c9db2
Коммит
f9933c1155
|
@ -630,10 +630,6 @@ const TargetingGetters = {
|
|||
get isMajorUpgrade() {
|
||||
return BrowserHandler.majorUpgrade;
|
||||
},
|
||||
|
||||
get hasActiveEnterprisePolicies() {
|
||||
return Services.policies.status === Services.policies.ACTIVE;
|
||||
},
|
||||
};
|
||||
|
||||
this.ASRouterTargeting = {
|
||||
|
|
|
@ -13,9 +13,6 @@ const { ASRouterTargeting } = ChromeUtils.import(
|
|||
const { MacAttribution } = ChromeUtils.import(
|
||||
"resource:///modules/MacAttribution.jsm"
|
||||
);
|
||||
const { EnterprisePolicyTesting } = ChromeUtils.import(
|
||||
"resource://testing-common/EnterprisePolicyTesting.jsm"
|
||||
);
|
||||
|
||||
add_task(async function check_attribution_data() {
|
||||
// Some setup to fake the correct attribution data
|
||||
|
@ -65,36 +62,3 @@ add_task(async function check_attribution_data() {
|
|||
);
|
||||
AttributionCode._clearCache();
|
||||
});
|
||||
|
||||
add_task(async function check_enterprise_targeting() {
|
||||
const messages = [
|
||||
{
|
||||
id: "foo1",
|
||||
targeting: "hasActiveEnterprisePolicies",
|
||||
},
|
||||
{
|
||||
id: "foo2",
|
||||
targeting: "!hasActiveEnterprisePolicies",
|
||||
},
|
||||
];
|
||||
|
||||
equal(
|
||||
await ASRouterTargeting.findMatchingMessage({ messages }),
|
||||
messages[1],
|
||||
"should select the message for policies turned off"
|
||||
);
|
||||
|
||||
await EnterprisePolicyTesting.setupPolicyEngineWithJson({
|
||||
policies: {
|
||||
DisableFirefoxStudies: {
|
||||
Value: true,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
equal(
|
||||
await ASRouterTargeting.findMatchingMessage({ messages }),
|
||||
messages[0],
|
||||
"should select the message for policies turned on"
|
||||
);
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче