chrome/test/chromedriver/log_replay/client_replay_test.py
def runTest(self, test_name):
    """Runs the test. Compares output from Chrome to the output in the log file.

    Args:
      test_name: name of the test to run from run_py_tests.py.
    """
    log_file = os.path.join(ChromeDriverClientReplayTest.log_dir,
                            test_name + ".log")
    GenerateTestLog(test_name, _CHROMEDRIVER, _CHROME, log_file)
    with open(log_file) as lf:
      replay_path = log_file if _OPTIONS.devtools_replay else ""
      server = client_replay.StartChromeDriverServer(_CHROMEDRIVER,
                                                     _OPTIONS.output_log_path,
                                                     replay_path)
      chrome_binary = (util.GetAbsolutePathOfUserPath(_CHROME)
                       if _CHROME else None)

      replayer = client_replay.Replayer(lf, server, chrome_binary,
                                        self.server_url)
      real_response = None
      while True:
        command = replayer.command_sequence.NextCommand(real_response)
        if not command:
          break
        logged_response = replayer.command_sequence._last_response
        real_response = replayer.executor.Execute(
            client_replay._COMMANDS[command.name],
            command.GetPayloadPrimitive())

        self.CheckResponsesMatch(real_response["value"],
                                 logged_response.GetPayloadPrimitive())
      server.Kill()
Runs the test. Compares output from Chrome to the output in the log file.

    Args:
      test_name: name of the test to run from run_py_tests.py.
    
Runs the test. Compares output from Chrome to the output in the log file.
Runs the test . Compares output from Chrome to the output in the log file .
def runTest(self, test_name):
    log_file = os.path.join(ChromeDriverClientReplayTest.log_dir,
                            test_name + ".log")
    GenerateTestLog(test_name, _CHROMEDRIVER, _CHROME, log_file)
    with open(log_file) as lf:
      replay_path = log_file if _OPTIONS.devtools_replay else ""
      server = client_replay.StartChromeDriverServer(_CHROMEDRIVER,
                                                     _OPTIONS.output_log_path,
                                                     replay_path)
      chrome_binary = (util.GetAbsolutePathOfUserPath(_CHROME)
                       if _CHROME else None)
      replayer = client_replay.Replayer(lf, server, chrome_binary,
                                        self.server_url)
      real_response = None
      while True:
        command = replayer.command_sequence.NextCommand(real_response)
        if not command:
          break
        logged_response = replayer.command_sequence._last_response
        real_response = replayer.executor.Execute(
            client_replay._COMMANDS[command.name],
            command.GetPayloadPrimitive())
        self.CheckResponsesMatch(real_response["value"],
                                 logged_response.GetPayloadPrimitive())
      server.Kill()
def runTest ( self , test_name ) : log_file = os . path . join ( ChromeDriverClientReplayTest . log_dir , test_name + ".log" ) GenerateTestLog ( test_name , _CHROMEDRIVER , _CHROME , log_file ) with open ( log_file ) as lf : replay_path = log_file if _OPTIONS . devtools_replay else "" server = client_replay . StartChromeDriverServer ( _CHROMEDRIVER , _OPTIONS . output_log_path , replay_path ) chrome_binary = ( util . GetAbsolutePathOfUserPath ( _CHROME ) if _CHROME else None ) replayer = client_replay . Replayer ( lf , server , chrome_binary , self . server_url ) real_response = None while True : command = replayer . command_sequence . NextCommand ( real_response ) if not command : break logged_response = replayer . command_sequence . _last_response real_response = replayer . executor . Execute ( client_replay . _COMMANDS [ command . name ] , command . GetPayloadPrimitive ( ) ) self . CheckResponsesMatch ( real_response [ "value" ] , logged_response . GetPayloadPrimitive ( ) ) server . Kill ( )
Runs the test.
Runs the test .
"""Runs the test. Compares output from Chrome to the output in the log file.

    Args:
      test_name: name of the test to run from run_py_tests.py.
    """
self
test_name
name of the test to run from run_py_tests.py.
name of the test to run from run_py_tests . py .