setAndAssertRotation = (expectedDegrees, opt_transform) => {
  if (userAgent.GECKO ||
      userAgent.IE && !userAgent.isDocumentModeOrHigher(10)) {
    // Mozilla and <IE10 do not support CSSMatrix.
    return;
  }
  if (opt_transform) {
    style.setStyle(element, transform.getTransformProperty_(), opt_transform);
  } else {
    const success = transform.setRotation(element, Number(expectedDegrees));
    assertTrue(success);
  }
  const rotation = transform.getRotation(element);
  if (expectedDegrees instanceof Function) {
    assertTrue(`Incorrect rotation: ${rotation}`, expectedDegrees(rotation));
  } else {
    assertRoughlyEquals(expectedDegrees, rotation, EPSILON);
  }
}
Sets a transform rotation and asserts the translation was applied.
@param {number|function(number):boolean} expectedDegrees The expected
    resulting rotation in degrees, or a function to evaluate the resulting
    rotation.
@param {string=} opt_transform The plaintext CSS transform value.
@suppress {visibility} suppression added to enable type checking