assertWidthWithinTolerance = function(a, b, c, opt_d) {
  'use strict';
  _validateArguments(3, arguments);
  const element = nonCommentArg(1, 3, arguments);
  const width = nonCommentArg(2, 3, arguments);
  const tolerance = nonCommentArg(3, 3, arguments);
  const size = goog.style.getSize(element);
  const elementWidth = size.width;

  _assert(
      commentArg(1, arguments),
      goog.testing.style.layoutasserts.isWithinThreshold_(
          width, elementWidth, tolerance),
      'Element width(' + elementWidth + ') should be within given width(' +
          width + ') with tolerance value of ' + tolerance + '.');
}
Asserts that the element must have the specified width within the specified
tolerance.
@param {Element|string} a The element or optionally the comment string.
@param {number|Element} b The height or the element if comment string is
    present.
@param {number} c The tolerance or the height if comment string is
    present.
@param {number=} opt_d The tolerance if comment string is present.