code: function (eyes, tag, ignoreMismatch, retryTimeout, region) {
          return EyesBase.prototype.checkWindow.call(eyes, tag, false, retryTimeout, region)
              .then(function(result) {
                  if (result.asExpected || !eyes._failureReportOverridden) {
                      return result;
                  } else {
                      throw EyesBase.buildTestError(result, eyes._sessionStartInfo.scenarioIdOrName,
                          eyes._sessionStartInfo.appIdOrName);
                  }
              });
      }
docs: A helper function for calling the checkWindow on {@code EyesBase} and handling the result.
  @param {Eyes} eyes The Eyes object (a derivative of EyesBase) on which to perform the call.
  @param {String} tag The tag for the current visual checkpoint.
  @param {boolean} ignoreMismatch Whether or not the server should ignore a mismatch.
  @param {int} retryTimeout The timeout. (Milliseconds).
  @param {Object} region The region to check. Should be of the form  {width, height, left, top}.
  @returns {Promise} A promise which resolves to the checkWindow result, or an exception of the result failed
  and failure reports are immediate.