[
  {
    "os": [
      "win",
      "linux",
      "mac",
      "android"
    ],
    "policy_pref_mapping_tests": [
      {
        "note": "Should have default value when policy is not set",
        "policies": {},
        "prefs": {
          "enterprise_reporting.saas_usage.domain_urls_for_profile": {
            "location": "user_profile",
            "default_value": []
          }
        }
      },
      {
        "note": "Should be set when policy source is cloud and scope is user",
        "policies": {
          "SaasUsageReportingDomainUrlsForProfiles": ["https://gemini.google.com"]
        },
        "policies_settings": {
          "SaasUsageReportingDomainUrlsForProfiles": {
            "scope": "user",
            "source": "cloud"
          }
        },
        "prefs": {
          "enterprise_reporting.saas_usage.domain_urls_for_profile": {
            "location": "user_profile",
            "value": ["https://gemini.google.com"]
          }
        }
      },
      {
        "note": "Should not be set when policy scope is machine",
        "policies": {
          "SaasUsageReportingDomainUrlsForProfiles": ["https://gemini.google.com"]
        },
        "policies_settings": {
          "SaasUsageReportingDomainUrlsForProfiles": {
            "scope": "machine",
            "source": "cloud"
          }
        },
        "prefs": {
          "enterprise_reporting.saas_usage.domain_urls_for_profile": {
            "default_value": [],
            "location": "user_profile"
          }
        }
      },
      {
        "note": "Should not be set when policy source is platform",
        "policies": {
          "SaasUsageReportingDomainUrlsForProfiles": ["https://gemini.google.com"]
        },
        "policies_settings": {
          "SaasUsageReportingDomainUrlsForProfiles": {
            "scope": "user",
            "source": "platform"
          }
        },
        "prefs": {
          "enterprise_reporting.saas_usage.domain_urls_for_profile": {
            "default_value": [],
            "location": "user_profile"
          }
        }
      },
      {
        "note": "Should have default value when only browser policy is set",
        "policies": {
          "SaasUsageReportingDomainUrlsForBrowsers": ["https://docs.google.com"]
        },
        "policies_settings": {
          "SaasUsageReportingDomainUrlsForBrowsers": {
            "scope": "machine",
            "source": "cloud"
          }
        },
        "prefs": {
          "enterprise_reporting.saas_usage.domain_urls_for_browser": {
            "value": ["https://docs.google.com"],
            "location": "local_state"
          },
          "enterprise_reporting.saas_usage.domain_urls_for_profile": {
            "default_value": [],
            "location": "user_profile"
          }
        }
      }
    ]
  },
  {
    "os": [
      "chromeos"
    ],
    "policy_pref_mapping_tests": [
      {
        "note": "Should have default value when policy is not set",
        "policies": {},
        "prefs": {
          "enterprise_reporting.saas_usage.domain_urls_for_profile": {
            "location": "user_profile",
            "default_value": []
          }
        }
      },
      {
        "note": "Should be set when policy source is cloud and scope is user",
        "policies": {
          "SaasUsageReportingDomainUrlsForProfiles": ["https://gemini.google.com"]
        },
        "policies_settings": {
          "SaasUsageReportingDomainUrlsForProfiles": {
            "scope": "user",
            "source": "cloud"
          }
        },
        "prefs": {
          "enterprise_reporting.saas_usage.domain_urls_for_profile": {
            "location": "user_profile",
            "value": ["https://gemini.google.com"]
          }
        }
      },
      {
        "note": "Should not be set when policy scope is machine",
        "policies": {
          "SaasUsageReportingDomainUrlsForProfiles": ["https://gemini.google.com"]
        },
        "policies_settings": {
          "SaasUsageReportingDomainUrlsForProfiles": {
            "scope": "machine",
            "source": "cloud"
          }
        },
        "prefs": {
          "enterprise_reporting.saas_usage.domain_urls_for_profile": {
            "default_value": [],
            "location": "user_profile"
          }
        }
      },
      {
        "note": "Should not be set when policy source is platform",
        "policies": {
          "SaasUsageReportingDomainUrlsForProfiles": ["https://gemini.google.com"]
        },
        "policies_settings": {
          "SaasUsageReportingDomainUrlsForProfiles": {
            "scope": "user",
            "source": "platform"
          }
        },
        "prefs": {
          "enterprise_reporting.saas_usage.domain_urls_for_profile": {
            "default_value": [],
            "location": "user_profile"
          }
        }
      }
    ]
  }
]