function setUserAgent(userAgent, userAgentData) {
  util.setUserAgent(userAgent);
  util.setUserAgentData(userAgentData);
  setUseClientHintsForTesting(!!userAgentData);
}
Override the user agent with the given values.
@param {string} userAgent The userAgent override.
@param {?NavigatorUAData} userAgentData The userAgentData override. Pass
    `null` to specify the absence of userAgentData.