tools/accessibility/nvda/nvda_chrome_tests.py
def _GetSpeechFromNvdaLogFile(self):
    """Return everything NVDA would have spoken as a list of strings.

    Parses lines like this from NVDA's log file:
      Speaking [LangChangeCommand ('en'), u'Google Chrome', u'window']
      Speaking character u'slash'

    Returns a single list of strings like this:
      [u'Google Chrome', u'window', u'slash']
    """
    if not os.access(NVDA_LOGPATH, os.F_OK):
      return []
    lines = open(NVDA_LOGPATH).readlines()[self.last_nvda_log_line:]
    regex = re.compile(r"u'((?:[^\'\\]|\\.)*)\'")
    result = []
    for line in lines:
      for m in regex.finditer(line):
        speech_with_whitespace = m.group(1)
        speech_stripped = re.sub(r'\s+', ' ', speech_with_whitespace).strip()
        result.append(speech_stripped)
    self.last_nvda_log_line = len(lines) - 1
    return result
Return everything NVDA would have spoken as a list of strings.

    Parses lines like this from NVDA's log file:
      Speaking [LangChangeCommand ('en'), u'Google Chrome', u'window']
      Speaking character u'slash'

    Returns a single list of strings like this:
      [u'Google Chrome', u'window', u'slash']
    
Return everything NVDA would have spoken as a list of strings.


Return everything NVDA would have spoken as a list of strings .
def _GetSpeechFromNvdaLogFile(self):
    if not os.access(NVDA_LOGPATH, os.F_OK):
      return []
    lines = open(NVDA_LOGPATH).readlines()[self.last_nvda_log_line:]
    regex = re.compile(r"u'((?:[^\'\\]|\\.)*)\'")
    result = []
    for line in lines:
      for m in regex.finditer(line):
        speech_with_whitespace = m.group(1)
        speech_stripped = re.sub(r'\s+', ' ', speech_with_whitespace).strip()
        result.append(speech_stripped)
    self.last_nvda_log_line = len(lines) - 1
    return result
def _GetSpeechFromNvdaLogFile ( self ) : if not os . access ( NVDA_LOGPATH , os . F_OK ) : return [ ] lines = open ( NVDA_LOGPATH ) . readlines ( ) [ self . last_nvda_log_line : ] regex = re . compile ( r"u'((?:[^\'\\]|\\.)*)\'" ) result = [ ] for line in lines : for m in regex . finditer ( line ) : speech_with_whitespace = m . group ( 1 ) speech_stripped = re . sub ( r'\s+' , ' ' , speech_with_whitespace ) . strip ( ) result . append ( speech_stripped ) self . last_nvda_log_line = len ( lines ) - 1 return result
Return everything NVDA would have spoken as a list of strings.
Return everything NVDA would have spoken as a list of strings .
"""Return everything NVDA would have spoken as a list of strings.

    Parses lines like this from NVDA's log file:
      Speaking [LangChangeCommand ('en'), u'Google Chrome', u'window']
      Speaking character u'slash'

    Returns a single list of strings like this:
      [u'Google Chrome', u'window', u'slash']
    """
self