String[] args) {
// TODO(corysmith): Figure out how to allow custom plugin flags
// Might delegate to the flag parser to remove them, before creating Flags
// Then, flags can have a method to retrieve them.
Flags flags = flagsParser.parseArgument(args);
final List<Module> modules = Lists.newLinkedList();
Configuration resolvedConfiguration =
configuration.resolvePaths(pathResolver, flags);
modules.addAll(pluginModules);
modules.addAll(pluginLoader.load(resolvedConfiguration.getPlugins()));
for (PluginInitializer initializer : initializers) {
final Module module = initializer.initializeModule(flags, resolvedConfiguration);
modules.add(module);
}
modules.add(new HtmlDocModule()); // by default the html plugin is installed.
modules.add(new DebugModule(runnerMode.isDebug()));
String serverAddress = resolvedConfiguration.getServer(
flags.getServer(),
flags.getPort(),
flags.getServerHandlerPrefix());
String captureAddress = resolvedConfiguration.getCaptureAddress(
serverAddress,
flags.getCaptureAddress(),
flags.getServerHandlerPrefix());
modules.add(
new JsTestDriverModule(flags,
resolvedConfiguration.getFilesList(),
serverAddress,