PanelTestProvider.sys.mjs (93411B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 // We use importESModule here instead of static import so that 6 // the Karma test environment won't choke on this module. This 7 // is because the Karma test environment already stubs out 8 // AppConstants, and overrides importESModule to be a no-op (which 9 // can't be done for a static import statement). 10 11 // eslint-disable-next-line mozilla/use-static-import 12 const { AppConstants } = ChromeUtils.importESModule( 13 "resource://gre/modules/AppConstants.sys.mjs" 14 ); 15 16 const TWO_DAYS = 2 * 24 * 3600 * 1000; 17 const isMSIX = 18 AppConstants.platform === "win" && 19 Services.sysinfo.getProperty("hasWinPackageId", false); 20 21 const MESSAGES = () => [ 22 { 23 id: "TEST_BACKUP_SPOTLIGHT", 24 groups: [], 25 targeting: true, 26 trigger: { 27 id: "defaultBrowserCheck", 28 }, 29 template: "spotlight", 30 profileScope: "single", 31 frequency: { 32 lifetime: 100, 33 }, 34 content: { 35 id: "TEST_BACKUP_SPOTLIGHT", 36 template: "multistage", 37 modal: "tab", 38 transitions: true, 39 screens: [ 40 { 41 id: "SCREEN_1", 42 force_hide_steps_indicator: true, 43 content: { 44 position: "center", 45 screen_style: { 46 width: "650px", 47 height: "500px", 48 }, 49 split_content_padding_block: "32px", 50 title: { 51 string_id: "create-backup-screen-1-title", 52 letterSpacing: "revert", 53 whiteSpace: "preserve-breaks", 54 lineHeight: "28px", 55 marginBlock: "0", 56 }, 57 subtitle: { 58 string_id: "create-backup-screen-1-subtitle", 59 fontSize: "0.8125em", 60 letterSpacing: "revert", 61 marginBlock: "12px 0", 62 }, 63 cta_paragraph: { 64 text: { 65 string_id: "create-backup-learn-more-link", 66 string_name: "learn-more-label", 67 fontSize: "0.8125em", 68 }, 69 style: { 70 marginBlock: "0", 71 lineHeight: "100%", 72 letterSpacing: "revert", 73 }, 74 action: { 75 type: "OPEN_URL", 76 data: { 77 args: "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/firefox-backup?utm_medium=firefox-desktop&utm_source=spotlight&utm_campaign=fx-backup-onboarding&utm_content=backup-turn-on-scheduled-learn-more-link&utm_term=fx-backup-onboarding-spotlight-1", 78 where: "tabshifted", 79 }, 80 }, 81 }, 82 tiles: { 83 type: "single-select", 84 autoTrigger: false, 85 selected: "sync", 86 action: { 87 picker: "<event>", 88 }, 89 data: [ 90 { 91 inert: true, 92 type: "backup", 93 icon: { 94 background: 95 "center / contain no-repeat url('https://firefox-settings-attachments.cdn.mozilla.net/main-workspace/ms-images/733144c8-a453-49eb-aff7-27a10786fbc1.svg')", 96 width: "133.9601px", 97 height: "90.1186px", 98 marginBlockStart: "8px", 99 borderRadius: "5px", 100 }, 101 id: "sync", 102 flair: { 103 centered: true, 104 text: { 105 string_id: "create-backup-screen-1-flair", 106 fontSize: "0.625em", 107 fontWeight: "600", 108 top: "revert", 109 lineHeight: "normal", 110 }, 111 }, 112 label: { 113 string_id: "create-backup-screen-1-sync-label", 114 fontSize: 17, 115 fontWeight: 600, 116 }, 117 body: { 118 string_id: "create-backup-screen-1-sync-body", 119 fontSize: "0.625em", 120 fontWeight: "400", 121 marginBlock: "-6px 16px", 122 color: "var(--text-color-deemphasized)", 123 }, 124 tilebutton: { 125 label: { 126 string_id: "create-backup-select-tile-button-label", 127 minHeight: "24px", 128 minWidth: "revert", 129 lineHeight: "100%", 130 paddingBlock: "4px", 131 paddingInline: "16px", 132 marginBlock: "0 16px", 133 }, 134 style: "primary", 135 action: { 136 type: "FXA_SIGNIN_FLOW", 137 dismiss: "actionResult", 138 needsAwait: true, 139 data: { 140 autoClose: false, 141 entrypoint: "spotlight-create-backup", 142 extraParams: { 143 service: "sync", 144 entrypoint_experiment: "fx-backup-onboarding", 145 entrypoint_variation: "1", 146 utm_medium: "firefox-desktop", 147 utm_source: "spotlight", 148 utm_campaign: "fx-backup-onboarding", 149 utm_term: "fx-backup-onboarding-spotlight-1", 150 }, 151 }, 152 }, 153 }, 154 }, 155 { 156 inert: true, 157 type: "backup", 158 icon: { 159 background: 160 "center / contain no-repeat url('https://firefox-settings-attachments.cdn.mozilla.net/main-workspace/ms-images/112b3d3c-5f6b-42c1-b56b-c70b08a6e4ad.svg')", 161 width: "114.475px", 162 height: "90.1186px", 163 marginBlockStart: "8px", 164 borderRadius: "5px", 165 }, 166 id: "backup", 167 flair: { 168 centered: true, 169 spacer: true, 170 }, 171 label: { 172 string_id: "create-backup-screen-1-backup-label", 173 fontSize: 17, 174 fontWeight: 600, 175 }, 176 body: { 177 string_id: "create-backup-screen-1-backup-body", 178 fontSize: "0.625em", 179 fontWeight: "400", 180 marginBlock: "-6px 16px", 181 color: "var(--text-color-deemphasized)", 182 }, 183 tilebutton: { 184 label: { 185 string_id: "create-backup-select-tile-button-label", 186 minHeight: "24px", 187 minWidth: "revert", 188 lineHeight: "100%", 189 paddingBlock: "4px", 190 paddingInline: "16px", 191 marginBlock: "0 16px", 192 }, 193 style: "secondary", 194 action: { 195 navigate: true, 196 }, 197 }, 198 }, 199 ], 200 }, 201 additional_button: { 202 label: { 203 string_id: "fx-view-discoverability-secondary-button-label", 204 fontSize: "0.75em", 205 minHeight: "24px", 206 minWidth: "revert", 207 lineHeight: "100%", 208 paddingBlock: "4px", 209 paddingInline: "12px", 210 }, 211 style: "secondary", 212 flow: "row", 213 action: { 214 type: "BLOCK_MESSAGE", 215 data: { 216 id: "TEST_BACKUP_SPOTLIGHT", 217 }, 218 dismiss: true, 219 }, 220 }, 221 submenu_button: { 222 label: { 223 minHeight: "24px", 224 minWidth: "24px", 225 paddingBlock: "0", 226 paddingInline: "0", 227 }, 228 submenu: [ 229 { 230 type: "action", 231 label: { string_id: "create-backup-show-fewer" }, 232 action: { 233 type: "MULTI_ACTION", 234 dismiss: true, 235 data: { 236 actions: [ 237 { 238 type: "SET_PREF", 239 data: { 240 pref: { 241 name: "messaging-system-action.show-fewer-backup-messages", 242 value: true, 243 }, 244 }, 245 }, 246 { 247 type: "BLOCK_MESSAGE", 248 data: { 249 id: "TEST_BACKUP_SPOTLIGHT", 250 }, 251 }, 252 ], 253 }, 254 }, 255 id: "show_fewer_recommendations", 256 }, 257 ], 258 attached_to: "additional_button", 259 }, 260 }, 261 }, 262 { 263 id: "SCREEN_2", 264 force_hide_steps_indicator: true, 265 content: { 266 position: "center", 267 screen_style: { 268 width: "650px", 269 height: "560px", 270 }, 271 split_content_padding_block: "32px", 272 title: { 273 string_id: "create-backup-screen-2-title", 274 letterSpacing: "revert", 275 lineHeight: "28px", 276 marginBlock: "0", 277 }, 278 subtitle: { 279 string_id: "create-backup-screen-2-subtitle", 280 fontSize: "0.8125em", 281 letterSpacing: "revert", 282 marginBlock: "8px 0", 283 }, 284 tiles: { 285 type: "single-select", 286 selected: "all", 287 action: { 288 picker: "<event>", 289 }, 290 data: [ 291 { 292 inert: true, 293 type: "backup", 294 icon: { 295 background: 296 "center / contain no-repeat url('https://firefox-settings-attachments.cdn.mozilla.net/main-workspace/ms-images/1741e2ae-2423-4b74-9f3b-b22dcd48d3b3.svg')", 297 width: "54px", 298 height: "54px", 299 marginBlockStart: "22px", 300 borderRadius: "5px", 301 }, 302 id: "easy", 303 label: { 304 string_id: "create-backup-screen-2-easy-label", 305 fontSize: 17, 306 fontWeight: 600, 307 marginBlock: "3px 10px", 308 }, 309 body: { 310 items: [ 311 { 312 icon: { 313 background: 314 "center / contain no-repeat url('chrome://browser/content/asrouter/assets/checkmark-16.svg')", 315 height: "18px", 316 width: "18px", 317 }, 318 text: { 319 string_id: "create-backup-screen-2-easy-list-1", 320 marginBlock: "4px", 321 fontSize: "13px", 322 }, 323 }, 324 { 325 icon: { 326 background: 327 "center / contain no-repeat url('chrome://browser/content/asrouter/assets/close-16.svg')", 328 height: "18px", 329 width: "18px", 330 }, 331 text: { 332 string_id: "create-backup-screen-2-easy-list-2", 333 marginBlock: "4px", 334 fontSize: "13px", 335 }, 336 }, 337 { 338 icon: { 339 background: 340 "center / contain no-repeat url('chrome://browser/content/asrouter/assets/close-16.svg')", 341 height: "18px", 342 width: "18px", 343 }, 344 text: { 345 string_id: "create-backup-screen-2-easy-list-3", 346 marginBlock: "4px", 347 fontSize: "13px", 348 fontWeight: "600", 349 }, 350 }, 351 ], 352 }, 353 tilebutton: { 354 label: { 355 string_id: "create-backup-select-tile-button-label", 356 minHeight: "24px", 357 minWidth: "revert", 358 lineHeight: "100%", 359 paddingBlock: "4px", 360 paddingInline: "16px", 361 marginBlock: "0 16px", 362 }, 363 style: "primary", 364 action: { 365 type: "SET_PREF", 366 navigate: true, 367 data: { 368 pref: { 369 name: "messaging-system-action.backupChooser", 370 value: "easy", 371 }, 372 }, 373 }, 374 }, 375 }, 376 { 377 inert: true, 378 type: "backup", 379 icon: { 380 background: 381 "center / contain no-repeat url('https://firefox-settings-attachments.cdn.mozilla.net/main-workspace/ms-images/0ddfd632-b9c4-45d6-86c3-b89f94797110.svg')", 382 width: "54px", 383 height: "54px", 384 marginBlockStart: "22px", 385 borderRadius: "5px", 386 }, 387 id: "all", 388 label: { 389 string_id: "create-backup-screen-2-all-label", 390 fontSize: 17, 391 fontWeight: 600, 392 marginBlock: "3px 10px", 393 }, 394 body: { 395 items: [ 396 { 397 icon: { 398 background: 399 "center / contain no-repeat url('chrome://browser/content/asrouter/assets/checkmark-16.svg')", 400 height: "18px", 401 width: "18px", 402 }, 403 text: { 404 string_id: "create-backup-screen-2-easy-list-1", 405 marginBlock: "4px", 406 fontSize: "13px", 407 }, 408 }, 409 { 410 icon: { 411 background: 412 "center / contain no-repeat url('chrome://browser/content/asrouter/assets/checkmark-16.svg')", 413 height: "18px", 414 width: "18px", 415 }, 416 text: { 417 string_id: "create-backup-screen-2-all-list-2", 418 marginBlock: "4px", 419 fontSize: "13px", 420 }, 421 }, 422 { 423 icon: { 424 background: 425 "center / contain no-repeat url('chrome://browser/content/asrouter/assets/shield-checkmark-16.svg')", 426 height: "18px", 427 width: "18px", 428 }, 429 text: { 430 string_id: "create-backup-screen-2-all-list-3", 431 marginBlock: "4px", 432 fontSize: "13px", 433 fontWeight: 500, 434 }, 435 }, 436 ], 437 }, 438 tilebutton: { 439 label: { 440 string_id: "create-backup-select-tile-button-label", 441 minHeight: "24px", 442 minWidth: "revert", 443 lineHeight: "100%", 444 paddingBlock: "4px", 445 paddingInline: "16px", 446 marginBlock: "0 16px", 447 }, 448 marginBlock: "0 16px", 449 style: "primary", 450 action: { 451 type: "SET_PREF", 452 navigate: true, 453 data: { 454 pref: { 455 name: "messaging-system-action.backupChooser", 456 value: "full", 457 }, 458 }, 459 }, 460 }, 461 }, 462 ], 463 }, 464 additional_button: { 465 style: "secondary", 466 label: { 467 string_id: "create-backup-back-button-label", 468 fontSize: "0.75em", 469 minHeight: "24px", 470 minWidth: "revert", 471 lineHeight: "100%", 472 paddingBlock: "4px", 473 paddingInline: "12px", 474 }, 475 action: { 476 navigate: true, 477 goBack: true, 478 }, 479 }, 480 }, 481 }, 482 { 483 id: "SCREEN_3A", 484 force_hide_steps_indicator: true, 485 targeting: "!isEncryptedBackup", 486 content: { 487 logo: { 488 imageURL: 489 "https://firefox-settings-attachments.cdn.mozilla.net/main-workspace/ms-images/0706f067-eaf8-4537-a9e1-6098d990f511.svg", 490 height: "110px", 491 }, 492 title: { 493 raw: "Where do you want your backup saved?", 494 paddingBlock: "8px", 495 fontSize: "24px", 496 fontWeight: 600, 497 }, 498 isEncryptedBackup: false, 499 screen_style: { 500 width: "650px", 501 height: "560px", 502 }, 503 tiles: { 504 type: "fx_backup_file_path", 505 options: { 506 hide_password_input: true, 507 file_path_label: "fx-backup-opt-in-filepath-label", 508 turn_on_backup_header: "fx-backup-opt-in-header", 509 turn_on_backup_confirm_btn_label: 510 "fx-backup-opt-in-confirm-btn-label", 511 }, 512 }, 513 additional_button: { 514 style: "secondary", 515 label: { 516 raw: "Back", 517 fontSize: "0.75em", 518 minHeight: "24px", 519 minWidth: "revert", 520 lineHeight: "100%", 521 paddingBlock: "4px", 522 paddingInline: "12px", 523 }, 524 action: { 525 navigate: true, 526 goBack: true, 527 }, 528 }, 529 }, 530 }, 531 { 532 id: "SCREEN_3B", 533 force_hide_steps_indicator: true, 534 targeting: "isEncryptedBackup", 535 content: { 536 isEncryptedBackup: true, 537 logo: { 538 imageURL: 539 "https://firefox-settings-attachments.cdn.mozilla.net/main-workspace/ms-images/0706f067-eaf8-4537-a9e1-6098d990f511.svg", 540 height: "110px", 541 }, 542 title: { 543 raw: "Where do you want your backup saved?", 544 }, 545 screen_style: { 546 width: "650px", 547 height: "560px", 548 }, 549 tiles: { 550 type: "fx_backup_file_path", 551 options: { 552 hide_password_input: true, 553 hide_secondary_button: true, 554 file_path_label: "fx-backup-opt-in-filepath-label", 555 turn_on_backup_header: "fx-backup-opt-in-header", 556 turn_on_backup_confirm_btn_label: 557 "fx-backup-opt-in-confirm-btn-label", 558 }, 559 }, 560 additional_button: { 561 style: "secondary", 562 flow: "row", 563 label: { 564 raw: "Back", 565 fontSize: "0.75em", 566 minHeight: "24px", 567 minWidth: "revert", 568 lineHeight: "100%", 569 paddingBlock: "4px", 570 paddingInline: "12px", 571 }, 572 action: { 573 navigate: true, 574 goBack: true, 575 }, 576 }, 577 }, 578 }, 579 { 580 id: "FX_BACKUP_ENCRYPTION", 581 force_hide_steps_indicator: true, 582 targeting: "isEncryptedBackup", 583 content: { 584 isEncryptedBackup: true, 585 title: { 586 raw: "Create a backup file password", 587 }, 588 subtitle: { 589 raw: "Required to encrypt your data. Store it in a place you’ll remember.", 590 fontSize: "13px", 591 }, 592 screen_style: { 593 width: "664px", 594 height: "620px", 595 }, 596 logo: { 597 imageURL: 598 "https://firefox-settings-attachments.cdn.mozilla.net/main-workspace/ms-images/0fb332a4-6b15-4d6e-bbd5-0558ac3e004f.svg", 599 height: "130px", 600 }, 601 tiles: { 602 type: "fx_backup_password", 603 options: { 604 hide_secondary_button: true, 605 create_password_label: "fx-backup-opt-in-create-password-label", 606 turn_on_backup_confirm_btn_label: 607 "fx-backup-opt-in-confirm-btn-label", 608 }, 609 }, 610 additional_button: { 611 style: "secondary", 612 label: { 613 raw: "Back", 614 fontSize: "0.75em", 615 minHeight: "24px", 616 minWidth: "revert", 617 lineHeight: "100%", 618 paddingBlock: "4px", 619 paddingInline: "12px", 620 }, 621 action: { 622 navigate: true, 623 goBack: true, 624 }, 625 }, 626 }, 627 }, 628 { 629 id: "BACKUP_CONFIRMATION_SCREEN_EASY", 630 force_hide_steps_indicator: true, 631 targeting: "!isEncryptedBackup", 632 content: { 633 screen_style: { 634 width: "664px", 635 height: "620px", 636 }, 637 logo: { 638 imageURL: 639 "chrome://browser/content/asrouter/assets/fox-with-checkmark.svg", 640 height: "96px", 641 }, 642 title: { 643 string_id: "fx-backup-confirmation-screen-title", 644 }, 645 tiles: { 646 type: "confirmation-checklist", 647 data: { 648 inert: true, 649 style: { width: "500px" }, 650 items: [ 651 { 652 icon: { 653 background: 654 "center / contain no-repeat url('chrome://browser/content/asrouter/assets/checkmark-16.svg')", 655 height: "18px", 656 width: "18px", 657 }, 658 text: { 659 string_id: 660 "fx-backup-confirmation-screen-easy-setup-item-text-1", 661 }, 662 subtext: { 663 string_id: "fx-backup-confirmation-screen-item-subtext-1", 664 }, 665 link_keys: ["settings"], 666 }, 667 { 668 icon: { 669 background: 670 "center / contain no-repeat url('chrome://browser/content/asrouter/assets/checkmark-16.svg')", 671 height: "18px", 672 width: "18px", 673 }, 674 text: { 675 string_id: 676 "fx-backup-confirmation-screen-easy-setup-item-text-2", 677 }, 678 subtext: { 679 string_id: "fx-backup-confirmation-screen-item-subtext-2", 680 }, 681 }, 682 { 683 icon: { 684 background: 685 "center / contain no-repeat url('chrome://browser/content/asrouter/assets/subtract-16.svg')", 686 height: "18px", 687 width: "18px", 688 }, 689 text: { 690 string_id: 691 "fx-backup-confirmation-screen-easy-setup-item-text-3", 692 }, 693 subtext: { 694 string_id: 695 "fx-backup-confirmation-screen-easy-setup-item-subtext-3", 696 }, 697 link_keys: ["settings"], 698 }, 699 ], 700 }, 701 }, 702 settings: { 703 action: { 704 type: "OPEN_ABOUT_PAGE", 705 data: { 706 args: "preferences#sync-backup", 707 where: "tab", 708 }, 709 }, 710 }, 711 additional_button: { 712 label: { 713 string_id: "fx-backup-confirmation-screen-close-button", 714 }, 715 style: "secondary", 716 action: { dismiss: true }, 717 }, 718 }, 719 }, 720 { 721 id: "BACKUP_CONFIRMATION_SCREEN_ENCRYPTED", 722 force_hide_steps_indicator: true, 723 targeting: "isEncryptedBackup", 724 content: { 725 isEncryptedBackup: true, 726 screen_style: { 727 width: "664px", 728 height: "620px", 729 }, 730 logo: { 731 imageURL: 732 "chrome://browser/content/asrouter/assets/fox-with-checkmark.svg", 733 height: "96px", 734 }, 735 title: { 736 string_id: "fx-backup-confirmation-screen-title", 737 }, 738 tiles: { 739 type: "confirmation-checklist", 740 data: { 741 inert: true, 742 style: { width: "500px" }, 743 items: [ 744 { 745 icon: { 746 background: 747 "center / contain no-repeat url('chrome://browser/content/asrouter/assets/checkmark-16.svg')", 748 height: "18px", 749 width: "18px", 750 }, 751 text: { 752 string_id: 753 "fx-backup-confirmation-screen-all-data-item-text-1", 754 }, 755 subtext: { 756 string_id: "fx-backup-confirmation-screen-item-subtext-1", 757 }, 758 link_keys: ["settings"], 759 }, 760 { 761 icon: { 762 background: 763 "center / contain no-repeat url('chrome://browser/content/asrouter/assets/checkmark-16.svg')", 764 height: "18px", 765 width: "18px", 766 }, 767 text: { 768 string_id: 769 "fx-backup-confirmation-screen-all-data-item-text-2", 770 }, 771 subtext: { 772 string_id: "fx-backup-confirmation-screen-item-subtext-2", 773 }, 774 }, 775 { 776 icon: { 777 background: 778 "center / contain no-repeat url('chrome://browser/content/asrouter/assets/checkmark-16.svg')", 779 height: "18px", 780 width: "18px", 781 }, 782 text: { 783 string_id: 784 "fx-backup-confirmation-screen-all-data-item-text-3", 785 }, 786 }, 787 ], 788 }, 789 }, 790 settings: { 791 action: { 792 type: "OPEN_ABOUT_PAGE", 793 data: { 794 args: "preferences#sync-backup", 795 where: "tab", 796 }, 797 }, 798 }, 799 additional_button: { 800 label: { 801 string_id: "fx-backup-confirmation-screen-close-button", 802 }, 803 style: "secondary", 804 action: { dismiss: true }, 805 }, 806 }, 807 }, 808 ], 809 }, 810 provider: "panel_local_testing", 811 }, 812 { 813 id: "TASKBAR_TAB_TEST_CALLOUT", 814 template: "feature_callout", 815 groups: ["cfr"], 816 content: { 817 id: "TASKBAR_TAB_TEST_CALLOUT", 818 template: "multistage", 819 backdrop: "transparent", 820 transitions: false, 821 screens: [ 822 { 823 id: "TASKBAR_TAB_TEST_CALLOUT", 824 anchors: [ 825 { 826 selector: "#taskbar-tabs-button", 827 panel_position: { 828 anchor_attachment: "bottomcenter", 829 callout_attachment: "topright", 830 }, 831 }, 832 ], 833 content: { 834 position: "callout", 835 padding: 16, 836 width: "330px", 837 title_logo: { 838 imageURL: 839 "chrome://browser/content/asrouter/assets/smiling-fox-icon.svg", 840 width: "24px", 841 height: "24px", 842 marginInline: "0 16px", 843 alignment: "top", 844 }, 845 title: { 846 raw: "Taskbar tabs action test", 847 }, 848 primary_button: { 849 label: { 850 raw: "Create taskbar tab", 851 }, 852 action: { 853 type: "CREATE_TASKBAR_TAB", 854 }, 855 }, 856 dismiss_button: { 857 action: { 858 dismiss: true, 859 }, 860 background: true, 861 size: "small", 862 marginInline: "0 20px", 863 marginBlock: "20px 0", 864 }, 865 }, 866 }, 867 ], 868 }, 869 targeting: "visitsCount >= 1", 870 trigger: { 871 id: "openURL", 872 params: ["wikipedia.org", "www.wikipedia.org"], 873 }, 874 frequency: { 875 lifetime: 1, 876 }, 877 skip_in_tests: "it's not tested in automation", 878 }, 879 { 880 id: "FREQUENCY_CAP_CLEANUP_TEST", 881 profileScope: "single", 882 template: "feature_callout", 883 groups: [], 884 content: { 885 id: "FREQUENCY_CAP_CLEANUP_TEST", 886 padding: "16", 887 template: "multistage", 888 backdrop: "transparent", 889 transitions: false, 890 disableHistoryUpdates: true, 891 screens: [ 892 { 893 id: "FREQUENCY_CAP_CLEANUP_TEST", 894 anchors: [ 895 { 896 selector: "#fxa-toolbar-menu-button", 897 panel_position: { 898 anchor_attachment: "bottomcenter", 899 callout_attachment: "topright", 900 }, 901 }, 902 ], 903 content: { 904 position: "callout", 905 width: "400px", 906 padding: 16, 907 title: { 908 raw: "Frequency Cap Test", 909 }, 910 subtitle: { 911 raw: "This callout has a very short frequency cap.", 912 }, 913 additional_button: { 914 action: { 915 dismiss: true, 916 }, 917 label: { 918 string_id: "dismiss-button-label", 919 fontWeight: "590", 920 fontSize: "11px", 921 }, 922 style: "secondary", 923 }, 924 }, 925 }, 926 ], 927 }, 928 frequency: { 929 custom: [ 930 { 931 cap: 1, 932 period: 120000, 933 }, 934 ], 935 }, 936 trigger: { 937 id: "defaultBrowserCheck", 938 }, 939 targeting: 940 "(region in ['CA', 'US']) && previousSessionEnd && !willShowDefaultPrompt && !activeNotifications && userPrefs.cfrFeatures", 941 skip_in_tests: "it's not tested in automation", 942 }, 943 { 944 id: "CLOSE_TAB_GROUP_TEST_CALLOUT", 945 template: "feature_callout", 946 groups: ["cfr"], 947 content: { 948 id: "CLOSE_TAB_GROUP_TEST_CALLOUT", 949 template: "multistage", 950 backdrop: "transparent", 951 transitions: false, 952 screens: [ 953 { 954 id: "CLOSE_TAB_GROUP_TEST_CALLOUT", 955 anchors: [ 956 { 957 selector: "#alltabs-button", 958 panel_position: { 959 anchor_attachment: "bottomcenter", 960 callout_attachment: "topright", 961 }, 962 }, 963 ], 964 content: { 965 position: "callout", 966 padding: 16, 967 width: "330px", 968 title_logo: { 969 imageURL: 970 "chrome://browser/content/asrouter/assets/smiling-fox-icon.svg", 971 width: "24px", 972 height: "24px", 973 marginInline: "0 16px", 974 alignment: "top", 975 }, 976 title: { 977 raw: "If you close a tab group, you can reopen it here anytime.", 978 }, 979 primary_button: { 980 label: { 981 raw: "Got it", 982 }, 983 action: { 984 dismiss: true, 985 }, 986 }, 987 }, 988 }, 989 ], 990 }, 991 targeting: "tabGroupsClosedCount == 1", 992 trigger: { 993 id: "tabGroupClosed", 994 }, 995 frequency: { 996 lifetime: 1, 997 }, 998 }, 999 { 1000 id: "CONTENT_TILES_TEST", 1001 targeting: 'providerCohorts.panel_local_testing == "SHOW_TEST"', 1002 template: "spotlight", 1003 content: { 1004 template: "multistage", 1005 screens: [ 1006 { 1007 id: "SCREEN_1", 1008 content: { 1009 screen_style: { 1010 display: "block", 1011 padding: "20px 0 0 0", 1012 width: "560px", 1013 overflow: "auto", 1014 }, 1015 logo: { 1016 height: "40px", 1017 width: "40", 1018 }, 1019 title: { 1020 raw: "Content tiles test", 1021 }, 1022 subtitle: { 1023 raw: "Review the content below before continuing.", 1024 fontSize: "15px", 1025 }, 1026 tiles_header: { title: "Click to toggle content tiles." }, 1027 tiles: [ 1028 { 1029 type: "embedded_browser", 1030 header: { 1031 title: "Test title 1", 1032 subtitle: "Read more", 1033 }, 1034 data: { 1035 style: { 1036 width: "100%", 1037 height: "200px", 1038 }, 1039 url: "https://example.com", 1040 }, 1041 }, 1042 { 1043 type: "embedded_browser", 1044 header: { 1045 title: "Test Title 2", 1046 }, 1047 data: { 1048 style: { 1049 width: "100%", 1050 height: "200px", 1051 }, 1052 url: "https://example.com", 1053 }, 1054 }, 1055 { 1056 type: "multiselect", 1057 style: { marginBlock: "18px" }, 1058 data: [ 1059 { 1060 id: "checkbox-test-1", 1061 type: "checkbox", 1062 defaultValue: true, 1063 label: { 1064 raw: "Test option 1", 1065 }, 1066 description: { 1067 raw: "This is description text explaining text option 1. This pins to taskbar.", 1068 }, 1069 action: { 1070 type: "MULTI_ACTION", 1071 data: { 1072 orderedExecution: true, 1073 actions: [ 1074 { 1075 type: "SET_PREF", 1076 data: { 1077 pref: { 1078 name: "test-pref-1", 1079 value: true, 1080 }, 1081 }, 1082 }, 1083 { 1084 type: "PIN_FIREFOX_TO_TASKBAR", 1085 }, 1086 ], 1087 }, 1088 }, 1089 }, 1090 { 1091 id: "checkbox-test-2", 1092 type: "checkbox", 1093 defaultValue: false, 1094 label: { 1095 raw: "Test option 2", 1096 }, 1097 description: { 1098 raw: "This is description text explaining text option 2. This sets as default.", 1099 }, 1100 action: { 1101 type: "MULTI_ACTION", 1102 data: { 1103 orderedExecution: true, 1104 actions: [ 1105 { 1106 type: "SET_PREF", 1107 data: { 1108 pref: { 1109 name: "test-pref-2", 1110 value: true, 1111 }, 1112 }, 1113 }, 1114 { 1115 type: "SET_DEFAULT_BROWSER", 1116 }, 1117 ], 1118 }, 1119 }, 1120 }, 1121 ], 1122 }, 1123 ], 1124 action_buttons_above_content: true, 1125 primary_button: { 1126 label: { 1127 raw: "Continue", 1128 marginBlock: "30px 0", 1129 }, 1130 action: { 1131 type: "MULTI_ACTION", 1132 collectSelect: true, 1133 data: { 1134 orderedExecution: true, 1135 actions: [ 1136 { 1137 type: "SET_PREF", 1138 data: { 1139 pref: { 1140 name: "test-pref-3", 1141 value: true, 1142 }, 1143 }, 1144 }, 1145 ], 1146 }, 1147 dismiss: true, 1148 }, 1149 }, 1150 }, 1151 }, 1152 ], 1153 }, 1154 provider: "panel_local_testing", 1155 }, 1156 { 1157 id: "TAB_GROUP_TEST_CALLOUT_HORIZONTAL", 1158 template: "feature_callout", 1159 groups: ["cfr"], 1160 content: { 1161 id: "TAB_GROUP_TEST_CALLOUT_HORIZONTAL", 1162 template: "multistage", 1163 backdrop: "transparent", 1164 transitions: false, 1165 screens: [ 1166 { 1167 id: "TAB_GROUP_TEST_CALLOUT_HORIZONTAL", 1168 anchors: [ 1169 { 1170 selector: ".tab-content[selected]", 1171 panel_position: { 1172 anchor_attachment: "bottomcenter", 1173 callout_attachment: "topright", 1174 }, 1175 }, 1176 ], 1177 content: { 1178 position: "callout", 1179 width: "333px", 1180 padding: 16, 1181 logo: { 1182 imageURL: 1183 "chrome://browser/content/asrouter/assets/tabgroups/hort-animated-light.svg", 1184 darkModeImageURL: 1185 "chrome://browser/content/asrouter/assets/tabgroups/hort-animated-dark.svg", 1186 reducedMotionImageURL: 1187 "chrome://browser/content/asrouter/assets/tabgroups/hort-static-light.svg", 1188 darkModeReducedMotionImageURL: 1189 "chrome://browser/content/asrouter/assets/tabgroups/hort-static-dark.svg", 1190 height: "172px", 1191 width: "300px", 1192 }, 1193 title: { 1194 raw: "Try tab groups for less clutter, more focus", 1195 }, 1196 subtitle: { 1197 raw: "Organize your tabs by dragging one tab on top of another to create your first tab group.", 1198 }, 1199 primary_button: { 1200 label: { 1201 raw: "Got it", 1202 }, 1203 action: { 1204 dismiss: true, 1205 }, 1206 }, 1207 dismiss_button: { 1208 action: { 1209 dismiss: true, 1210 }, 1211 size: "small", 1212 marginInline: "0 20px", 1213 marginBlock: "20px 0", 1214 }, 1215 }, 1216 }, 1217 ], 1218 }, 1219 targeting: "tabsClosedCount >= 2 && currentTabsOpen >= 4", 1220 trigger: { 1221 id: "nthTabClosed", 1222 }, 1223 frequency: { 1224 lifetime: 1, 1225 }, 1226 }, 1227 { 1228 id: "TAB_GROUP_TEST_CALLOUT_VERTICAL", 1229 template: "feature_callout", 1230 groups: ["cfr"], 1231 content: { 1232 id: "TAB_GROUP_TEST_CALLOUT_VERTICAL", 1233 template: "multistage", 1234 backdrop: "transparent", 1235 transitions: false, 1236 screens: [ 1237 { 1238 id: "TAB_GROUP_TEST_CALLOUT_VERTICAL", 1239 anchors: [ 1240 { 1241 selector: ".tab-content[selected]", 1242 panel_position: { 1243 anchor_attachment: "rightcenter", 1244 callout_attachment: "topleft", 1245 }, 1246 }, 1247 ], 1248 content: { 1249 position: "callout", 1250 width: "333px", 1251 padding: 16, 1252 logo: { 1253 imageURL: 1254 "chrome://browser/content/asrouter/assets/tabgroups/vert-animated-light.svg", 1255 darkModeImageURL: 1256 "chrome://browser/content/asrouter/assets/tabgroups/vert-animated-dark.svg", 1257 reducedMotionImageURL: 1258 "chrome://browser/content/asrouter/assets/tabgroups/vert-static-light.svg", 1259 darkModeReducedMotionImageURL: 1260 "chrome://browser/content/asrouter/assets/tabgroups/vert-static-dark.svg", 1261 height: "172px", 1262 width: "300px", 1263 }, 1264 title: { 1265 raw: "Try tab groups for less clutter, more focus", 1266 }, 1267 subtitle: { 1268 raw: "Organize your tabs by dragging one tab on top of another to create your first tab group.", 1269 }, 1270 primary_button: { 1271 label: { 1272 raw: "Got it", 1273 }, 1274 action: { 1275 dismiss: true, 1276 }, 1277 }, 1278 dismiss_button: { 1279 action: { 1280 dismiss: true, 1281 }, 1282 size: "small", 1283 marginInline: "0 20px", 1284 marginBlock: "20px 0", 1285 }, 1286 }, 1287 }, 1288 ], 1289 }, 1290 targeting: "tabsClosedCount >= 2 && currentTabsOpen >= 4", 1291 trigger: { 1292 id: "nthTabClosed", 1293 }, 1294 frequency: { 1295 lifetime: 1, 1296 }, 1297 }, 1298 { 1299 id: "SET_DEFAULT_SPOTLIGHT_TEST", 1300 template: "spotlight", 1301 content: { 1302 template: "multistage", 1303 id: "SET_DEFAULT_SPOTLIGHT", 1304 screens: [ 1305 { 1306 id: "PROMPT_CLONE", 1307 content: { 1308 width: "377px", 1309 tiles: { 1310 type: "multiselect", 1311 style: { 1312 flexDirection: "column", 1313 alignItems: "flex-start", 1314 }, 1315 data: [ 1316 { 1317 id: "checkbox-dont-show-again", 1318 type: "checkbox", 1319 defaultValue: false, 1320 style: { 1321 alignItems: "center", 1322 }, 1323 label: { 1324 raw: "Don't show this message again", 1325 fontSize: "13px", 1326 }, 1327 icon: { 1328 style: { 1329 width: "16px", 1330 height: "16px", 1331 marginInline: "0 8px", 1332 }, 1333 }, 1334 action: { 1335 type: "SET_PREF", 1336 data: { 1337 pref: { 1338 name: "browser.shell.checkDefaultBrowser", 1339 value: false, 1340 }, 1341 }, 1342 }, 1343 }, 1344 ], 1345 }, 1346 isSystemPromptStyleSpotlight: true, 1347 title_logo: { 1348 imageURL: "chrome://browser/content/assets/focus-logo.svg", 1349 height: "16px", 1350 width: "16px", 1351 }, 1352 title: { 1353 fontSize: "13px", 1354 raw: "Make Nightly your default browser?", 1355 }, 1356 subtitle: { 1357 fontSize: "13px", 1358 raw: "Keep Nightly at your fingertips — make it your default browser and keep it in your Dock.", 1359 }, 1360 additional_button: { 1361 label: { 1362 raw: "Not now", 1363 }, 1364 style: "secondary", 1365 action: { 1366 type: "MULTI_ACTION", 1367 collectSelect: true, 1368 data: { 1369 actions: [], 1370 }, 1371 dismiss: true, 1372 }, 1373 }, 1374 primary_button: { 1375 label: { 1376 raw: "Set as primary browser", 1377 }, 1378 action: { 1379 type: "MULTI_ACTION", 1380 collectSelect: true, 1381 data: { 1382 actions: [ 1383 { 1384 type: "PIN_AND_DEFAULT", 1385 }, 1386 ], 1387 }, 1388 dismiss: true, 1389 }, 1390 }, 1391 }, 1392 }, 1393 ], 1394 }, 1395 }, 1396 { 1397 id: "NEW_PROFILE_SPOTLIGHT", 1398 groups: [], 1399 targeting: "canCreateSelectableProfiles && !hasSelectableProfiles", 1400 trigger: { 1401 id: "defaultBrowserCheck", 1402 }, 1403 template: "spotlight", 1404 content: { 1405 template: "multistage", 1406 modal: "tab", 1407 screens: [ 1408 { 1409 id: "SCREEN_1", 1410 content: { 1411 logo: { 1412 imageURL: 1413 "https://firefox-settings-attachments.cdn.mozilla.net/main-workspace/ms-images/a3c640c8-7594-4bb2-bc18-8b4744f3aaf2.gif", 1414 }, 1415 title: { 1416 raw: "Say hello to Firefox profiles", 1417 paddingBlock: "8px", 1418 }, 1419 subtitle: { 1420 raw: "Easily switch between browsing for work and fun. Profiles keep your browsing info, including search history and passwords, totally separate so you can stay organized.", 1421 }, 1422 dismiss_button: { 1423 action: { 1424 dismiss: true, 1425 }, 1426 }, 1427 primary_button: { 1428 label: "Create a profile", 1429 action: { 1430 navigate: true, 1431 type: "CREATE_NEW_SELECTABLE_PROFILE", 1432 }, 1433 }, 1434 secondary_button: { 1435 label: "Not now", 1436 action: { 1437 dismiss: true, 1438 }, 1439 }, 1440 }, 1441 }, 1442 ], 1443 transitions: true, 1444 }, 1445 }, 1446 { 1447 id: "WNP_THANK_YOU", 1448 template: "update_action", 1449 content: { 1450 action: { 1451 id: "moments-wnp", 1452 data: { 1453 url: "https://www.mozilla.org/%LOCALE%/etc/firefox/retention/thank-you-a/", 1454 expireDelta: TWO_DAYS, 1455 }, 1456 }, 1457 }, 1458 trigger: { id: "momentsUpdate" }, 1459 }, 1460 { 1461 id: "PERSONALIZED_CFR_MESSAGE", 1462 template: "cfr_doorhanger", 1463 groups: ["cfr"], 1464 content: { 1465 layout: "icon_and_message", 1466 category: "cfrFeatures", 1467 bucket_id: "PERSONALIZED_CFR_MESSAGE", 1468 notification_text: "Personalized CFR Recommendation", 1469 heading_text: { string_id: "cfr-doorhanger-bookmark-fxa-header" }, 1470 info_icon: { 1471 label: { 1472 attributes: { 1473 tooltiptext: { string_id: "cfr-doorhanger-fxa-close-btn-tooltip" }, 1474 }, 1475 }, 1476 sumo_path: "https://example.com", 1477 }, 1478 text: { string_id: "cfr-doorhanger-bookmark-fxa-body-2" }, 1479 icon: "chrome://branding/content/icon64.png", 1480 icon_class: "cfr-doorhanger-large-icon", 1481 persistent_doorhanger: true, 1482 buttons: { 1483 primary: { 1484 label: { string_id: "cfr-doorhanger-milestone-ok-button" }, 1485 action: { 1486 type: "OPEN_URL", 1487 data: { 1488 args: "https://send.firefox.com/login/?utm_source=activity-stream&entrypoint=activity-stream-cfr-pdf", 1489 where: "tabshifted", 1490 }, 1491 }, 1492 }, 1493 secondary: [ 1494 { 1495 label: { string_id: "cfr-doorhanger-extension-cancel-button" }, 1496 action: { type: "CANCEL" }, 1497 }, 1498 { 1499 label: { 1500 string_id: "cfr-doorhanger-extension-never-show-recommendation", 1501 }, 1502 }, 1503 { 1504 label: { 1505 string_id: "cfr-doorhanger-extension-manage-settings-button", 1506 }, 1507 action: { 1508 type: "OPEN_PREFERENCES_PAGE", 1509 data: { category: "general-cfrfeatures" }, 1510 }, 1511 }, 1512 ], 1513 }, 1514 }, 1515 targeting: "scores.PERSONALIZED_CFR_MESSAGE.score > scoreThreshold", 1516 trigger: { 1517 id: "openURL", 1518 patterns: ["*://*/*.pdf"], 1519 }, 1520 }, 1521 { 1522 id: "TEST_BMB_BUTTON", 1523 groups: [], 1524 template: "bookmarks_bar_button", 1525 content: { 1526 label: { 1527 raw: "Getting Started", 1528 tooltiptext: "Getting started with Firefox", 1529 }, 1530 logo: { 1531 imageURL: "chrome://browser/content/assets/focus-logo.svg", 1532 }, 1533 action: { 1534 type: "MULTI_ACTION", 1535 navigate: true, 1536 data: { 1537 actions: [ 1538 { 1539 type: "SET_PREF", 1540 data: { 1541 pref: { 1542 name: "testpref.test.test", 1543 value: true, 1544 }, 1545 }, 1546 }, 1547 { 1548 type: "OPEN_URL", 1549 data: { 1550 args: "https://www.mozilla.org", 1551 where: "tab", 1552 }, 1553 }, 1554 ], 1555 }, 1556 }, 1557 }, 1558 frequency: { lifetime: 100 }, 1559 trigger: { id: "defaultBrowserCheck" }, 1560 targeting: "true", 1561 }, 1562 { 1563 id: "MULTISTAGE_SPOTLIGHT_MESSAGE", 1564 groups: ["panel-test-provider"], 1565 template: "spotlight", 1566 content: { 1567 id: "MULTISTAGE_SPOTLIGHT_MESSAGE", 1568 template: "multistage", 1569 backdrop: "transparent", 1570 transitions: true, 1571 screens: [ 1572 { 1573 id: "AW_PIN_FIREFOX", 1574 content: { 1575 has_noodles: true, 1576 title: { 1577 string_id: "onboarding-easy-setup-security-and-privacy-title", 1578 }, 1579 logo: { 1580 imageURL: "chrome://browser/content/callout-tab-pickup.svg", 1581 darkModeImageURL: 1582 "chrome://browser/content/callout-tab-pickup-dark.svg", 1583 reducedMotionImageURL: 1584 "chrome://browser/content/callout-tab-pickup.svg", 1585 darkModeReducedMotionImageURL: 1586 "chrome://browser/content/callout-tab-pickup-dark.svg", 1587 alt: "sample alt text", 1588 }, 1589 hero_text: { 1590 string_id: "fx100-thank-you-hero-text", 1591 }, 1592 primary_button: { 1593 label: { 1594 string_id: isMSIX 1595 ? "mr2022-onboarding-pin-primary-button-label-msix" 1596 : "mr2022-onboarding-pin-primary-button-label", 1597 }, 1598 action: { 1599 type: "MULTI_ACTION", 1600 navigate: true, 1601 data: { 1602 actions: [ 1603 { 1604 type: "PIN_FIREFOX_TO_TASKBAR", 1605 }, 1606 { 1607 type: "PIN_FIREFOX_TO_START_MENU", 1608 }, 1609 ], 1610 }, 1611 }, 1612 }, 1613 secondary_button: { 1614 label: { 1615 string_id: "onboarding-not-now-button-label", 1616 }, 1617 action: { 1618 navigate: true, 1619 }, 1620 }, 1621 dismiss_button: { 1622 action: { 1623 dismiss: true, 1624 }, 1625 }, 1626 }, 1627 }, 1628 { 1629 id: "AW_SET_DEFAULT", 1630 content: { 1631 has_noodles: true, 1632 logo: { 1633 imageURL: "chrome://browser/content/logos/vpn-promo-logo.svg", 1634 height: "100px", 1635 }, 1636 title: { 1637 fontSize: "36px", 1638 fontWeight: 276, 1639 string_id: "mr2022-onboarding-set-default-title", 1640 }, 1641 subtitle: { 1642 string_id: "mr2022-onboarding-set-default-subtitle", 1643 }, 1644 primary_button: { 1645 label: { 1646 string_id: "mr2022-onboarding-set-default-primary-button-label", 1647 }, 1648 action: { 1649 navigate: true, 1650 type: "SET_DEFAULT_BROWSER", 1651 }, 1652 }, 1653 secondary_button: { 1654 label: { 1655 string_id: "onboarding-not-now-button-label", 1656 }, 1657 action: { 1658 navigate: true, 1659 }, 1660 }, 1661 }, 1662 }, 1663 { 1664 id: "BACKGROUND_IMAGE", 1665 content: { 1666 background: "#000", 1667 text_color: "light", 1668 progress_bar: true, 1669 logo: { 1670 imageURL: 1671 "https://firefox-settings-attachments.cdn.mozilla.net/main-workspace/ms-images/a3c640c8-7594-4bb2-bc18-8b4744f3aaf2.gif", 1672 }, 1673 title: "A dialog with a background", 1674 subtitle: 1675 "The text color is configurable and a progress bar style step indicator is used", 1676 primary_button: { 1677 label: "Continue", 1678 action: { 1679 navigate: true, 1680 }, 1681 }, 1682 secondary_button: { 1683 label: { 1684 string_id: "onboarding-not-now-button-label", 1685 }, 1686 action: { 1687 navigate: true, 1688 }, 1689 }, 1690 }, 1691 }, 1692 { 1693 id: "BACKGROUND_COLOR", 1694 content: { 1695 background: "white", 1696 progress_bar: true, 1697 logo: { 1698 height: "200px", 1699 imageURL: "", 1700 }, 1701 title: { 1702 fontSize: "36px", 1703 fontWeight: 276, 1704 raw: "Peace of mind.", 1705 }, 1706 title_style: "fancy shine", 1707 text_color: "dark", 1708 subtitle: "Using progress bar style step indicator", 1709 primary_button: { 1710 label: "Continue", 1711 action: { 1712 navigate: true, 1713 }, 1714 }, 1715 secondary_button: { 1716 label: { 1717 string_id: "onboarding-not-now-button-label", 1718 }, 1719 action: { 1720 navigate: true, 1721 }, 1722 }, 1723 }, 1724 }, 1725 ], 1726 }, 1727 frequency: { lifetime: 3 }, 1728 trigger: { id: "defaultBrowserCheck" }, 1729 }, 1730 { 1731 id: "PB_FOCUS_PROMO", 1732 groups: ["panel-test-provider"], 1733 template: "spotlight", 1734 content: { 1735 template: "multistage", 1736 backdrop: "transparent", 1737 screens: [ 1738 { 1739 id: "PBM_FIREFOX_FOCUS", 1740 order: 0, 1741 content: { 1742 logo: { 1743 imageURL: "chrome://browser/content/assets/focus-logo.svg", 1744 height: "48px", 1745 }, 1746 title: { 1747 string_id: "spotlight-focus-promo-title", 1748 }, 1749 subtitle: { 1750 string_id: "spotlight-focus-promo-subtitle", 1751 }, 1752 dismiss_button: { 1753 action: { 1754 dismiss: true, 1755 }, 1756 }, 1757 ios: { 1758 action: { 1759 data: { 1760 args: "https://app.adjust.com/167k4ih?campaign=firefox-desktop&adgroup=pb&creative=focus-omc172&redirect=https%3A%2F%2Fapps.apple.com%2Fus%2Fapp%2Ffirefox-focus-privacy-browser%2Fid1055677337", 1761 where: "tabshifted", 1762 }, 1763 type: "OPEN_URL", 1764 navigate: true, 1765 }, 1766 }, 1767 android: { 1768 action: { 1769 data: { 1770 args: "https://app.adjust.com/167k4ih?campaign=firefox-desktop&adgroup=pb&creative=focus-omc172&redirect=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dorg.mozilla.focus", 1771 where: "tabshifted", 1772 }, 1773 type: "OPEN_URL", 1774 navigate: true, 1775 }, 1776 }, 1777 email_link: { 1778 action: { 1779 data: { 1780 args: "https://mozilla.org", 1781 where: "tabshifted", 1782 }, 1783 type: "OPEN_URL", 1784 navigate: true, 1785 }, 1786 }, 1787 tiles: { 1788 type: "mobile_downloads", 1789 data: { 1790 QR_code: { 1791 image_url: 1792 "chrome://browser/content/assets/focus-qr-code.svg", 1793 alt_text: { 1794 string_id: "spotlight-focus-promo-qr-code", 1795 }, 1796 }, 1797 email: { 1798 link_text: "Email yourself a link", 1799 }, 1800 marketplace_buttons: ["ios", "android"], 1801 }, 1802 }, 1803 }, 1804 }, 1805 ], 1806 }, 1807 trigger: { id: "defaultBrowserCheck" }, 1808 }, 1809 { 1810 id: "PB_NEWTAB_VPN_PROMO", 1811 template: "pb_newtab", 1812 content: { 1813 promoEnabled: true, 1814 promoType: "VPN", 1815 infoEnabled: true, 1816 infoBody: "fluent:about-private-browsing-info-description-private-window", 1817 infoLinkText: "fluent:about-private-browsing-learn-more-link", 1818 infoTitleEnabled: false, 1819 promoLinkType: "button", 1820 promoLinkText: "fluent:about-private-browsing-prominent-cta", 1821 promoSectionStyle: "below-search", 1822 promoHeader: "fluent:about-private-browsing-get-privacy", 1823 promoTitle: "fluent:about-private-browsing-hide-activity-1", 1824 promoTitleEnabled: true, 1825 promoImageLarge: "chrome://browser/content/assets/moz-vpn.svg", 1826 promoButton: { 1827 action: { 1828 type: "OPEN_URL", 1829 data: { 1830 args: "https://vpn.mozilla.org/", 1831 }, 1832 }, 1833 }, 1834 }, 1835 groups: ["panel-test-provider", "pbNewtab"], 1836 targeting: "region != 'CN' && !hasActiveEnterprisePolicies", 1837 frequency: { lifetime: 3 }, 1838 }, 1839 { 1840 id: "PB_PIN_PROMO", 1841 template: "pb_newtab", 1842 groups: ["pbNewtab"], 1843 content: { 1844 infoBody: "fluent:about-private-browsing-info-description-simplified", 1845 infoEnabled: true, 1846 infoIcon: "chrome://global/skin/icons/indicator-private-browsing.svg", 1847 infoLinkText: "fluent:about-private-browsing-learn-more-link", 1848 infoTitle: "", 1849 infoTitleEnabled: false, 1850 promoEnabled: true, 1851 promoType: "PIN", 1852 promoHeader: "Private browsing freedom in one click", 1853 promoImageLarge: 1854 "chrome://browser/content/assets/private-promo-asset.svg", 1855 promoLinkText: "Pin To Taskbar", 1856 promoLinkType: "button", 1857 promoSectionStyle: "below-search", 1858 promoTitle: 1859 "No saved cookies or history, right from your desktop. Browse like no one’s watching.", 1860 promoTitleEnabled: true, 1861 promoButton: { 1862 action: { 1863 type: "MULTI_ACTION", 1864 data: { 1865 actions: [ 1866 { 1867 type: "SET_PREF", 1868 data: { 1869 pref: { 1870 name: "browser.privateWindowSeparation.enabled", 1871 value: true, 1872 }, 1873 }, 1874 }, 1875 { 1876 type: "PIN_FIREFOX_TO_TASKBAR", 1877 }, 1878 { 1879 type: "PIN_FIREFOX_TO_START_MENU", 1880 }, 1881 { 1882 type: "BLOCK_MESSAGE", 1883 data: { 1884 id: "PB_PIN_PROMO", 1885 }, 1886 }, 1887 { 1888 type: "OPEN_ABOUT_PAGE", 1889 data: { args: "privatebrowsing", where: "current" }, 1890 }, 1891 ], 1892 }, 1893 }, 1894 }, 1895 }, 1896 priority: 3, 1897 frequency: { 1898 custom: [ 1899 { 1900 cap: 3, 1901 period: 604800000, // Max 3 per week 1902 }, 1903 ], 1904 lifetime: 12, 1905 }, 1906 targeting: 1907 "region != 'CN' && !hasActiveEnterprisePolicies && doesAppNeedPin", 1908 }, 1909 { 1910 id: "TEST_TOAST_NOTIFICATION1", 1911 weight: 100, 1912 template: "toast_notification", 1913 content: { 1914 title: { 1915 string_id: "cfr-doorhanger-bookmark-fxa-header", 1916 }, 1917 body: "Body", 1918 image_url: 1919 "https://firefox-settings-attachments.cdn.mozilla.net/main-workspace/ms-images/a3c640c8-7594-4bb2-bc18-8b4744f3aaf2.gif", 1920 launch_url: "https://mozilla.org", 1921 requireInteraction: true, 1922 actions: [ 1923 { 1924 action: "dismiss", 1925 title: "Dismiss", 1926 windowsSystemActivationType: true, 1927 }, 1928 { 1929 action: "snooze", 1930 title: "Snooze", 1931 windowsSystemActivationType: true, 1932 }, 1933 { action: "callback", title: "Callback" }, 1934 ], 1935 tag: "test_toast_notification", 1936 }, 1937 groups: ["panel-test-provider"], 1938 targeting: "!hasActiveEnterprisePolicies", 1939 trigger: { id: "backgroundTaskMessage" }, 1940 frequency: { lifetime: 3 }, 1941 }, 1942 { 1943 id: "TEST_TOAST_NOTIFICATION2", 1944 weight: 100, 1945 template: "toast_notification", 1946 content: { 1947 title: "Launch action on toast click and on action button click", 1948 body: "Body", 1949 image_url: 1950 "https://firefox-settings-attachments.cdn.mozilla.net/main-workspace/ms-images/a3c640c8-7594-4bb2-bc18-8b4744f3aaf2.gif", 1951 launch_action: { 1952 type: "OPEN_URL", 1953 data: { args: "https://mozilla.org", where: "window" }, 1954 }, 1955 requireInteraction: true, 1956 actions: [ 1957 { 1958 action: "dismiss", 1959 title: "Dismiss", 1960 windowsSystemActivationType: true, 1961 }, 1962 { 1963 action: "snooze", 1964 title: "Snooze", 1965 windowsSystemActivationType: true, 1966 }, 1967 { 1968 action: "private", 1969 title: "Private Window", 1970 launch_action: { type: "OPEN_PRIVATE_BROWSER_WINDOW" }, 1971 }, 1972 ], 1973 tag: "test_toast_notification", 1974 }, 1975 groups: ["panel-test-provider"], 1976 targeting: "!hasActiveEnterprisePolicies", 1977 trigger: { id: "backgroundTaskMessage" }, 1978 frequency: { lifetime: 3 }, 1979 }, 1980 { 1981 id: "MR2022_BACKGROUND_UPDATE_TOAST_NOTIFICATION", 1982 weight: 100, 1983 template: "toast_notification", 1984 content: { 1985 title: { 1986 string_id: "mr2022-background-update-toast-title", 1987 }, 1988 body: { 1989 string_id: "mr2022-background-update-toast-text", 1990 }, 1991 image_url: 1992 "https://firefox-settings-attachments.cdn.mozilla.net/main-workspace/ms-images/673d2808-e5d8-41b9-957e-f60d53233b97.png", 1993 requireInteraction: true, 1994 actions: [ 1995 { 1996 action: "open", 1997 title: { 1998 string_id: "mr2022-background-update-toast-primary-button-label", 1999 }, 2000 }, 2001 { 2002 action: "snooze", 2003 windowsSystemActivationType: true, 2004 title: { 2005 string_id: "mr2022-background-update-toast-secondary-button-label", 2006 }, 2007 }, 2008 ], 2009 tag: "mr2022_background_update", 2010 }, 2011 groups: ["panel-test-provider"], 2012 targeting: "!hasActiveEnterprisePolicies", 2013 trigger: { id: "backgroundTaskMessage" }, 2014 frequency: { lifetime: 3 }, 2015 }, 2016 { 2017 id: "IMPORT_SETTINGS_EMBEDDED", 2018 groups: ["panel-test-provider"], 2019 template: "spotlight", 2020 content: { 2021 template: "multistage", 2022 backdrop: "transparent", 2023 screens: [ 2024 { 2025 id: "IMPORT_SETTINGS_EMBEDDED", 2026 content: { 2027 logo: {}, 2028 tiles: { type: "migration-wizard" }, 2029 progress_bar: true, 2030 migrate_start: { 2031 action: {}, 2032 }, 2033 migrate_close: { 2034 action: { 2035 navigate: true, 2036 }, 2037 }, 2038 secondary_button: { 2039 label: { 2040 string_id: "mr2022-onboarding-secondary-skip-button-label", 2041 }, 2042 action: { 2043 navigate: true, 2044 }, 2045 has_arrow_icon: true, 2046 }, 2047 }, 2048 }, 2049 ], 2050 }, 2051 }, 2052 { 2053 id: "TEST_FEATURE_TOUR", 2054 template: "feature_callout", 2055 groups: [], 2056 content: { 2057 id: "TEST_FEATURE_TOUR", 2058 template: "multistage", 2059 backdrop: "transparent", 2060 transitions: false, 2061 disableHistoryUpdates: true, 2062 screens: [ 2063 { 2064 id: "FEATURE_CALLOUT_1", 2065 anchors: [ 2066 { 2067 selector: "#PanelUI-menu-button", 2068 panel_position: { 2069 anchor_attachment: "bottomcenter", 2070 callout_attachment: "topright", 2071 }, 2072 }, 2073 ], 2074 content: { 2075 position: "callout", 2076 title: { raw: "Panel Feature Callout" }, 2077 subtitle: { raw: "Hello!" }, 2078 secondary_button: { 2079 label: { raw: "Advance" }, 2080 action: { advance_screens: { direction: 1 } }, 2081 }, 2082 submenu_button: { 2083 submenu: [ 2084 { 2085 type: "action", 2086 label: { raw: "Item 1" }, 2087 action: { advance_screens: { direction: 1 } }, 2088 id: "item1", 2089 }, 2090 { 2091 type: "action", 2092 label: { raw: "Item 2" }, 2093 action: { advance_screens: { direction: 1 } }, 2094 id: "item2", 2095 }, 2096 { 2097 type: "menu", 2098 label: { raw: "Menu 1" }, 2099 submenu: [ 2100 { 2101 type: "action", 2102 label: { raw: "Item 3" }, 2103 action: { 2104 advance_screens: { direction: 1 }, 2105 }, 2106 id: "item3", 2107 }, 2108 { 2109 type: "action", 2110 label: { raw: "Item 4" }, 2111 action: { 2112 advance_screens: { direction: 1 }, 2113 }, 2114 id: "item4", 2115 }, 2116 ], 2117 id: "menu1", 2118 }, 2119 ], 2120 attached_to: "secondary_button", 2121 }, 2122 dismiss_button: { action: { dismiss: true } }, 2123 }, 2124 }, 2125 { 2126 id: "FEATURE_CALLOUT_2", 2127 anchors: [ 2128 { 2129 selector: "#PanelUI-menu-button", 2130 panel_position: { 2131 anchor_attachment: "bottomcenter", 2132 callout_attachment: "topright", 2133 }, 2134 }, 2135 ], 2136 content: { 2137 position: "callout", 2138 title: { raw: "Panel Feature Callout 2" }, 2139 subtitle: { raw: "Hellossss!" }, 2140 secondary_button: { 2141 label: { raw: "Advance" }, 2142 action: { advance_screens: { direction: 1 } }, 2143 }, 2144 primary_button: { 2145 label: { raw: "Go back" }, 2146 style: "secondary", 2147 action: { advance_screens: { direction: -1 } }, 2148 }, 2149 submenu_button: { 2150 submenu: [ 2151 { 2152 type: "action", 2153 label: { raw: "Item 1" }, 2154 action: { advance_screens: { direction: 1 } }, 2155 id: "item1", 2156 }, 2157 { 2158 type: "action", 2159 label: { raw: "Item 2" }, 2160 action: { advance_screens: { direction: 1 } }, 2161 id: "item2", 2162 }, 2163 { 2164 type: "menu", 2165 label: { raw: "Menu 1" }, 2166 submenu: [ 2167 { 2168 type: "action", 2169 label: { raw: "Item 3" }, 2170 action: { 2171 advance_screens: { direction: 1 }, 2172 }, 2173 id: "item3", 2174 }, 2175 { 2176 type: "action", 2177 label: { raw: "Item 4" }, 2178 action: { 2179 advance_screens: { direction: 1 }, 2180 }, 2181 id: "item4", 2182 }, 2183 ], 2184 id: "menu1", 2185 }, 2186 ], 2187 attached_to: "secondary_button", 2188 }, 2189 dismiss_button: { action: { dismiss: true } }, 2190 }, 2191 }, 2192 { 2193 id: "FEATURE_CALLOUT_3", 2194 anchors: [ 2195 { 2196 selector: "#stop-reload-button", 2197 panel_position: { 2198 anchor_attachment: "bottomcenter", 2199 callout_attachment: "topleft", 2200 }, 2201 }, 2202 ], 2203 content: { 2204 position: "callout", 2205 title: { raw: "Panel Feature Callout" }, 2206 subtitle: { raw: "Screen 2!" }, 2207 secondary_button: { 2208 label: { raw: "Finish" }, 2209 style: "primary", 2210 action: { 2211 type: "MULTI_ACTION", 2212 collectSelect: true, 2213 dismiss: true, 2214 data: { actions: [] }, 2215 }, 2216 disabled: "hasActiveMultiSelect", 2217 }, 2218 primary_button: { 2219 label: { raw: "Go back" }, 2220 style: "secondary", 2221 action: { advance_screens: { direction: -1 } }, 2222 }, 2223 tiles: { 2224 type: "multiselect", 2225 style: { 2226 flexDirection: "column", 2227 alignItems: "flex-start", 2228 }, 2229 data: [ 2230 { 2231 id: "radio-choice-1", 2232 type: "radio", 2233 group: "radios", 2234 icon: { 2235 style: { 2236 width: "14px", 2237 height: "14px", 2238 marginInline: "0 0.5em", 2239 }, 2240 }, 2241 label: { raw: "Choice 1" }, 2242 }, 2243 { 2244 id: "radio-choice-2", 2245 type: "radio", 2246 group: "radios", 2247 icon: { 2248 style: { 2249 width: "14px", 2250 height: "14px", 2251 marginInline: "0 0.5em", 2252 }, 2253 }, 2254 label: { raw: "Choice 2" }, 2255 }, 2256 { 2257 id: "radio-choice-3", 2258 type: "radio", 2259 group: "radios", 2260 icon: { 2261 style: { 2262 width: "14px", 2263 height: "14px", 2264 marginInline: "0 0.5em", 2265 }, 2266 }, 2267 label: { raw: "Choice 3" }, 2268 }, 2269 { 2270 id: "radio-choice-4", 2271 type: "radio", 2272 group: "radios", 2273 icon: { 2274 style: { 2275 width: "14px", 2276 height: "14px", 2277 marginInline: "0 0.5em", 2278 }, 2279 }, 2280 label: { raw: "Choice 4" }, 2281 }, 2282 { 2283 id: "radio-choice-5", 2284 type: "radio", 2285 group: "radios", 2286 icon: { 2287 style: { 2288 width: "14px", 2289 height: "14px", 2290 marginInline: "0 0.5em", 2291 }, 2292 }, 2293 label: { raw: "Choice 5" }, 2294 }, 2295 { 2296 id: "radio-choice-6", 2297 type: "radio", 2298 group: "radios", 2299 icon: { 2300 style: { 2301 width: "14px", 2302 height: "14px", 2303 marginInline: "0 0.5em", 2304 }, 2305 }, 2306 label: { raw: "Choice 6" }, 2307 }, 2308 ], 2309 }, 2310 dismiss_button: { 2311 action: { dismiss: true }, 2312 }, 2313 }, 2314 }, 2315 ], 2316 }, 2317 }, 2318 { 2319 weight: 100, 2320 id: "TEST_MULTI_TILES_SURVEY", 2321 template: "feature_callout", 2322 groups: [], 2323 content: { 2324 id: "TEST_MULTI_TILES_SURVEY", 2325 template: "multistage", 2326 backdrop: "transparent", 2327 transitions: false, 2328 disableHistoryUpdates: true, 2329 screens: [ 2330 { 2331 id: "SCREEN_1", 2332 force_hide_steps_indicator: true, 2333 anchors: [ 2334 { 2335 selector: "hbox#browser", 2336 hide_arrow: true, 2337 absolute_position: { 2338 bottom: "20px", 2339 right: "20px", 2340 }, 2341 }, 2342 ], 2343 content: { 2344 position: "callout", 2345 title: { 2346 raw: "Test title", 2347 }, 2348 width: "297px", 2349 title_logo: { 2350 imageURL: 2351 "chrome://browser/content/asrouter/assets/smiling-fox-icon.svg", 2352 }, 2353 subtitle: { 2354 raw: "Answer two questions!", 2355 }, 2356 primary_button: { 2357 label: "Submit", 2358 action: { 2359 dismiss: true, 2360 }, 2361 }, 2362 dismiss_button: { 2363 action: { 2364 dismiss: true, 2365 }, 2366 }, 2367 tiles_container: { 2368 style: { 2369 marginBlock: "6px", 2370 }, 2371 }, 2372 tiles: [ 2373 { 2374 type: "multiselect", 2375 title: { 2376 raw: "Question 1", 2377 }, 2378 data: [ 2379 { 2380 id: "checkbox-1", 2381 defaultValue: false, 2382 label: { 2383 raw: "Checkbox 1", 2384 }, 2385 }, 2386 { 2387 id: "checkbox-2", 2388 defaultValue: false, 2389 label: { 2390 raw: "Checkbox 2", 2391 }, 2392 }, 2393 { 2394 id: "checkbox-3", 2395 defaultValue: false, 2396 label: { 2397 raw: "Checkbox 3", 2398 }, 2399 }, 2400 { 2401 id: "checkbox-4", 2402 defaultValue: false, 2403 label: { 2404 raw: "Checkbox 4", 2405 }, 2406 }, 2407 ], 2408 }, 2409 { 2410 type: "multiselect", 2411 title: { 2412 raw: "Question 2", 2413 }, 2414 data: [ 2415 { 2416 id: "checkbox-1", 2417 defaultValue: false, 2418 label: { 2419 raw: "Checkbox 1", 2420 }, 2421 }, 2422 { 2423 id: "checkbox-2", 2424 defaultValue: false, 2425 label: { 2426 raw: "Checkbox 2", 2427 }, 2428 }, 2429 ], 2430 }, 2431 ], 2432 }, 2433 }, 2434 ], 2435 }, 2436 }, 2437 { 2438 id: "EXPERIMENT_L10N_TEST", 2439 template: "feature_callout", 2440 description: 2441 "Test ASRouter support for flattening experiment-translated messages into plain English text. See bug 1899439.", 2442 content: { 2443 id: "EXPERIMENT_L10N_TEST", 2444 template: "multistage", 2445 backdrop: "transparent", 2446 transitions: false, 2447 disableHistoryUpdates: true, 2448 metrics: "block", 2449 screens: [ 2450 { 2451 id: "EXPERIMENT_L10N_TEST_1", 2452 anchors: [ 2453 { 2454 selector: "#PanelUI-menu-button", 2455 panel_position: { 2456 anchor_attachment: "bottomcenter", 2457 callout_attachment: "topright", 2458 }, 2459 }, 2460 ], 2461 content: { 2462 position: "callout", 2463 layout: "survey", 2464 width: "min-content", 2465 padding: "16", 2466 title: { 2467 raw: { 2468 $l10n: { 2469 id: "question-title", 2470 text: "Help Firefox improve this page", 2471 comment: 2472 "The title of a popup asking the user to give feedback by answering a short survey", 2473 }, 2474 }, 2475 marginInline: "0 42px", 2476 whiteSpace: "nowrap", 2477 }, 2478 title_logo: { 2479 imageURL: "chrome://branding/content/about-logo.png", 2480 alignment: "top", 2481 }, 2482 subtitle: { 2483 raw: { 2484 $l10n: { 2485 id: "relevance-question", 2486 text: "How relevant are the contents of this Firefox page to you?", 2487 comment: "Survey question about relevance", 2488 }, 2489 }, 2490 }, 2491 secondary_button: { 2492 label: { 2493 raw: { 2494 $l10n: { 2495 id: "advance-button-label", 2496 text: "Next", 2497 comment: 2498 "Label for the button that submits the user's response to question 1 and advances to question 2", 2499 }, 2500 }, 2501 }, 2502 style: "primary", 2503 action: { navigate: true }, 2504 disabled: "hasActiveMultiSelect", 2505 }, 2506 dismiss_button: { 2507 size: "small", 2508 marginBlock: "12px 0", 2509 marginInline: "0 12px", 2510 action: { dismiss: true }, 2511 }, 2512 tiles: { 2513 type: "multiselect", 2514 style: { flexDirection: "column", alignItems: "flex-start" }, 2515 data: [ 2516 { 2517 id: "radio-no-opinion", 2518 type: "radio", 2519 group: "radios", 2520 defaultValue: true, 2521 icon: { 2522 style: { 2523 width: "14px", 2524 height: "14px", 2525 marginInline: "0 0.5em", 2526 }, 2527 }, 2528 label: { 2529 raw: { 2530 $l10n: { 2531 id: "radio-no-opinion-label", 2532 text: "No opinion", 2533 comment: 2534 "Answer choice indicating that the user has no opinion about how relevant the New Tab Page is", 2535 }, 2536 }, 2537 }, 2538 action: { navigate: true }, 2539 }, 2540 ], 2541 }, 2542 }, 2543 }, 2544 ], 2545 }, 2546 }, 2547 { 2548 id: "FXA_ACCOUNTS_PXIMENU_ROW_LAYOUT", 2549 template: "menu_message", 2550 content: { 2551 messageType: "fxa_cta", 2552 layout: "row", 2553 primaryText: "Bounce between devices", 2554 secondaryText: 2555 "Sync and encrypt your bookmarks, passwords, and more on all your devices.", 2556 primaryActionText: "Sign up", 2557 primaryAction: { 2558 type: "FXA_SIGNIN_FLOW", 2559 data: { 2560 where: "tab", 2561 extraParams: { 2562 utm_source: "firefox-desktop", 2563 utm_medium: "product", 2564 utm_campaign: "some-campaign", 2565 utm_content: "some-content", 2566 }, 2567 autoClose: false, 2568 }, 2569 }, 2570 closeAction: { 2571 type: "BLOCK_MESSAGE", 2572 data: { 2573 id: "FXA_ACCOUNTS_APPMENU_PROTECT_BROWSING_DATA", 2574 }, 2575 }, 2576 imageURL: "chrome://browser/content/asrouter/assets/fox-with-devices.svg", 2577 imageVerticalBottomOffset: -32, 2578 imageVerticalTopOffset: -4, 2579 containerVerticalBottomOffset: 20, 2580 imageWidth: 100, 2581 }, 2582 skip_in_tests: "TODO", 2583 trigger: { 2584 id: "menuOpened", 2585 }, 2586 testingTriggerContext: "pxi_menu", 2587 }, 2588 { 2589 id: "TEST_NEWTAB_MESSAGE", 2590 template: "newtab_message", 2591 content: { 2592 messageType: "DownloadMobilePromoHighlight", 2593 }, 2594 trigger: { 2595 id: "newtabMessageCheck", 2596 }, 2597 groups: [], 2598 }, 2599 { 2600 id: "NEWTAB_PERSONALIZATION_MESSAGE", 2601 template: "newtab_message", 2602 content: { 2603 messageType: "PersonalizedCard", 2604 position: 1, 2605 cardTitle: "Personalized Just for You", 2606 cardMessage: 2607 "We’re customizing your feed to show content that matters to you, while ensuring your privacy is always respected.", 2608 ctaText: "Manage your settings", 2609 linkText: "Learn how we protect and manage data", 2610 }, 2611 trigger: { 2612 id: "newtabMessageCheck", 2613 }, 2614 groups: [], 2615 }, 2616 { 2617 id: "UNIVERSAL_INFOBAR_WITH_EMBEDDED_LINKS", 2618 content: { 2619 text: [ 2620 "Read the release notes ", 2621 { 2622 raw: "here", 2623 href: "https://www.mozilla.org/en-US/firefox/releases/", 2624 }, 2625 ". ", 2626 { 2627 string_id: "cookie-banner-blocker-onboarding-learn-more", 2628 href: "https://mozilla.org/privacy/firefox/?v=product", 2629 }, 2630 "!", 2631 ], 2632 type: "universal", 2633 dismissable: false, 2634 buttons: [ 2635 { 2636 label: { string_id: "existing-user-tou-accept" }, 2637 action: { 2638 type: "SET_PREF", 2639 data: { 2640 pref: { 2641 name: "universal-infobar-test-pref", 2642 value: true, 2643 }, 2644 }, 2645 }, 2646 primary: true, 2647 accessKey: "C", 2648 }, 2649 ], 2650 }, 2651 trigger: { 2652 id: "defaultBrowserCheck", 2653 }, 2654 template: "infobar", 2655 frequency: { 2656 lifetime: 100, 2657 }, 2658 }, 2659 { 2660 id: "TEST_PROFILE_SPOTLIGHT", 2661 groups: [], 2662 targeting: "canCreateSelectableProfiles", 2663 trigger: { 2664 id: "defaultBrowserCheck", 2665 }, 2666 template: "spotlight", 2667 profileScope: "single", 2668 frequency: { 2669 lifetime: 1, 2670 }, 2671 content: { 2672 template: "multistage", 2673 modal: "tab", 2674 screens: [ 2675 { 2676 id: "SCREEN_1", 2677 content: { 2678 logo: { 2679 imageURL: 2680 "https://firefox-settings-attachments.cdn.mozilla.net/main-workspace/ms-images/a3c640c8-7594-4bb2-bc18-8b4744f3aaf2.gif", 2681 }, 2682 title: { 2683 raw: "Firefox profiles Test Message", 2684 }, 2685 subtitle: { 2686 raw: "Profiles keep you organized.", 2687 }, 2688 dismiss_button: { 2689 action: { 2690 dismiss: true, 2691 }, 2692 }, 2693 secondary_button: { 2694 label: "Close", 2695 action: { 2696 dismiss: true, 2697 }, 2698 }, 2699 }, 2700 }, 2701 ], 2702 transitions: true, 2703 }, 2704 }, 2705 { 2706 id: "TEST_NEW_TAB_DIV_FEATURE_TOUR", 2707 groups: [], 2708 template: "feature_callout", 2709 content: { 2710 id: "TEST_NEW_TAB_MESSAGE_FEATURE_TOUR", 2711 template: "multistage", 2712 backdrop: "transparent", 2713 transitions: true, 2714 disableHistoryUpdates: true, 2715 screens: [ 2716 { 2717 id: "FIRST_NEW_TAB_SCREEN", 2718 force_hide_steps_indicator: true, 2719 anchors: [ 2720 { 2721 selector: "hbox#browser", 2722 hide_arrow: true, 2723 absolute_position: { 2724 right: "20px", 2725 bottom: "20px", 2726 }, 2727 }, 2728 ], 2729 content: { 2730 position: "callout", 2731 width: "320px", 2732 padding: "0 16px 16px 16px", 2733 title: { 2734 raw: "Test Message", 2735 }, 2736 logo: null, 2737 subtitle: { 2738 raw: "Test Screen message", 2739 }, 2740 secondary_button: { 2741 label: { 2742 raw: "Next", 2743 }, 2744 style: "primary", 2745 action: { 2746 type: "MULTI_ACTION", 2747 advance_screens: { 2748 id: "SECOND_NEW_TAB_SCREEN", 2749 }, 2750 data: { 2751 actions: [], 2752 }, 2753 }, 2754 }, 2755 }, 2756 }, 2757 { 2758 id: "SECOND_NEW_TAB_SCREEN", 2759 force_hide_steps_indicator: true, 2760 anchors: [ 2761 { 2762 selector: "hbox#browser", 2763 hide_arrow: true, 2764 absolute_position: { 2765 right: "20px", 2766 bottom: "20px", 2767 }, 2768 }, 2769 ], 2770 content: { 2771 position: "callout", 2772 width: "320px", 2773 padding: "0 16px 16px 16px", 2774 title: { 2775 raw: "Test Message ", 2776 }, 2777 logo: null, 2778 subtitle: { 2779 raw: "Test Screen 2 message.", 2780 }, 2781 secondary_button: { 2782 label: { 2783 raw: "Done", 2784 }, 2785 style: "primary", 2786 action: { 2787 dismiss: true, 2788 }, 2789 }, 2790 }, 2791 }, 2792 ], 2793 }, 2794 frequency: { 2795 lifetime: 1, 2796 }, 2797 targeting: "!activeNotifications", 2798 trigger: { 2799 id: "newtabFeatureCalloutCheck", 2800 }, 2801 }, 2802 { 2803 weight: 100, 2804 id: "TEST_ADDRESS_BAR_MESSAGING_OPEN_NEW_TAB_TRY_NEW_WAY_GOOGLE", 2805 groups: ["cfr"], 2806 content: { 2807 id: "TEST_ADDRESS_BAR_MESSAGING_OPEN_NEW_TAB_TRY_NEW_WAY_GOOGLE", 2808 screens: [ 2809 { 2810 id: "TRY_NEW_WAY_SCREEN_GOOGLE", 2811 anchors: [ 2812 { 2813 selector: ".urlbar-input-container", 2814 arrow_width: "26.9", 2815 no_open_on_anchor: true, 2816 panel_position: { 2817 offset_x: 60, 2818 anchor_attachment: "bottomleft", 2819 callout_attachment: "topleft", 2820 }, 2821 }, 2822 ], 2823 content: { 2824 title: { 2825 raw: { 2826 $l10n: { 2827 id: "messaging-new-tab-title-try-new-way", 2828 text: "Try a new way to search", 2829 comment: 2830 "Title for a callout that introduces a new search experience in the address bar", 2831 }, 2832 }, 2833 paddingInline: "0 40px", 2834 fontSize: "0.85em", 2835 }, 2836 width: "300px", 2837 padding: 16, 2838 position: "callout", 2839 subtitle: { 2840 raw: { 2841 $l10n: { 2842 id: "messaging-new-tab-subtitle-try-new-way-google", 2843 text: "Type what you’re looking for in the address bar to get results from your history and from Google.com.", 2844 comment: 2845 "Subtitle for a callout that introduces a new search experience in the address bar (Google)", 2846 }, 2847 }, 2848 textAlign: "start", 2849 fontSize: "0.8em", 2850 marginBlock: "-4px 0", 2851 }, 2852 primary_button: { 2853 label: { 2854 raw: { 2855 $l10n: { 2856 id: "messaging-try-it-label", 2857 text: "Try it", 2858 comment: 2859 "Label for the button that dismisses a callout that introduces search suggestions in the address bar", 2860 }, 2861 }, 2862 paddingBlock: "4px", 2863 paddingInline: "16px", 2864 }, 2865 action: { 2866 type: "FOCUS_URLBAR", 2867 dismiss: true, 2868 }, 2869 }, 2870 secondary_button: { 2871 label: { 2872 raw: { 2873 $l10n: { 2874 id: "messaging-no-thanks-label", 2875 text: "No thanks", 2876 comment: 2877 "Label for the button that dismisses a callout that introduces search suggestions in the address bar", 2878 }, 2879 }, 2880 }, 2881 action: { 2882 dismiss: true, 2883 }, 2884 }, 2885 }, 2886 }, 2887 ], 2888 }, 2889 trigger: { 2890 id: "defaultBrowserCheck", 2891 }, 2892 template: "feature_callout", 2893 frequency: { 2894 custom: [ 2895 { 2896 cap: 1, 2897 period: 86400000 * 7, 2898 }, 2899 ], 2900 lifetime: 3, 2901 }, 2902 targeting: 2903 "source == 'newtab' && !isMajorUpgrade && !activeNotifications && userPrefs.cfrFeatures && previousSessionEnd && !hasActiveEnterprisePolicies", 2904 }, 2905 { 2906 weight: 100, 2907 id: "TEST_ADDRESS_BAR_MESSAGING_OPEN_NEW_TAB_TIP_SAVE_STEP_GOOGLE", 2908 groups: ["cfr"], 2909 content: { 2910 id: "TEST_ADDRESS_BAR_MESSAGING_OPEN_NEW_TAB_TIP_SAVE_STEP_GOOGLE", 2911 screens: [ 2912 { 2913 id: "TIP_SAVE_STEP_SCREEN_GOOGLE", 2914 anchors: [ 2915 { 2916 selector: ".urlbar-input-container", 2917 arrow_width: "26.9", 2918 no_open_on_anchor: true, 2919 panel_position: { 2920 offset_x: 60, 2921 anchor_attachment: "bottomleft", 2922 callout_attachment: "topleft", 2923 }, 2924 }, 2925 ], 2926 content: { 2927 title: { 2928 raw: { 2929 $l10n: { 2930 id: "messaging-new-tab-title-tip-save-step", 2931 text: "Search here to save a step", 2932 comment: 2933 "Title for a callout that introduces search suggestions in the address bar", 2934 }, 2935 }, 2936 paddingInline: "0 40px", 2937 fontSize: "0.85em", 2938 }, 2939 width: "300px", 2940 padding: 16, 2941 position: "callout", 2942 subtitle: { 2943 raw: { 2944 $l10n: { 2945 id: "messaging-new-tab-subtitle-tip-save-step-google", 2946 text: "Firefox never tracks your searches. Type what you’re looking for in the address bar to get results from Google.", 2947 comment: 2948 "Subtitle for a callout that introduces search suggestions in the address bar (Google)", 2949 }, 2950 }, 2951 textAlign: "start", 2952 fontSize: "0.8em", 2953 marginBlock: "-4px 0", 2954 }, 2955 primary_button: { 2956 label: { 2957 raw: { 2958 $l10n: { 2959 id: "messaging-try-it-label", 2960 text: "Try it", 2961 comment: 2962 "Label for the button that dismisses a callout that introduces search suggestions in the address bar", 2963 }, 2964 }, 2965 paddingBlock: "4px", 2966 paddingInline: "16px", 2967 }, 2968 action: { 2969 type: "FOCUS_URLBAR", 2970 dismiss: true, 2971 }, 2972 }, 2973 secondary_button: { 2974 label: { 2975 raw: { 2976 $l10n: { 2977 id: "messaging-no-thanks-label", 2978 text: "No thanks", 2979 comment: 2980 "Label for the button that dismisses a callout that introduces search suggestions in the address bar", 2981 }, 2982 }, 2983 }, 2984 action: { 2985 dismiss: true, 2986 }, 2987 }, 2988 }, 2989 }, 2990 ], 2991 }, 2992 trigger: { 2993 id: "defaultBrowserCheck", 2994 }, 2995 template: "feature_callout", 2996 frequency: { 2997 custom: [ 2998 { 2999 cap: 1, 3000 period: 86400000 * 7, 3001 }, 3002 ], 3003 lifetime: 3, 3004 }, 3005 targeting: 3006 "source == 'newtab' && !isMajorUpgrade && !activeNotifications && userPrefs.cfrFeatures && previousSessionEnd && !hasActiveEnterprisePolicies", 3007 }, 3008 ]; 3009 3010 export const PanelTestProvider = { 3011 getMessages() { 3012 return Promise.resolve( 3013 MESSAGES().map(message => ({ 3014 ...message, 3015 targeting: `providerCohorts.panel_local_testing == "SHOW_TEST"`, 3016 })) 3017 ); 3018 }, 3019 };