content/test/gpu/gpu_tests/trace_integration_test.py
def _EvaluateSuccess_CheckVideoPath(self, category, event_iterator,
                                      other_args):
    """Verifies Chrome goes down the code path as expected.

    Depending on whether hardware overlays are supported or not, which formats
    are supported in overlays, whether video is downscaled or not, whether
    video is rotated or not, Chrome's video presentation code path can be
    different.
    """
    os_name = self.browser.platform.GetOSName()
    assert os_name and os_name.lower() == 'win'

    other_args = other_args or {}
    expected = self._GetVideoExpectations(other_args)

    # Verify expectations through captured trace events.
    for event in event_iterator:
      if event.category != category:
        continue
      if event.name != _SWAP_CHAIN_PRESENT_EVENT_NAME:
        continue
      if expected.no_overlay:
        self.fail('Expected no overlay got %s' % _SWAP_CHAIN_PRESENT_EVENT_NAME)
      detected_pixel_format = event.args.get('PixelFormat', None)
      if detected_pixel_format is None:
        self.fail('PixelFormat is missing from event %s' %
                  _SWAP_CHAIN_PRESENT_EVENT_NAME)
      if expected.pixel_format != detected_pixel_format:
        self.fail('SwapChain pixel format mismatch, expected %s got %s' %
                  (expected.pixel_format, detected_pixel_format))
      detected_zero_copy = event.args.get('ZeroCopy', None)
      if detected_zero_copy is None:
        self.fail('ZeroCopy is missing from event %s' %
                  _SWAP_CHAIN_PRESENT_EVENT_NAME)
      if expected.zero_copy != detected_zero_copy:
        self.fail('ZeroCopy mismatch, expected %s got %s' %
                  (expected.zero_copy, detected_zero_copy))
      break
    else:
      if expected.no_overlay:
        return
      self.fail(
          'Events with name %s were not found' % _SWAP_CHAIN_PRESENT_EVENT_NAME)
Verifies Chrome goes down the code path as expected.

    Depending on whether hardware overlays are supported or not, which formats
    are supported in overlays, whether video is downscaled or not, whether
    video is rotated or not, Chrome's video presentation code path can be
    different.
    
Verifies Chrome goes down the code path as expected.
Depending on whether hardware overlays are supported or not, which formats
are supported in overlays, whether video is downscaled or not, whether
video is rotated or not, Chrome's video presentation code path can be
different.
Verifies Chrome goes down the code path as expected . Depending on whether hardware overlays are supported or not which formats are supported in overlays whether video is downscaled or not whether video is rotated or not Chrome ' s video presentation code path can be different .
def _EvaluateSuccess_CheckVideoPath(self, category, event_iterator,
                                      other_args):
    os_name = self.browser.platform.GetOSName()
    assert os_name and os_name.lower() == 'win'
    other_args = other_args or {}
    expected = self._GetVideoExpectations(other_args)
    for event in event_iterator:
      if event.category != category:
        continue
      if event.name != _SWAP_CHAIN_PRESENT_EVENT_NAME:
        continue
      if expected.no_overlay:
        self.fail('Expected no overlay got %s' % _SWAP_CHAIN_PRESENT_EVENT_NAME)
      detected_pixel_format = event.args.get('PixelFormat', None)
      if detected_pixel_format is None:
        self.fail('PixelFormat is missing from event %s' %
                  _SWAP_CHAIN_PRESENT_EVENT_NAME)
      if expected.pixel_format != detected_pixel_format:
        self.fail('SwapChain pixel format mismatch, expected %s got %s' %
                  (expected.pixel_format, detected_pixel_format))
      detected_zero_copy = event.args.get('ZeroCopy', None)
      if detected_zero_copy is None:
        self.fail('ZeroCopy is missing from event %s' %
                  _SWAP_CHAIN_PRESENT_EVENT_NAME)
      if expected.zero_copy != detected_zero_copy:
        self.fail('ZeroCopy mismatch, expected %s got %s' %
                  (expected.zero_copy, detected_zero_copy))
      break
    else:
      if expected.no_overlay:
        return
      self.fail(
          'Events with name %s were not found' % _SWAP_CHAIN_PRESENT_EVENT_NAME)
def _EvaluateSuccess_CheckVideoPath ( self , category , event_iterator , other_args ) : os_name = self . browser . platform . GetOSName ( ) assert os_name and os_name . lower ( ) == 'win' other_args = other_args or { } expected = self . _GetVideoExpectations ( other_args ) for event in event_iterator : if event . category != category : continue if event . name != _SWAP_CHAIN_PRESENT_EVENT_NAME : continue if expected . no_overlay : self . fail ( 'Expected no overlay got %s' % _SWAP_CHAIN_PRESENT_EVENT_NAME ) detected_pixel_format = event . args . get ( 'PixelFormat' , None ) if detected_pixel_format is None : self . fail ( 'PixelFormat is missing from event %s' % _SWAP_CHAIN_PRESENT_EVENT_NAME ) if expected . pixel_format != detected_pixel_format : self . fail ( 'SwapChain pixel format mismatch, expected %s got %s' % ( expected . pixel_format , detected_pixel_format ) ) detected_zero_copy = event . args . get ( 'ZeroCopy' , None ) if detected_zero_copy is None : self . fail ( 'ZeroCopy is missing from event %s' % _SWAP_CHAIN_PRESENT_EVENT_NAME ) if expected . zero_copy != detected_zero_copy : self . fail ( 'ZeroCopy mismatch, expected %s got %s' % ( expected . zero_copy , detected_zero_copy ) ) break else : if expected . no_overlay : return self . fail ( 'Events with name %s were not found' % _SWAP_CHAIN_PRESENT_EVENT_NAME )
Verifies Chrome goes down the code path as expected.
Verifies Chrome goes down the code path as expected .
"""Verifies Chrome goes down the code path as expected.

    Depending on whether hardware overlays are supported or not, which formats
    are supported in overlays, whether video is downscaled or not, whether
    video is rotated or not, Chrome's video presentation code path can be
    different.
    """ # Verify expectations through captured trace events.
self
category
event_iterator
other_args