'Build the headless browser command line list for subprocess.'

def build_command_line(self, rel_script_path, *args, **kwargs):

    command_line_list = [self.exec_path]
    command_line_list.append('test')
    curr_dir = os.path.dirname(__file__)
    script_path = os.path.join(curr_dir, rel_script_path)
    command_line_list.append(script_path)
    command_line_list.append(('--url=' + self.env.url))
    command_line_list.append('--return-json')
    if (self.debug or (rel_script_path in self.env.debug_these_tests)):
        command_line_list.extend(['--verbose=true', '--logLevel=debug'])
    command_line_list.extend(args)
    command_line_list.append(('--data=' + json.dumps(kwargs)))
    return command_line_list
