Bug 1868838 - Move messaging schemas into browser/components/asrouter. r=pdahiya,barret
Differential Revision: https://phabricator.services.mozilla.com/D198955
This commit is contained in:
@@ -11,7 +11,7 @@ import { SubmenuButton } from "./SubmenuButton";
|
||||
import {
|
||||
BASE_PARAMS,
|
||||
addUtmParams,
|
||||
} from "../../../newtab/content-src/asrouter/templates/FirstRun/addUtmParams";
|
||||
} from "asrouter/content-src/templates/FirstRun/addUtmParams";
|
||||
|
||||
// Amount of milliseconds for all transitions to complete (including delays).
|
||||
const TRANSITION_OUT_TIME = 1000;
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
DEFAULT_RTAMO_CONTENT,
|
||||
} from "../lib/aboutwelcome-utils";
|
||||
import { MultiStageProtonScreen } from "./MultiStageProtonScreen";
|
||||
import { BASE_PARAMS } from "../../../newtab/content-src/asrouter/templates/FirstRun/addUtmParams";
|
||||
import { BASE_PARAMS } from "asrouter/content-src/templates/FirstRun/addUtmParams";
|
||||
|
||||
export class ReturnToAMO extends React.PureComponent {
|
||||
constructor(props) {
|
||||
|
||||
@@ -176,7 +176,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _MultiStageProtonScreen__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
|
||||
/* harmony import */ var _LanguageSwitcher__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(10);
|
||||
/* harmony import */ var _SubmenuButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(15);
|
||||
/* harmony import */ var _newtab_content_src_asrouter_templates_FirstRun_addUtmParams__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(19);
|
||||
/* harmony import */ var asrouter_content_src_templates_FirstRun_addUtmParams__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(19);
|
||||
/* 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/. */
|
||||
@@ -473,7 +473,7 @@ class WelcomeScreen extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCo
|
||||
} = action;
|
||||
if (type === "SHOW_FIREFOX_ACCOUNTS") {
|
||||
let params = {
|
||||
..._newtab_content_src_asrouter_templates_FirstRun_addUtmParams__WEBPACK_IMPORTED_MODULE_6__.BASE_PARAMS,
|
||||
...asrouter_content_src_templates_FirstRun_addUtmParams__WEBPACK_IMPORTED_MODULE_6__.BASE_PARAMS,
|
||||
utm_term: `${UTMTerm}-screen`
|
||||
};
|
||||
if (action.addFlowParams && flowParams) {
|
||||
@@ -488,7 +488,7 @@ class WelcomeScreen extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCo
|
||||
};
|
||||
} else if (type === "OPEN_URL") {
|
||||
let url = new URL(data.args);
|
||||
(0,_newtab_content_src_asrouter_templates_FirstRun_addUtmParams__WEBPACK_IMPORTED_MODULE_6__.addUtmParams)(url, `${UTMTerm}-screen`);
|
||||
(0,asrouter_content_src_templates_FirstRun_addUtmParams__WEBPACK_IMPORTED_MODULE_6__.addUtmParams)(url, `${UTMTerm}-screen`);
|
||||
if (action.addFlowParams && flowParams) {
|
||||
url.searchParams.append("device_id", flowParams.deviceId);
|
||||
url.searchParams.append("flow_id", flowParams.flowId);
|
||||
@@ -2274,7 +2274,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _lib_aboutwelcome_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
|
||||
/* harmony import */ var _MultiStageProtonScreen__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
|
||||
/* harmony import */ var _newtab_content_src_asrouter_templates_FirstRun_addUtmParams__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(19);
|
||||
/* harmony import */ var asrouter_content_src_templates_FirstRun_addUtmParams__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(19);
|
||||
/* 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/. */
|
||||
@@ -2325,7 +2325,7 @@ class ReturnToAMO extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureComp
|
||||
};
|
||||
} else if (type === "SHOW_FIREFOX_ACCOUNTS") {
|
||||
let params = {
|
||||
..._newtab_content_src_asrouter_templates_FirstRun_addUtmParams__WEBPACK_IMPORTED_MODULE_3__.BASE_PARAMS,
|
||||
...asrouter_content_src_templates_FirstRun_addUtmParams__WEBPACK_IMPORTED_MODULE_3__.BASE_PARAMS,
|
||||
utm_term: `aboutwelcome-${utm_term}-screen`
|
||||
};
|
||||
if (action.addFlowParams && this.state.flowParams) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
||||
"$id": "resource://activity-stream/schemas/BackgroundTaskMessagingExperiment.schema.json",
|
||||
"$id": "chrome://browser/content/asrouter/schemas/BackgroundTaskMessagingExperiment.schema.json",
|
||||
"title": "Messaging Experiment",
|
||||
"description": "A Firefox Messaging System message.",
|
||||
"if": {
|
||||
@@ -10,15 +10,13 @@
|
||||
"const": "multi"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"template"
|
||||
]
|
||||
"required": ["template"]
|
||||
},
|
||||
"then": {
|
||||
"$ref": "resource://activity-stream/schemas/BackgroundTaskMessagingExperiment.schema.json#/$defs/MultiMessage"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/BackgroundTaskMessagingExperiment.schema.json#/$defs/MultiMessage"
|
||||
},
|
||||
"else": {
|
||||
"$ref": "resource://activity-stream/schemas/BackgroundTaskMessagingExperiment.schema.json#/$defs/TemplatedMessage"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/BackgroundTaskMessagingExperiment.schema.json#/$defs/TemplatedMessage"
|
||||
},
|
||||
"$defs": {
|
||||
"ToastNotification": {
|
||||
@@ -28,7 +26,7 @@
|
||||
"description": "A template for toast notifications displayed by the Alert service.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "resource://activity-stream/schemas/BackgroundTaskMessagingExperiment.schema.json#/$defs/Message"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/BackgroundTaskMessagingExperiment.schema.json#/$defs/Message"
|
||||
}
|
||||
],
|
||||
"type": "object",
|
||||
@@ -37,11 +35,11 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"title": {
|
||||
"$ref": "resource://activity-stream/schemas/BackgroundTaskMessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/BackgroundTaskMessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"description": "Id of localized string or message override of toast notification title"
|
||||
},
|
||||
"body": {
|
||||
"$ref": "resource://activity-stream/schemas/BackgroundTaskMessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/BackgroundTaskMessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"description": "Id of localized string or message override of toast notification body"
|
||||
},
|
||||
"icon_url": {
|
||||
@@ -70,9 +68,7 @@
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"required": ["type"],
|
||||
"additionalProperties": true
|
||||
},
|
||||
"requireInteraction": {
|
||||
@@ -93,7 +89,7 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"title": {
|
||||
"$ref": "resource://activity-stream/schemas/BackgroundTaskMessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/BackgroundTaskMessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"description": "The action text to be shown to the user."
|
||||
},
|
||||
"action": {
|
||||
@@ -120,37 +116,24 @@
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"required": ["type"],
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action",
|
||||
"title"
|
||||
],
|
||||
"required": ["action", "title"],
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
]
|
||||
"required": ["title", "body"]
|
||||
},
|
||||
"template": {
|
||||
"type": "string",
|
||||
"const": "toast_notification"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"content",
|
||||
"targeting",
|
||||
"template",
|
||||
"trigger"
|
||||
],
|
||||
"required": ["content", "targeting", "template", "trigger"],
|
||||
"additionalProperties": true
|
||||
},
|
||||
"Message": {
|
||||
@@ -171,9 +154,7 @@
|
||||
"template": {
|
||||
"type": "string",
|
||||
"description": "Which messaging template this message is using.",
|
||||
"enum": [
|
||||
"toast_notification"
|
||||
]
|
||||
"enum": ["toast_notification"]
|
||||
},
|
||||
"frequency": {
|
||||
"type": "object",
|
||||
@@ -203,10 +184,7 @@
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"period",
|
||||
"cap"
|
||||
]
|
||||
"required": ["period", "cap"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -246,9 +224,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id"
|
||||
]
|
||||
"required": ["id"]
|
||||
},
|
||||
"provider": {
|
||||
"description": "An identifier for the provider of this message, such as \"cfr\" or \"preview\".",
|
||||
@@ -257,14 +233,8 @@
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"dependentRequired": {
|
||||
"content": [
|
||||
"id",
|
||||
"template"
|
||||
],
|
||||
"template": [
|
||||
"id",
|
||||
"content"
|
||||
]
|
||||
"content": ["id", "template"],
|
||||
"template": ["id", "content"]
|
||||
}
|
||||
},
|
||||
"localizedText": {
|
||||
@@ -275,9 +245,7 @@
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"string_id"
|
||||
]
|
||||
"required": ["string_id"]
|
||||
},
|
||||
"localizableText": {
|
||||
"description": "Either a raw string or an object containing the string_id of the localized text",
|
||||
@@ -287,7 +255,7 @@
|
||||
"description": "The string to be rendered."
|
||||
},
|
||||
{
|
||||
"$ref": "resource://activity-stream/schemas/BackgroundTaskMessagingExperiment.schema.json#/$defs/localizedText"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/BackgroundTaskMessagingExperiment.schema.json#/$defs/localizedText"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -296,7 +264,7 @@
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "resource://activity-stream/schemas/BackgroundTaskMessagingExperiment.schema.json#/$defs/Message"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/BackgroundTaskMessagingExperiment.schema.json#/$defs/Message"
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
@@ -304,17 +272,13 @@
|
||||
"properties": {
|
||||
"template": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"toast_notification"
|
||||
]
|
||||
"enum": ["toast_notification"]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"template"
|
||||
]
|
||||
"required": ["template"]
|
||||
},
|
||||
"then": {
|
||||
"$ref": "resource://activity-stream/schemas/BackgroundTaskMessagingExperiment.schema.json#/$defs/ToastNotification"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/BackgroundTaskMessagingExperiment.schema.json#/$defs/ToastNotification"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -331,14 +295,11 @@
|
||||
"type": "array",
|
||||
"description": "An array of messages.",
|
||||
"items": {
|
||||
"$ref": "resource://activity-stream/schemas/BackgroundTaskMessagingExperiment.schema.json#/$defs/TemplatedMessage"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/BackgroundTaskMessagingExperiment.schema.json#/$defs/TemplatedMessage"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"template",
|
||||
"messages"
|
||||
]
|
||||
"required": ["template", "messages"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
||||
"$id": "resource://activity-stream/schemas/MessagingExperiment.schema.json",
|
||||
"$id": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json",
|
||||
"title": "Messaging Experiment",
|
||||
"description": "A Firefox Messaging System message.",
|
||||
"if": {
|
||||
@@ -10,15 +10,13 @@
|
||||
"const": "multi"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"template"
|
||||
]
|
||||
"required": ["template"]
|
||||
},
|
||||
"then": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/MultiMessage"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/MultiMessage"
|
||||
},
|
||||
"else": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/TemplatedMessage"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/TemplatedMessage"
|
||||
},
|
||||
"$defs": {
|
||||
"CFRUrlbarChiclet": {
|
||||
@@ -28,7 +26,7 @@
|
||||
"description": "A template with a chiclet button with text.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/Message"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/Message"
|
||||
}
|
||||
],
|
||||
"type": "object",
|
||||
@@ -43,16 +41,14 @@
|
||||
"layout": {
|
||||
"type": "string",
|
||||
"description": "Describes how content should be displayed.",
|
||||
"enum": [
|
||||
"chiclet_open_url"
|
||||
]
|
||||
"enum": ["chiclet_open_url"]
|
||||
},
|
||||
"bucket_id": {
|
||||
"type": "string",
|
||||
"description": "A bucket identifier for the addon. This is used in order to anonymize telemetry for history-sensitive targeting."
|
||||
},
|
||||
"notification_text": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"description": "The text in the small blue chicklet that appears in the URL bar. This can be a reference to a localized string in Firefox or just a plain string."
|
||||
},
|
||||
"active_color": {
|
||||
@@ -70,17 +66,11 @@
|
||||
"where": {
|
||||
"description": "Should it open in a new tab or the current tab",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"current",
|
||||
"tabshifted"
|
||||
]
|
||||
"enum": ["current", "tabshifted"]
|
||||
}
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"required": [
|
||||
"url",
|
||||
"where"
|
||||
]
|
||||
"required": ["url", "where"]
|
||||
}
|
||||
},
|
||||
"additionalProperties": true,
|
||||
@@ -97,10 +87,7 @@
|
||||
"const": "cfr_urlbar_chiclet"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"targeting",
|
||||
"trigger"
|
||||
]
|
||||
"required": ["targeting", "trigger"]
|
||||
},
|
||||
"ExtensionDoorhanger": {
|
||||
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
||||
@@ -109,7 +96,7 @@
|
||||
"description": "A template with a heading, addon icon, title and description. No markup allowed.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/Message"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/Message"
|
||||
}
|
||||
],
|
||||
"type": "object",
|
||||
@@ -155,7 +142,7 @@
|
||||
"description": "Whether to allow the message to be shown in private browsing mode. Defaults to false."
|
||||
},
|
||||
"notification_text": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"description": "The text in the small blue chicklet that appears in the URL bar. This can be a reference to a localized string in Firefox or just a plain string."
|
||||
},
|
||||
"info_icon": {
|
||||
@@ -171,21 +158,17 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"tooltiptext": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"description": "Text for button tooltip used to provide information about the doorhanger."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"tooltiptext"
|
||||
]
|
||||
"required": ["tooltiptext"]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"attributes"
|
||||
]
|
||||
"required": ["attributes"]
|
||||
},
|
||||
{
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/localizedText"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/localizedText"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -202,13 +185,10 @@
|
||||
"learn_more": {
|
||||
"type": "string",
|
||||
"description": "Last part of the path in the SUMO URL to the support page with the information about the doorhanger.",
|
||||
"examples": [
|
||||
"extensionpromotions",
|
||||
"extensionrecommendations"
|
||||
]
|
||||
"examples": ["extensionpromotions", "extensionrecommendations"]
|
||||
},
|
||||
"heading_text": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"description": "The larger heading text displayed in the pop-over. This can be a reference to a localized string in Firefox or just a plain string."
|
||||
},
|
||||
"icon": {
|
||||
@@ -256,15 +236,10 @@
|
||||
"description": "Link that offers more information related to the addon."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"author",
|
||||
"icon",
|
||||
"amo_url"
|
||||
]
|
||||
"required": ["title", "author", "icon", "amo_url"]
|
||||
},
|
||||
"text": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"description": "The body text displayed in the pop-over. This can be a reference to a localized string in Firefox or just a plain string."
|
||||
},
|
||||
"descriptionDetails": {
|
||||
@@ -275,14 +250,12 @@
|
||||
"description": "Array of string_ids",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/localizedText",
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/localizedText",
|
||||
"description": "Id of string to localized addon description"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"steps"
|
||||
]
|
||||
"required": ["steps"]
|
||||
},
|
||||
"buttons": {
|
||||
"description": "The label and functionality for the buttons in the pop-over.",
|
||||
@@ -308,19 +281,14 @@
|
||||
"description": "A single character to be used as a shortcut key for the secondary button. This should be one of the characters that appears in the button label."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"accesskey"
|
||||
],
|
||||
"required": ["accesskey"],
|
||||
"description": "Button attributes."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"value",
|
||||
"attributes"
|
||||
]
|
||||
"required": ["value", "attributes"]
|
||||
},
|
||||
{
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/localizedText"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/localizedText"
|
||||
}
|
||||
],
|
||||
"description": "Id of localized string or message override."
|
||||
@@ -373,16 +341,11 @@
|
||||
"description": "A single character to be used as a shortcut key for the secondary button. This should be one of the characters that appears in the button label."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"accesskey"
|
||||
],
|
||||
"required": ["accesskey"],
|
||||
"description": "Button attributes."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"value",
|
||||
"attributes"
|
||||
]
|
||||
"required": ["value", "attributes"]
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
@@ -397,9 +360,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"string_id"
|
||||
]
|
||||
"required": ["string_id"]
|
||||
}
|
||||
],
|
||||
"description": "Id of localized string or message override."
|
||||
@@ -456,25 +417,16 @@
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"required": [
|
||||
"category",
|
||||
"notification_text"
|
||||
]
|
||||
"required": ["category", "notification_text"]
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"cfr_doorhanger",
|
||||
"milestone_message"
|
||||
]
|
||||
"enum": ["cfr_doorhanger", "milestone_message"]
|
||||
}
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"required": [
|
||||
"targeting",
|
||||
"trigger"
|
||||
],
|
||||
"required": ["targeting", "trigger"],
|
||||
"$defs": {
|
||||
"plainText": {
|
||||
"description": "Plain text (no HTML allowed)",
|
||||
@@ -494,7 +446,7 @@
|
||||
"description": "A template with an image, test and buttons.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/Message"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/Message"
|
||||
}
|
||||
],
|
||||
"type": "object",
|
||||
@@ -505,13 +457,10 @@
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "Should the message be global (persisted across tabs) or local (disappear when switching to a different tab).",
|
||||
"enum": [
|
||||
"global",
|
||||
"tab"
|
||||
]
|
||||
"enum": ["global", "tab"]
|
||||
},
|
||||
"text": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"description": "The text show in the notification box."
|
||||
},
|
||||
"priority": {
|
||||
@@ -526,7 +475,7 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"label": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"description": "The text label of the button."
|
||||
},
|
||||
"primary": {
|
||||
@@ -548,9 +497,7 @@
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"required": ["type"],
|
||||
"additionalProperties": true
|
||||
},
|
||||
"supportPage": {
|
||||
@@ -558,19 +505,13 @@
|
||||
"description": "A page title on SUMO to link to"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"label",
|
||||
"action"
|
||||
],
|
||||
"required": ["label", "action"],
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"required": [
|
||||
"text",
|
||||
"buttons"
|
||||
]
|
||||
"required": ["text", "buttons"]
|
||||
},
|
||||
"template": {
|
||||
"type": "string",
|
||||
@@ -578,10 +519,7 @@
|
||||
}
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"required": [
|
||||
"targeting",
|
||||
"trigger"
|
||||
],
|
||||
"required": ["targeting", "trigger"],
|
||||
"$defs": {
|
||||
"plainText": {
|
||||
"description": "Plain text (no HTML allowed)",
|
||||
@@ -601,7 +539,7 @@
|
||||
"description": "Message shown on the private browsing newtab page.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/Message"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/Message"
|
||||
}
|
||||
],
|
||||
"type": "object",
|
||||
@@ -649,22 +587,12 @@
|
||||
"promoType": {
|
||||
"type": "string",
|
||||
"description": "Promo type used to determine if promo should show to a given user",
|
||||
"enum": [
|
||||
"FOCUS",
|
||||
"VPN",
|
||||
"PIN",
|
||||
"COOKIE_BANNERS",
|
||||
"OTHER"
|
||||
]
|
||||
"enum": ["FOCUS", "VPN", "PIN", "COOKIE_BANNERS", "OTHER"]
|
||||
},
|
||||
"promoSectionStyle": {
|
||||
"type": "string",
|
||||
"description": "Sets the position of the promo section. Possible values are: top, below-search, bottom. Default bottom.",
|
||||
"enum": [
|
||||
"top",
|
||||
"below-search",
|
||||
"bottom"
|
||||
]
|
||||
"enum": ["top", "below-search", "bottom"]
|
||||
},
|
||||
"promoTitle": {
|
||||
"type": "string",
|
||||
@@ -696,23 +624,16 @@
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"required": ["type"],
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action"
|
||||
]
|
||||
"required": ["action"]
|
||||
},
|
||||
"promoLinkType": {
|
||||
"type": "string",
|
||||
"description": "Type of promo link type. Possible values: link, button. Default is link.",
|
||||
"enum": [
|
||||
"link",
|
||||
"button"
|
||||
]
|
||||
"enum": ["link", "button"]
|
||||
},
|
||||
"promoImageLarge": {
|
||||
"type": "string",
|
||||
@@ -734,14 +655,10 @@
|
||||
"const": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"promoEnabled"
|
||||
]
|
||||
"required": ["promoEnabled"]
|
||||
},
|
||||
"then": {
|
||||
"required": [
|
||||
"promoButton"
|
||||
]
|
||||
"required": ["promoButton"]
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -751,28 +668,20 @@
|
||||
"const": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"infoEnabled"
|
||||
]
|
||||
"required": ["infoEnabled"]
|
||||
},
|
||||
"then": {
|
||||
"required": [
|
||||
"infoLinkText"
|
||||
],
|
||||
"required": ["infoLinkText"],
|
||||
"if": {
|
||||
"properties": {
|
||||
"infoTitleEnabled": {
|
||||
"const": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"infoTitleEnabled"
|
||||
]
|
||||
"required": ["infoTitleEnabled"]
|
||||
},
|
||||
"then": {
|
||||
"required": [
|
||||
"infoTitle"
|
||||
]
|
||||
"required": ["infoTitle"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -784,9 +693,7 @@
|
||||
}
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"required": [
|
||||
"targeting"
|
||||
]
|
||||
"required": ["targeting"]
|
||||
},
|
||||
"Spotlight": {
|
||||
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
||||
@@ -795,7 +702,7 @@
|
||||
"description": "A template with an image, title, content and two buttons.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/Message"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/Message"
|
||||
}
|
||||
],
|
||||
"type": "object",
|
||||
@@ -852,16 +759,11 @@
|
||||
"template": {
|
||||
"type": "string",
|
||||
"description": "Specify whether the surface is shown as a Spotlight modal or an in-surface Feature Callout dialog",
|
||||
"enum": [
|
||||
"spotlight",
|
||||
"feature_callout"
|
||||
]
|
||||
"enum": ["spotlight", "feature_callout"]
|
||||
}
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"required": [
|
||||
"targeting"
|
||||
]
|
||||
"required": ["targeting"]
|
||||
},
|
||||
"ToastNotification": {
|
||||
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
||||
@@ -870,7 +772,7 @@
|
||||
"description": "A template for toast notifications displayed by the Alert service.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/Message"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/Message"
|
||||
}
|
||||
],
|
||||
"type": "object",
|
||||
@@ -879,11 +781,11 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"title": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"description": "Id of localized string or message override of toast notification title"
|
||||
},
|
||||
"body": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"description": "Id of localized string or message override of toast notification body"
|
||||
},
|
||||
"icon_url": {
|
||||
@@ -912,9 +814,7 @@
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"required": ["type"],
|
||||
"additionalProperties": true
|
||||
},
|
||||
"requireInteraction": {
|
||||
@@ -935,7 +835,7 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"title": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"description": "The action text to be shown to the user."
|
||||
},
|
||||
"action": {
|
||||
@@ -962,37 +862,24 @@
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"required": ["type"],
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"action",
|
||||
"title"
|
||||
],
|
||||
"required": ["action", "title"],
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"required": [
|
||||
"title",
|
||||
"body"
|
||||
]
|
||||
"required": ["title", "body"]
|
||||
},
|
||||
"template": {
|
||||
"type": "string",
|
||||
"const": "toast_notification"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"content",
|
||||
"targeting",
|
||||
"template",
|
||||
"trigger"
|
||||
],
|
||||
"required": ["content", "targeting", "template", "trigger"],
|
||||
"additionalProperties": true
|
||||
},
|
||||
"ToolbarBadgeMessage": {
|
||||
@@ -1002,7 +889,7 @@
|
||||
"description": "A template that specifies to which element in the browser toolbar to add a notification.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/Message"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/Message"
|
||||
}
|
||||
],
|
||||
"type": "object",
|
||||
@@ -1021,9 +908,7 @@
|
||||
}
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"required": [
|
||||
"id"
|
||||
],
|
||||
"required": ["id"],
|
||||
"description": "Optional action to take in addition to showing the notification"
|
||||
},
|
||||
"delay": {
|
||||
@@ -1031,14 +916,12 @@
|
||||
"description": "Optional delay in ms after which to show the notification"
|
||||
},
|
||||
"badgeDescription": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/localizedText",
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/localizedText",
|
||||
"description": "This is used in combination with the badged button to offer a text based alternative to the visual badging. Example 'New Feature: What's New'"
|
||||
}
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"required": [
|
||||
"target"
|
||||
]
|
||||
"required": ["target"]
|
||||
},
|
||||
"template": {
|
||||
"type": "string",
|
||||
@@ -1046,9 +929,7 @@
|
||||
}
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"required": [
|
||||
"targeting"
|
||||
]
|
||||
"required": ["targeting"]
|
||||
},
|
||||
"UpdateAction": {
|
||||
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
||||
@@ -1057,7 +938,7 @@
|
||||
"description": "A template for messages that execute predetermined actions.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/Message"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/Message"
|
||||
}
|
||||
],
|
||||
"type": "object",
|
||||
@@ -1088,25 +969,18 @@
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"description": "Optional action to take in addition to showing the notification",
|
||||
"required": [
|
||||
"id",
|
||||
"data"
|
||||
]
|
||||
"required": ["id", "data"]
|
||||
}
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"required": [
|
||||
"action"
|
||||
]
|
||||
"required": ["action"]
|
||||
},
|
||||
"template": {
|
||||
"type": "string",
|
||||
"const": "update_action"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"targeting"
|
||||
]
|
||||
"required": ["targeting"]
|
||||
},
|
||||
"WhatsNewMessage": {
|
||||
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
||||
@@ -1115,7 +989,7 @@
|
||||
"description": "A template for the messages that appear in the What's New panel.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/Message"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/Message"
|
||||
}
|
||||
],
|
||||
"type": "object",
|
||||
@@ -1125,9 +999,7 @@
|
||||
"properties": {
|
||||
"layout": {
|
||||
"description": "Different message layouts",
|
||||
"enum": [
|
||||
"tracking-protections"
|
||||
]
|
||||
"enum": ["tracking-protections"]
|
||||
},
|
||||
"bucket_id": {
|
||||
"type": "string",
|
||||
@@ -1138,19 +1010,19 @@
|
||||
"description": "The date/time (number of milliseconds elapsed since January 1, 1970 00:00:00 UTC) the message was published."
|
||||
},
|
||||
"title": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"description": "Id of localized string or message override of What's New message title"
|
||||
},
|
||||
"subtitle": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"description": "Id of localized string or message override of What's New message subtitle"
|
||||
},
|
||||
"body": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"description": "Id of localized string or message override of What's New message body"
|
||||
},
|
||||
"link_text": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"description": "(optional) Id of localized string or message override of What's New message link text"
|
||||
},
|
||||
"cta_url": {
|
||||
@@ -1160,21 +1032,11 @@
|
||||
},
|
||||
"cta_type": {
|
||||
"description": "Type of url open action",
|
||||
"enum": [
|
||||
"OPEN_URL",
|
||||
"OPEN_ABOUT_PAGE",
|
||||
"OPEN_PROTECTION_REPORT"
|
||||
]
|
||||
"enum": ["OPEN_URL", "OPEN_ABOUT_PAGE", "OPEN_PROTECTION_REPORT"]
|
||||
},
|
||||
"cta_where": {
|
||||
"description": "How to open the cta: new window, tab, focused, unfocused.",
|
||||
"enum": [
|
||||
"current",
|
||||
"tabshifted",
|
||||
"tab",
|
||||
"save",
|
||||
"window"
|
||||
]
|
||||
"enum": ["current", "tabshifted", "tab", "save", "window"]
|
||||
},
|
||||
"icon_url": {
|
||||
"description": "(optional) URL for the What's New message icon.",
|
||||
@@ -1182,7 +1044,7 @@
|
||||
"format": "uri"
|
||||
},
|
||||
"icon_alt": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
|
||||
"description": "Alt text for image."
|
||||
}
|
||||
},
|
||||
@@ -1200,9 +1062,7 @@
|
||||
"const": "whatsnew_panel_message"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"order"
|
||||
],
|
||||
"required": ["order"],
|
||||
"additionalProperties": true
|
||||
},
|
||||
"Message": {
|
||||
@@ -1265,10 +1125,7 @@
|
||||
"maximum": 100
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"period",
|
||||
"cap"
|
||||
]
|
||||
"required": ["period", "cap"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1308,9 +1165,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id"
|
||||
]
|
||||
"required": ["id"]
|
||||
},
|
||||
"provider": {
|
||||
"description": "An identifier for the provider of this message, such as \"cfr\" or \"preview\".",
|
||||
@@ -1319,14 +1174,8 @@
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"dependentRequired": {
|
||||
"content": [
|
||||
"id",
|
||||
"template"
|
||||
],
|
||||
"template": [
|
||||
"id",
|
||||
"content"
|
||||
]
|
||||
"content": ["id", "template"],
|
||||
"template": ["id", "content"]
|
||||
}
|
||||
},
|
||||
"localizedText": {
|
||||
@@ -1337,9 +1186,7 @@
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"string_id"
|
||||
]
|
||||
"required": ["string_id"]
|
||||
},
|
||||
"localizableText": {
|
||||
"description": "Either a raw string or an object containing the string_id of the localized text",
|
||||
@@ -1349,7 +1196,7 @@
|
||||
"description": "The string to be rendered."
|
||||
},
|
||||
{
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/localizedText"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/localizedText"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1358,7 +1205,7 @@
|
||||
"type": "object",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/Message"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/Message"
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
@@ -1366,17 +1213,13 @@
|
||||
"properties": {
|
||||
"template": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"cfr_urlbar_chiclet"
|
||||
]
|
||||
"enum": ["cfr_urlbar_chiclet"]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"template"
|
||||
]
|
||||
"required": ["template"]
|
||||
},
|
||||
"then": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/CFRUrlbarChiclet"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/CFRUrlbarChiclet"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1385,18 +1228,13 @@
|
||||
"properties": {
|
||||
"template": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"cfr_doorhanger",
|
||||
"milestone_message"
|
||||
]
|
||||
"enum": ["cfr_doorhanger", "milestone_message"]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"template"
|
||||
]
|
||||
"required": ["template"]
|
||||
},
|
||||
"then": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/ExtensionDoorhanger"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/ExtensionDoorhanger"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1405,17 +1243,13 @@
|
||||
"properties": {
|
||||
"template": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"infobar"
|
||||
]
|
||||
"enum": ["infobar"]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"template"
|
||||
]
|
||||
"required": ["template"]
|
||||
},
|
||||
"then": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/InfoBar"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/InfoBar"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1424,17 +1258,13 @@
|
||||
"properties": {
|
||||
"template": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pb_newtab"
|
||||
]
|
||||
"enum": ["pb_newtab"]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"template"
|
||||
]
|
||||
"required": ["template"]
|
||||
},
|
||||
"then": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/NewtabPromoMessage"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/NewtabPromoMessage"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1443,18 +1273,13 @@
|
||||
"properties": {
|
||||
"template": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"spotlight",
|
||||
"feature_callout"
|
||||
]
|
||||
"enum": ["spotlight", "feature_callout"]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"template"
|
||||
]
|
||||
"required": ["template"]
|
||||
},
|
||||
"then": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/Spotlight"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/Spotlight"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1463,17 +1288,13 @@
|
||||
"properties": {
|
||||
"template": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"toast_notification"
|
||||
]
|
||||
"enum": ["toast_notification"]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"template"
|
||||
]
|
||||
"required": ["template"]
|
||||
},
|
||||
"then": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/ToastNotification"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/ToastNotification"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1482,17 +1303,13 @@
|
||||
"properties": {
|
||||
"template": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"toolbar_badge"
|
||||
]
|
||||
"enum": ["toolbar_badge"]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"template"
|
||||
]
|
||||
"required": ["template"]
|
||||
},
|
||||
"then": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/ToolbarBadgeMessage"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/ToolbarBadgeMessage"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1501,17 +1318,13 @@
|
||||
"properties": {
|
||||
"template": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"update_action"
|
||||
]
|
||||
"enum": ["update_action"]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"template"
|
||||
]
|
||||
"required": ["template"]
|
||||
},
|
||||
"then": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/UpdateAction"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/UpdateAction"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1520,17 +1333,13 @@
|
||||
"properties": {
|
||||
"template": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"whatsnew_panel_message"
|
||||
]
|
||||
"enum": ["whatsnew_panel_message"]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"template"
|
||||
]
|
||||
"required": ["template"]
|
||||
},
|
||||
"then": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/WhatsNewMessage"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/WhatsNewMessage"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1547,14 +1356,11 @@
|
||||
"type": "array",
|
||||
"description": "An array of messages.",
|
||||
"items": {
|
||||
"$ref": "resource://activity-stream/schemas/MessagingExperiment.schema.json#/$defs/TemplatedMessage"
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/TemplatedMessage"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"template",
|
||||
"messages"
|
||||
]
|
||||
"required": ["template", "messages"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -60,7 +60,7 @@ SCHEMA_DIR = Path("..", "templates")
|
||||
|
||||
SCHEMAS = [
|
||||
SchemaDefinition(
|
||||
schema_id="resource://activity-stream/schemas/MessagingExperiment.schema.json",
|
||||
schema_id="chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json",
|
||||
schema_path=Path("MessagingExperiment.schema.json"),
|
||||
message_types={
|
||||
"CFRUrlbarChiclet": (
|
||||
@@ -100,7 +100,7 @@ SCHEMAS = [
|
||||
),
|
||||
SchemaDefinition(
|
||||
schema_id=(
|
||||
"resource://activity-stream/schemas/"
|
||||
"chrome://browser/content/asrouter/schemas/"
|
||||
"BackgroundTaskMessagingExperiment.schema.json"
|
||||
),
|
||||
schema_path=Path("BackgroundTaskMessagingExperiment.schema.json"),
|
||||
@@ -7,3 +7,5 @@ browser.jar:
|
||||
content/browser/asrouter/asrouter-admin.bundle.js (content/asrouter-admin.bundle.js)
|
||||
content/browser/asrouter/components/ASRouterAdmin/ASRouterAdmin.css (content/components/ASRouterAdmin/ASRouterAdmin.css)
|
||||
content/browser/asrouter/render.js (content/render.js)
|
||||
content/browser/asrouter/schemas/BackgroundTaskMessagingExperiment.schema.json (content-src/schemas/BackgroundTaskMessagingExperiment.schema.json)
|
||||
content/browser/asrouter/schemas/MessagingExperiment.schema.json (content-src/schemas/MessagingExperiment.schema.json)
|
||||
|
||||
@@ -31,4 +31,21 @@ BROWSER_CHROME_MANIFESTS += [
|
||||
"tests/browser/browser.toml",
|
||||
]
|
||||
|
||||
XPCSHELL_TESTS_MANIFESTS += [
|
||||
"tests/xpcshell/xpcshell.toml",
|
||||
]
|
||||
|
||||
TESTING_JS_MODULES += [
|
||||
"content-src/schemas/FxMSCommon.schema.json",
|
||||
"content-src/templates/CFR/templates/CFRUrlbarChiclet.schema.json",
|
||||
"content-src/templates/CFR/templates/ExtensionDoorhanger.schema.json",
|
||||
"content-src/templates/CFR/templates/InfoBar.schema.json",
|
||||
"content-src/templates/OnboardingMessage/Spotlight.schema.json",
|
||||
"content-src/templates/OnboardingMessage/ToolbarBadgeMessage.schema.json",
|
||||
"content-src/templates/OnboardingMessage/UpdateAction.schema.json",
|
||||
"content-src/templates/OnboardingMessage/WhatsNewMessage.schema.json",
|
||||
"content-src/templates/PBNewtab/NewtabPromoMessage.schema.json",
|
||||
"content-src/templates/ToastNotification/ToastNotification.schema.json",
|
||||
]
|
||||
|
||||
SPHINX_TREES["docs"] = "docs"
|
||||
|
||||
54
browser/components/asrouter/package-lock.json
generated
54
browser/components/asrouter/package-lock.json
generated
@@ -22,6 +22,7 @@
|
||||
"babel-loader": "8.2.3",
|
||||
"babel-plugin-jsm-to-esmodules": "0.6.0",
|
||||
"chai": "4.3.4",
|
||||
"chai-json-schema": "1.5.1",
|
||||
"enzyme": "3.11.0",
|
||||
"enzyme-adapter-react-16": "1.15.6",
|
||||
"karma": "6.3.8",
|
||||
@@ -1467,6 +1468,22 @@
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/chai-json-schema": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/chai-json-schema/-/chai-json-schema-1.5.1.tgz",
|
||||
"integrity": "sha512-TR/xPDxRhqwFFCWg1HgL8nNWbpNfUwaib6pBN++QKpnd0t+o3+MBvAn5CM1mpdUMaM76oJAtUjGKdjGad01lIA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"jsonpointer.js": "0.4.0",
|
||||
"tv4": "^1.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"chai": ">= 1.6.1 < 5"
|
||||
}
|
||||
},
|
||||
"node_modules/chalk": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
|
||||
@@ -3797,6 +3814,12 @@
|
||||
"graceful-fs": "^4.1.6"
|
||||
}
|
||||
},
|
||||
"node_modules/jsonpointer.js": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonpointer.js/-/jsonpointer.js-0.4.0.tgz",
|
||||
"integrity": "sha512-2bf/1crAmPpsmj1I6rDT6W0SOErkrNBpb555xNWcMVWYrX6VnXpG0GRMQ2shvOHwafpfse8q0gnzPFYVH6Tqdg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/just-extend": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz",
|
||||
@@ -6127,6 +6150,15 @@
|
||||
"node": ">=0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/tv4": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/tv4/-/tv4-1.3.0.tgz",
|
||||
"integrity": "sha512-afizzfpJgvPr+eDkREK4MxJ/+r8nEEHcmitwgnPUqpaP+FpwQyadnxNoSACbgc/b1LsZYtODGoPiFxQrgJgjvw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/type-detect": {
|
||||
"version": "4.0.8",
|
||||
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
|
||||
@@ -7909,6 +7941,16 @@
|
||||
"type-detect": "^4.0.5"
|
||||
}
|
||||
},
|
||||
"chai-json-schema": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/chai-json-schema/-/chai-json-schema-1.5.1.tgz",
|
||||
"integrity": "sha512-TR/xPDxRhqwFFCWg1HgL8nNWbpNfUwaib6pBN++QKpnd0t+o3+MBvAn5CM1mpdUMaM76oJAtUjGKdjGad01lIA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"jsonpointer.js": "0.4.0",
|
||||
"tv4": "^1.3.0"
|
||||
}
|
||||
},
|
||||
"chalk": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
|
||||
@@ -9637,6 +9679,12 @@
|
||||
"graceful-fs": "^4.1.6"
|
||||
}
|
||||
},
|
||||
"jsonpointer.js": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonpointer.js/-/jsonpointer.js-0.4.0.tgz",
|
||||
"integrity": "sha512-2bf/1crAmPpsmj1I6rDT6W0SOErkrNBpb555xNWcMVWYrX6VnXpG0GRMQ2shvOHwafpfse8q0gnzPFYVH6Tqdg==",
|
||||
"dev": true
|
||||
},
|
||||
"just-extend": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz",
|
||||
@@ -11389,6 +11437,12 @@
|
||||
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
|
||||
"dev": true
|
||||
},
|
||||
"tv4": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/tv4/-/tv4-1.3.0.tgz",
|
||||
"integrity": "sha512-afizzfpJgvPr+eDkREK4MxJ/+r8nEEHcmitwgnPUqpaP+FpwQyadnxNoSACbgc/b1LsZYtODGoPiFxQrgJgjvw==",
|
||||
"dev": true
|
||||
},
|
||||
"type-detect": {
|
||||
"version": "4.0.8",
|
||||
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
"babel-loader": "8.2.3",
|
||||
"babel-plugin-jsm-to-esmodules": "0.6.0",
|
||||
"chai": "4.3.4",
|
||||
"chai-json-schema": "1.5.1",
|
||||
"enzyme": "3.11.0",
|
||||
"enzyme-adapter-react-16": "1.15.6",
|
||||
"karma": "6.3.8",
|
||||
|
||||
@@ -16,7 +16,7 @@ import { ASRouterTriggerListeners } from "modules/ASRouterTriggerListeners.jsm";
|
||||
import { CFRPageActions } from "modules/CFRPageActions.jsm";
|
||||
import { GlobalOverrider } from "test/unit/utils";
|
||||
import { PanelTestProvider } from "newtab/lib/PanelTestProvider.sys.mjs";
|
||||
import ProviderResponseSchema from "newtab/content-src/asrouter/schemas/provider-response.schema.json";
|
||||
import ProviderResponseSchema from "content-src/schemas/provider-response.schema.json";
|
||||
|
||||
const MESSAGE_PROVIDER_PREF_NAME =
|
||||
"browser.newtabpage.activity-stream.asrouter.providers.cfr";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
addUtmParams,
|
||||
BASE_PARAMS,
|
||||
} from "content-src/asrouter/templates/FirstRun/addUtmParams";
|
||||
} from "content-src/templates/FirstRun/addUtmParams";
|
||||
|
||||
describe("addUtmParams", () => {
|
||||
it("should convert a string URL", () => {
|
||||
@@ -1,7 +1,7 @@
|
||||
import { CFRMessageProvider } from "asrouter/modules/CFRMessageProvider.sys.mjs";
|
||||
import CFRDoorhangerSchema from "content-src/asrouter/templates/CFR/templates/ExtensionDoorhanger.schema.json";
|
||||
import CFRChicletSchema from "content-src/asrouter/templates/CFR/templates/CFRUrlbarChiclet.schema.json";
|
||||
import InfoBarSchema from "content-src/asrouter/templates/CFR/templates/InfoBar.schema.json";
|
||||
import { CFRMessageProvider } from "modules/CFRMessageProvider.sys.mjs";
|
||||
import CFRDoorhangerSchema from "content-src/templates/CFR/templates/ExtensionDoorhanger.schema.json";
|
||||
import CFRChicletSchema from "content-src/templates/CFR/templates/CFRUrlbarChiclet.schema.json";
|
||||
import InfoBarSchema from "content-src/templates/CFR/templates/InfoBar.schema.json";
|
||||
|
||||
const SCHEMAS = {
|
||||
cfr_urlbar_chiclet: CFRChicletSchema,
|
||||
@@ -8,7 +8,9 @@ import {
|
||||
} from "newtab/test/unit/utils";
|
||||
import Adapter from "enzyme-adapter-react-16";
|
||||
import { chaiAssertions } from "newtab/test/schemas/pings";
|
||||
import chaiJsonSchema from "chai-json-schema";
|
||||
import enzyme from "enzyme";
|
||||
import FxMSCommonSchema from "../../content-src/schemas/FxMSCommon.schema.json";
|
||||
|
||||
enzyme.configure({ adapter: new Adapter() });
|
||||
|
||||
@@ -33,6 +35,8 @@ const files = req.keys();
|
||||
sinon.assert.expose(assert, { prefix: "" });
|
||||
|
||||
chai.use(chaiAssertions);
|
||||
chai.use(chaiJsonSchema);
|
||||
chai.tv4.addSchema("file:///FxMSCommon.schema.json", FxMSCommonSchema);
|
||||
|
||||
const overrider = new GlobalOverrider();
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ function assertValidates(validator, obj, msg) {
|
||||
|
||||
async function fetchSchema(uri) {
|
||||
try {
|
||||
dump(`URI: ${uri}\n`);
|
||||
return fetch(uri, { credentials: "omit" }).then(rsp => rsp.json());
|
||||
} catch (e) {
|
||||
throw new Error(`Could not fetch ${uri}`);
|
||||
@@ -44,7 +45,7 @@ async function schemaValidatorFor(uri, { common = false } = {}) {
|
||||
|
||||
async function makeValidators() {
|
||||
const experimentValidator = await schemaValidatorFor(
|
||||
"resource://activity-stream/schemas/MessagingExperiment.schema.json"
|
||||
"chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
);
|
||||
|
||||
const messageValidators = {
|
||||
@@ -25,7 +25,7 @@ let EXPERIMENT_VALIDATOR;
|
||||
|
||||
add_setup(async function setup() {
|
||||
EXPERIMENT_VALIDATOR = await schemaValidatorFor(
|
||||
"resource://activity-stream/schemas/MessagingExperiment.schema.json"
|
||||
"chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
);
|
||||
});
|
||||
|
||||
@@ -65,7 +65,7 @@ export class AboutMessagePreviewParent extends JSWindowActorParent {
|
||||
}
|
||||
|
||||
const schema = await fetch(
|
||||
"resource://activity-stream/schemas/MessagingExperiment.schema.json",
|
||||
"chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json",
|
||||
{ credentials: "omit" }
|
||||
).then(rsp => rsp.json());
|
||||
|
||||
|
||||
@@ -7,8 +7,6 @@ browser.jar:
|
||||
% content activity-stream %content/activity-stream/ contentaccessible=yes
|
||||
res/activity-stream/lib/ (./lib/*)
|
||||
res/activity-stream/common/ (./common/*)
|
||||
res/activity-stream/schemas/BackgroundTaskMessagingExperiment.schema.json (./content-src/asrouter/schemas/BackgroundTaskMessagingExperiment.schema.json)
|
||||
res/activity-stream/schemas/MessagingExperiment.schema.json (./content-src/asrouter/schemas/MessagingExperiment.schema.json)
|
||||
res/activity-stream/vendor/Redux.sys.mjs (./vendor/Redux.sys.mjs)
|
||||
res/activity-stream/vendor/react.js (./vendor/react.js)
|
||||
res/activity-stream/vendor/react-dom.js (./vendor/react-dom.js)
|
||||
|
||||
@@ -13,16 +13,6 @@ BROWSER_CHROME_MANIFESTS += [
|
||||
]
|
||||
|
||||
TESTING_JS_MODULES += [
|
||||
"content-src/asrouter/schemas/FxMSCommon.schema.json",
|
||||
"content-src/asrouter/templates/CFR/templates/CFRUrlbarChiclet.schema.json",
|
||||
"content-src/asrouter/templates/CFR/templates/ExtensionDoorhanger.schema.json",
|
||||
"content-src/asrouter/templates/CFR/templates/InfoBar.schema.json",
|
||||
"content-src/asrouter/templates/OnboardingMessage/Spotlight.schema.json",
|
||||
"content-src/asrouter/templates/OnboardingMessage/ToolbarBadgeMessage.schema.json",
|
||||
"content-src/asrouter/templates/OnboardingMessage/UpdateAction.schema.json",
|
||||
"content-src/asrouter/templates/OnboardingMessage/WhatsNewMessage.schema.json",
|
||||
"content-src/asrouter/templates/PBNewtab/NewtabPromoMessage.schema.json",
|
||||
"content-src/asrouter/templates/ToastNotification/ToastNotification.schema.json",
|
||||
"test/InflightAssetsMessageProvider.sys.mjs",
|
||||
"test/NimbusRolloutMessageProvider.sys.mjs",
|
||||
]
|
||||
|
||||
54
browser/components/newtab/package-lock.json
generated
54
browser/components/newtab/package-lock.json
generated
@@ -26,7 +26,6 @@
|
||||
"babel-plugin-jsm-to-esmodules": "0.6.0",
|
||||
"buffer": "6.0.3",
|
||||
"chai": "4.3.4",
|
||||
"chai-json-schema": "1.5.1",
|
||||
"enzyme": "3.11.0",
|
||||
"enzyme-adapter-react-16": "1.15.6",
|
||||
"joi-browser": "13.4.0",
|
||||
@@ -1548,22 +1547,6 @@
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/chai-json-schema": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/chai-json-schema/-/chai-json-schema-1.5.1.tgz",
|
||||
"integrity": "sha512-TR/xPDxRhqwFFCWg1HgL8nNWbpNfUwaib6pBN++QKpnd0t+o3+MBvAn5CM1mpdUMaM76oJAtUjGKdjGad01lIA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"jsonpointer.js": "0.4.0",
|
||||
"tv4": "^1.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"chai": ">= 1.6.1 < 5"
|
||||
}
|
||||
},
|
||||
"node_modules/chalk": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
|
||||
@@ -3973,12 +3956,6 @@
|
||||
"graceful-fs": "^4.1.6"
|
||||
}
|
||||
},
|
||||
"node_modules/jsonpointer.js": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonpointer.js/-/jsonpointer.js-0.4.0.tgz",
|
||||
"integrity": "sha512-2bf/1crAmPpsmj1I6rDT6W0SOErkrNBpb555xNWcMVWYrX6VnXpG0GRMQ2shvOHwafpfse8q0gnzPFYVH6Tqdg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/just-extend": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/just-extend/-/just-extend-6.2.0.tgz",
|
||||
@@ -6473,15 +6450,6 @@
|
||||
"node": ">=0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/tv4": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/tv4/-/tv4-1.3.0.tgz",
|
||||
"integrity": "sha512-afizzfpJgvPr+eDkREK4MxJ/+r8nEEHcmitwgnPUqpaP+FpwQyadnxNoSACbgc/b1LsZYtODGoPiFxQrgJgjvw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/type-detect": {
|
||||
"version": "4.0.8",
|
||||
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
|
||||
@@ -8345,16 +8313,6 @@
|
||||
"type-detect": "^4.0.5"
|
||||
}
|
||||
},
|
||||
"chai-json-schema": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/chai-json-schema/-/chai-json-schema-1.5.1.tgz",
|
||||
"integrity": "sha512-TR/xPDxRhqwFFCWg1HgL8nNWbpNfUwaib6pBN++QKpnd0t+o3+MBvAn5CM1mpdUMaM76oJAtUjGKdjGad01lIA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"jsonpointer.js": "0.4.0",
|
||||
"tv4": "^1.3.0"
|
||||
}
|
||||
},
|
||||
"chalk": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
|
||||
@@ -10141,12 +10099,6 @@
|
||||
"graceful-fs": "^4.1.6"
|
||||
}
|
||||
},
|
||||
"jsonpointer.js": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonpointer.js/-/jsonpointer.js-0.4.0.tgz",
|
||||
"integrity": "sha512-2bf/1crAmPpsmj1I6rDT6W0SOErkrNBpb555xNWcMVWYrX6VnXpG0GRMQ2shvOHwafpfse8q0gnzPFYVH6Tqdg==",
|
||||
"dev": true
|
||||
},
|
||||
"just-extend": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/just-extend/-/just-extend-6.2.0.tgz",
|
||||
@@ -11991,12 +11943,6 @@
|
||||
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
|
||||
"dev": true
|
||||
},
|
||||
"tv4": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/tv4/-/tv4-1.3.0.tgz",
|
||||
"integrity": "sha512-afizzfpJgvPr+eDkREK4MxJ/+r8nEEHcmitwgnPUqpaP+FpwQyadnxNoSACbgc/b1LsZYtODGoPiFxQrgJgjvw==",
|
||||
"dev": true
|
||||
},
|
||||
"type-detect": {
|
||||
"version": "4.0.8",
|
||||
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
"babel-plugin-jsm-to-esmodules": "0.6.0",
|
||||
"buffer": "6.0.3",
|
||||
"chai": "4.3.4",
|
||||
"chai-json-schema": "1.5.1",
|
||||
"enzyme": "3.11.0",
|
||||
"enzyme-adapter-react-16": "1.15.6",
|
||||
"joi-browser": "13.4.0",
|
||||
|
||||
@@ -8,9 +8,7 @@ import {
|
||||
} from "test/unit/utils";
|
||||
import Adapter from "enzyme-adapter-react-16";
|
||||
import { chaiAssertions } from "test/schemas/pings";
|
||||
import chaiJsonSchema from "chai-json-schema";
|
||||
import enzyme from "enzyme";
|
||||
import FxMSCommonSchema from "../../content-src/asrouter/schemas/FxMSCommon.schema.json";
|
||||
|
||||
enzyme.configure({ adapter: new Adapter() });
|
||||
|
||||
@@ -35,8 +33,6 @@ const files = req.keys();
|
||||
sinon.assert.expose(assert, { prefix: "" });
|
||||
|
||||
chai.use(chaiAssertions);
|
||||
chai.use(chaiJsonSchema);
|
||||
chai.tv4.addSchema("file:///FxMSCommon.schema.json", FxMSCommonSchema);
|
||||
|
||||
const overrider = new GlobalOverrider();
|
||||
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
* the default URL values.
|
||||
*/
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
[DEFAULT]
|
||||
head = "head.js"
|
||||
firefox-appdir = "browser"
|
||||
skip-if = ["os == 'android'"] # bug 1730213
|
||||
prefs = [
|
||||
@@ -28,26 +27,12 @@ skip-if = ["socketprocess_networking"] # Bug 1759035
|
||||
|
||||
["test_AboutWelcomeTelemetry_glean.js"]
|
||||
|
||||
["test_CFRMessageProvider.js"]
|
||||
|
||||
["test_HighlightsFeed.js"]
|
||||
|
||||
["test_InflightAssetsMessageProvider.js"]
|
||||
|
||||
["test_NimbusRolloutMessageProvider.js"]
|
||||
|
||||
["test_OnboardingMessageProvider.js"]
|
||||
|
||||
["test_PanelTestProvider.js"]
|
||||
|
||||
["test_PlacesFeed.js"]
|
||||
|
||||
["test_TopSitesFeed_glean.js"]
|
||||
|
||||
["test_reach_experiments.js"]
|
||||
|
||||
["test_remoteExperiments.js"]
|
||||
|
||||
["test_Store.js"]
|
||||
|
||||
["test_TelemetryFeed.js"]
|
||||
|
||||
@@ -977,8 +977,8 @@ cfr:
|
||||
hasExposure: true
|
||||
exposureDescription: "Exposure is sent if the message is about to be shown after trigger and targeting conditions on the message matched."
|
||||
schema:
|
||||
uri: "resource://activity-stream/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/newtab/content-src/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
uri: "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/asrouter/content-src/schemas/MessagingExperiment.schema.json"
|
||||
variables: {}
|
||||
|
||||
"moments-page":
|
||||
@@ -988,8 +988,8 @@ cfr:
|
||||
exposureDescription: >-
|
||||
"Exposure is sent if the message is about to be shown after trigger and targeting conditions on the message matched."
|
||||
schema:
|
||||
uri: "resource://activity-stream/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/newtab/content-src/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
uri: "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/asrouter/content-src/schemas/MessagingExperiment.schema.json"
|
||||
variables: {}
|
||||
|
||||
infobar:
|
||||
@@ -999,8 +999,8 @@ infobar:
|
||||
exposureDescription: >-
|
||||
"Exposure is sent if the message is about to be shown after trigger and targeting conditions on the message matched."
|
||||
schema:
|
||||
uri: "resource://activity-stream/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/newtab/content-src/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
uri: "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/asrouter/content-src/schemas/MessagingExperiment.schema.json"
|
||||
variables: {}
|
||||
|
||||
spotlight:
|
||||
@@ -1010,8 +1010,8 @@ spotlight:
|
||||
exposureDescription: >-
|
||||
"Exposure is sent if the message is about to be shown after trigger and targeting conditions on the message matched."
|
||||
schema:
|
||||
uri: "resource://activity-stream/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/newtab/content-src/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
uri: "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/asrouter/content-src/schemas/MessagingExperiment.schema.json"
|
||||
variables: {}
|
||||
|
||||
# Before 117, this feature only included one variable, pdfJsTourProgress. So,
|
||||
@@ -1023,8 +1023,8 @@ featureCallout:
|
||||
exposureDescription: >-
|
||||
"Exposure is sent if the message is about to be shown after trigger and targeting conditions on the message matched."
|
||||
schema:
|
||||
uri: "resource://activity-stream/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/newtab/content-src/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
uri: "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/asrouter/content-src/schemas/MessagingExperiment.schema.json"
|
||||
variables: {}
|
||||
|
||||
fullPageTranslation:
|
||||
@@ -1085,8 +1085,8 @@ fxms-message-1:
|
||||
exposureDescription: >-
|
||||
"Exposure is sent if the message is about to be shown after trigger and targeting conditions on the message matched."
|
||||
schema:
|
||||
uri: "resource://activity-stream/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/newtab/content-src/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
uri: "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/asrouter/content-src/schemas/MessagingExperiment.schema.json"
|
||||
variables: {}
|
||||
|
||||
fxms-message-2:
|
||||
@@ -1096,8 +1096,8 @@ fxms-message-2:
|
||||
exposureDescription: >-
|
||||
"Exposure is sent if the message is about to be shown after trigger and targeting conditions on the message matched."
|
||||
schema:
|
||||
uri: "resource://activity-stream/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/newtab/content-src/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
uri: "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/asrouter/content-src/schemas/MessagingExperiment.schema.json"
|
||||
variables: {}
|
||||
|
||||
fxms-message-3:
|
||||
@@ -1107,8 +1107,8 @@ fxms-message-3:
|
||||
exposureDescription: >-
|
||||
"Exposure is sent if the message is about to be shown after trigger and targeting conditions on the message matched."
|
||||
schema:
|
||||
uri: "resource://activity-stream/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/newtab/content-src/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
uri: "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/asrouter/content-src/schemas/MessagingExperiment.schema.json"
|
||||
variables: {}
|
||||
|
||||
fxms-message-4:
|
||||
@@ -1118,8 +1118,8 @@ fxms-message-4:
|
||||
exposureDescription: >-
|
||||
"Exposure is sent if the message is about to be shown after trigger and targeting conditions on the message matched."
|
||||
schema:
|
||||
uri: "resource://activity-stream/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/newtab/content-src/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
uri: "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/asrouter/content-src/schemas/MessagingExperiment.schema.json"
|
||||
variables: {}
|
||||
|
||||
fxms-message-5:
|
||||
@@ -1129,8 +1129,8 @@ fxms-message-5:
|
||||
exposureDescription: >-
|
||||
"Exposure is sent if the message is about to be shown after trigger and targeting conditions on the message matched."
|
||||
schema:
|
||||
uri: "resource://activity-stream/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/newtab/content-src/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
uri: "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/asrouter/content-src/schemas/MessagingExperiment.schema.json"
|
||||
variables: {}
|
||||
|
||||
fxms-message-6:
|
||||
@@ -1140,8 +1140,8 @@ fxms-message-6:
|
||||
exposureDescription: >-
|
||||
"Exposure is sent if the message is about to be shown after trigger and targeting conditions on the message matched."
|
||||
schema:
|
||||
uri: "resource://activity-stream/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/newtab/content-src/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
uri: "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/asrouter/content-src/schemas/MessagingExperiment.schema.json"
|
||||
variables: {}
|
||||
|
||||
fxms-message-7:
|
||||
@@ -1151,8 +1151,8 @@ fxms-message-7:
|
||||
exposureDescription: >-
|
||||
"Exposure is sent if the message is about to be shown after trigger and targeting conditions on the message matched."
|
||||
schema:
|
||||
uri: "resource://activity-stream/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/newtab/content-src/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
uri: "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/asrouter/content-src/schemas/MessagingExperiment.schema.json"
|
||||
variables: {}
|
||||
|
||||
fxms-message-8:
|
||||
@@ -1162,8 +1162,8 @@ fxms-message-8:
|
||||
exposureDescription: >-
|
||||
"Exposure is sent if the message is about to be shown after trigger and targeting conditions on the message matched."
|
||||
schema:
|
||||
uri: "resource://activity-stream/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/newtab/content-src/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
uri: "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/asrouter/content-src/schemas/MessagingExperiment.schema.json"
|
||||
variables: {}
|
||||
|
||||
fxms-message-9:
|
||||
@@ -1173,8 +1173,8 @@ fxms-message-9:
|
||||
exposureDescription: >-
|
||||
"Exposure is sent if the message is about to be shown after trigger and targeting conditions on the message matched."
|
||||
schema:
|
||||
uri: "resource://activity-stream/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/newtab/content-src/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
uri: "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/asrouter/content-src/schemas/MessagingExperiment.schema.json"
|
||||
variables: {}
|
||||
|
||||
fxms-message-10:
|
||||
@@ -1184,8 +1184,8 @@ fxms-message-10:
|
||||
exposureDescription: >-
|
||||
"Exposure is sent if the message is about to be shown after trigger and targeting conditions on the message matched."
|
||||
schema:
|
||||
uri: "resource://activity-stream/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/newtab/content-src/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
uri: "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/asrouter/content-src/schemas/MessagingExperiment.schema.json"
|
||||
variables: {}
|
||||
|
||||
fxms-message-11:
|
||||
@@ -1195,8 +1195,8 @@ fxms-message-11:
|
||||
exposureDescription: >-
|
||||
"Exposure is sent if the message is about to be shown after trigger and targeting conditions on the message matched."
|
||||
schema:
|
||||
uri: "resource://activity-stream/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/newtab/content-src/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
uri: "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/asrouter/content-src/schemas/MessagingExperiment.schema.json"
|
||||
variables: {}
|
||||
|
||||
pbNewtab:
|
||||
@@ -1206,8 +1206,8 @@ pbNewtab:
|
||||
exposureDescription: >-
|
||||
Exposure is sent if the message is about to be shown after trigger and targeting conditions on the message matched.
|
||||
schema:
|
||||
uri: "resource://activity-stream/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/newtab/content-src/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
uri: "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json"
|
||||
path: "browser/components/asrouter/content-src/schemas/MessagingExperiment.schema.json"
|
||||
variables: {}
|
||||
|
||||
backgroundTaskMessage:
|
||||
@@ -1219,8 +1219,8 @@ backgroundTaskMessage:
|
||||
exposureDescription: >-
|
||||
Exposure is sent if the message is about to be shown after trigger and targeting conditions on the message matched.
|
||||
schema:
|
||||
uri: "resource://activity-stream/schemas/BackgroundTaskMessagingExperiment.schema.json"
|
||||
path: "browser/components/newtab/content-src/asrouter/schemas/BackgroundTaskMessagingExperiment.schema.json"
|
||||
uri: "chrome://browser/content/asrouter/schemas/BackgroundTaskMessagingExperiment.schema.json"
|
||||
path: "browser/components/asrouter/content-src/schemas/BackgroundTaskMessagingExperiment.schema.json"
|
||||
variables: {}
|
||||
|
||||
backgroundUpdateAutomaticRestart:
|
||||
|
||||
Reference in New Issue
Block a user