function createExcludingSyntheticModuleOverheadLoaderWithConstructor(
    moduleMgr, modulesToMarkAsLoaded) {
  return {
    constructorSet: false,
    loadModules: function(ids, moduleInfoMap, {onError, onSuccess, onTimeout}) {
      requestCount++;
      setTimeout(() => {
        // Simulate a synthetic module loading first, and registering a cb.
        moduleMgr.registerInitializationCallback(() => {});
        class ModuleCtor extends BaseModule {
          constructor() {
            super();
            this.constructorSet = true;
          }
        }
        moduleMgr.setModuleConstructor(ModuleCtor);
        for (const id of modulesToMarkAsLoaded) {
          moduleMgr.beforeLoadModuleCode(id);
          moduleMgr.setLoaded();
        }
        if (onSuccess) {
          onSuccess();
        }
      }, 5);
    },
  };
}
Creates an AbstractModuleLoader implementation that registers one
initialization callback for a synthetic module, then attempts to set a
module constructor
@param {!ModuleManager} moduleMgr
@param {!Array} modulesToMarkAsLoaded
@return {{loadModules: function(), constructorSet: boolean}}