testSetsCorsAttribute() {
    // Use synchronous image loading.
    makeLoaderSynchronous(loader);

    // Verify the crossOrigin attribute of the requested images.
    events.listen(loader, EventType.LOAD, (e) => {
      const image = e.target;
      if (image.id == 'cors_request') {
        assertEquals(
            'CORS requested image should have a crossOrigin attribute set',
            'anonymous', image.crossOrigin);
      } else {
        assertTrue(
            'Non-CORS requested images should not have a crossOrigin attribute',
            googString.isEmptyOrWhitespace(
                googString.makeSafe(image.crossOrigin)));
      }
    });

    // Make a new request for one of the images, this time using CORS.
    const srcs = googObject.getKeys(TEST_IMAGES);
    loader.addImage(
        'cors_request', srcs[0], ImageLoader.CorsRequestType.ANONYMOUS);
    loader.start();
  }
Verifies that the correct image attribute is set when using CORS requests.