def _flag_specific_configs(self):
        """Reads configuration from FlagSpecificConfig and returns a dictionary from name to args."""
        config_file = self._filesystem.join(self.web_tests_dir(),
                                            'FlagSpecificConfig')
        if not self._filesystem.exists(config_file):
            return {}

        try:
            json_configs = json.loads(
                self._filesystem.read_text_file(config_file))
        except ValueError as error:
            raise ValueError('{} is not a valid JSON file: {}'.format(
                config_file, error))

        configs = {}
        for config in json_configs:
            name = config['name']
            args = config['args']
            if not VALID_FILE_NAME_REGEX.match(name):
                raise ValueError(
                    '{}: name "{}" contains invalid characters'.format(
                        config_file, name))
            if name in configs:
                raise ValueError('{} contains duplicated name {}.'.format(
                    config_file, name))
            if args in configs.values():
                raise ValueError(
                    '{}: name "{}" has the same args as another entry.'.format(
                        config_file, name))
            configs[name] = args
        return configs