testOldCodeGoneError() {
    const mm = getModuleManager({'s': []});
    mm.setLoader(createUnsuccessfulLoader(mm, 410));

    // Callback checks for an old code failure
    let firedLoadFailed = false;
    mm.registerCallback(
        ModuleManager.CallbackType.ERROR, (callbackType, id, cause) => {
          assertEquals(
              'Failure cause was not as expected',
              ModuleLoadFailure.Type.OLD_CODE_GONE, cause.type);
          firedLoadFailed = true;
        });

    mm.preloadModule('s', 0);
    assertFalse('module "s" should not be loaded (0)', mm.isModuleLoaded('s'));
    clock.tick(5);
    assertFalse('module "s" should not be loaded (1)', mm.isModuleLoaded('s'));
    assertTrue('should have called old code gone callback', firedLoadFailed);
  }
Test loading errors due to old code.
@suppress {missingProperties} suppression added to enable type checking