testPreloadDeferredWhenLoaded() {
    const mm = getModuleManager({'a': []});
    mm.setLoader(createSuccessfulNonBatchLoader(mm));

    let calledBack = false;

    mm.preloadModule('a');
    clock.tick(5);

    const d = mm.preloadModule('a');
    d.addCallback((ctx) => {
      calledBack = true;
    });

    // Module is already loaded, should be called back after the setTimeout
    // in preloadModule.
    assertFalse('deferred for module "a" should not be called yet', calledBack);
    clock.tick(1);
    assertTrue('module "a" should be loaded', calledBack);
  }
Tests preloading an already loaded module.