components/exo/wayland/fuzzer/wayland_sequencer.py
def GetManualSequences(dep_graph):
  """Get the sequences which can't be automated.

  Some sequences of messages are interesting, and involve more than what can be
  automatically generated by looking at the dependency graph. In such cases we
  define the sequence here so that it will still be automatically generated as
  part of the corpus.

  Args:
    dep_graph: the dependency graph between messages and interfaces.

  Returns:
    A list of SequenceBuilder objects, each one containing a manually-created
    sequence.
  """
  c = SequenceBuilder('copy_paste', dep_graph)
  c_device = c.BuildInterface('wl_data_device')
  c_source = c.BuildInterface('wl_data_source')
  # TODO(crbug/979456): make a fuzz-dictionary with all the mime-types.
  c.AppendCall('wl_data_source', 'offer', [('receiver', c_source),
                                           ('mime_type', '"text/plain"')])
  c.AppendCall('wl_data_device', 'set_selection', [('receiver', c_device),
                                                   ('source', c_source)])
  c.AppendRoundTrip()
  c_surface = c.BuildInterface('wl_shell_surface')
  c.AppendCall('wl_shell_surface', 'set_toplevel', [('receiver', c_surface)])
  c_shm = c.BuildInterface('wl_shm')
  c.AppendRoundTrip()  # Round trip so server can send us formats.
  c.AppendCall('wl_shm', 'create_pool', [('receiver', c_shm), ('size', '64')])
  c.RecordInterfaceCreated('wl_shm_pool')
  c_shm_pool = c.GetLastInterfaceCreated('wl_shm_pool')
  c.AppendCall('wl_shm_pool', 'create_buffer', [('receiver', c_shm_pool),
                                                ('width', 1), ('stride', 4),
                                                ('height', 1)])
  c.RecordInterfaceCreated('wl_buffer')
  c_buffer = c.GetLastInterfaceCreated('wl_buffer')
  c.AppendCall('wl_surface', 'attach', [('receiver', c_surface),
                                        ('buffer', c_buffer)])
  c.AppendCall('wl_surface', 'damage', [('receiver', c_surface), ('width', 1),
                                        ('height', 1)])
  c.AppendCall('wl_surface', 'commit', [('receiver', c_surface)])
  c.AppendRoundTrip()  # Round trip so server can make the data_offer.
  c.RecordInterfaceCreated('wl_data_offer')

  e = SequenceBuilder('empty', dep_graph)

  p = SequenceBuilder('popup_configuration', dep_graph)
  p_positioner = p.BuildInterface('zxdg_positioner_v6')
  p_parent = p.BuildInterface('zxdg_toplevel_v6')
  p.AppendCall('zxdg_surface_v6', 'set_window_geometry',
               [('receiver', p_parent), ('x', 0), ('y', 0), ('width', 10),
                ('height', 10)])
  p.AppendRoundTrip()
  p.AppendCall('wl_surface', 'commit', [('receiver', p_parent)])
  p.AppendRoundTrip()
  p.AppendCall('zxdg_surface_v6', 'ack_configure', [('receiver', p_parent),
                                                    ('serial', 1)])
  p_child = p.BuildInterface('zxdg_surface_v6')
  p.AppendCall('zxdg_surface_v6', 'get_popup', [('receiver', p_child),
                                                ('parent', p_parent),
                                                ('positioner', p_positioner)])
  p.AppendRoundTrip()

  return [c, e, p]
Get the sequences which can't be automated.

  Some sequences of messages are interesting, and involve more than what can be
  automatically generated by looking at the dependency graph. In such cases we
  define the sequence here so that it will still be automatically generated as
  part of the corpus.

  Args:
    dep_graph: the dependency graph between messages and interfaces.

  Returns:
    A list of SequenceBuilder objects, each one containing a manually-created
    sequence.
  
Get the sequences which can't be automated.
Some sequences of messages are interesting, and involve more than what can be
automatically generated by looking at the dependency graph. In such cases we
define the sequence here so that it will still be automatically generated as
part of the corpus.
Get the sequences which can ' t be automated . Some sequences of messages are interesting and involve more than what can be automatically generated by looking at the dependency graph . In such cases we define the sequence here so that it will still be automatically generated as part of the corpus .
def GetManualSequences(dep_graph):
  c = SequenceBuilder('copy_paste', dep_graph)
  c_device = c.BuildInterface('wl_data_device')
  c_source = c.BuildInterface('wl_data_source')
  c.AppendCall('wl_data_source', 'offer', [('receiver', c_source),
                                           ('mime_type', '"text/plain"')])
  c.AppendCall('wl_data_device', 'set_selection', [('receiver', c_device),
                                                   ('source', c_source)])
  c.AppendRoundTrip()
  c_surface = c.BuildInterface('wl_shell_surface')
  c.AppendCall('wl_shell_surface', 'set_toplevel', [('receiver', c_surface)])
  c_shm = c.BuildInterface('wl_shm')
  c.AppendRoundTrip()  
  c.AppendCall('wl_shm', 'create_pool', [('receiver', c_shm), ('size', '64')])
  c.RecordInterfaceCreated('wl_shm_pool')
  c_shm_pool = c.GetLastInterfaceCreated('wl_shm_pool')
  c.AppendCall('wl_shm_pool', 'create_buffer', [('receiver', c_shm_pool),
                                                ('width', 1), ('stride', 4),
                                                ('height', 1)])
  c.RecordInterfaceCreated('wl_buffer')
  c_buffer = c.GetLastInterfaceCreated('wl_buffer')
  c.AppendCall('wl_surface', 'attach', [('receiver', c_surface),
                                        ('buffer', c_buffer)])
  c.AppendCall('wl_surface', 'damage', [('receiver', c_surface), ('width', 1),
                                        ('height', 1)])
  c.AppendCall('wl_surface', 'commit', [('receiver', c_surface)])
  c.AppendRoundTrip()  
  c.RecordInterfaceCreated('wl_data_offer')
  e = SequenceBuilder('empty', dep_graph)
  p = SequenceBuilder('popup_configuration', dep_graph)
  p_positioner = p.BuildInterface('zxdg_positioner_v6')
  p_parent = p.BuildInterface('zxdg_toplevel_v6')
  p.AppendCall('zxdg_surface_v6', 'set_window_geometry',
               [('receiver', p_parent), ('x', 0), ('y', 0), ('width', 10),
                ('height', 10)])
  p.AppendRoundTrip()
  p.AppendCall('wl_surface', 'commit', [('receiver', p_parent)])
  p.AppendRoundTrip()
  p.AppendCall('zxdg_surface_v6', 'ack_configure', [('receiver', p_parent),
                                                    ('serial', 1)])
  p_child = p.BuildInterface('zxdg_surface_v6')
  p.AppendCall('zxdg_surface_v6', 'get_popup', [('receiver', p_child),
                                                ('parent', p_parent),
                                                ('positioner', p_positioner)])
  p.AppendRoundTrip()
  return [c, e, p]
def GetManualSequences ( dep_graph ) : c = SequenceBuilder ( 'copy_paste' , dep_graph ) c_device = c . BuildInterface ( 'wl_data_device' ) c_source = c . BuildInterface ( 'wl_data_source' ) c . AppendCall ( 'wl_data_source' , 'offer' , [ ( 'receiver' , c_source ) , ( 'mime_type' , '"text/plain"' ) ] ) c . AppendCall ( 'wl_data_device' , 'set_selection' , [ ( 'receiver' , c_device ) , ( 'source' , c_source ) ] ) c . AppendRoundTrip ( ) c_surface = c . BuildInterface ( 'wl_shell_surface' ) c . AppendCall ( 'wl_shell_surface' , 'set_toplevel' , [ ( 'receiver' , c_surface ) ] ) c_shm = c . BuildInterface ( 'wl_shm' ) c . AppendRoundTrip ( ) c . AppendCall ( 'wl_shm' , 'create_pool' , [ ( 'receiver' , c_shm ) , ( 'size' , '64' ) ] ) c . RecordInterfaceCreated ( 'wl_shm_pool' ) c_shm_pool = c . GetLastInterfaceCreated ( 'wl_shm_pool' ) c . AppendCall ( 'wl_shm_pool' , 'create_buffer' , [ ( 'receiver' , c_shm_pool ) , ( 'width' , 1 ) , ( 'stride' , 4 ) , ( 'height' , 1 ) ] ) c . RecordInterfaceCreated ( 'wl_buffer' ) c_buffer = c . GetLastInterfaceCreated ( 'wl_buffer' ) c . AppendCall ( 'wl_surface' , 'attach' , [ ( 'receiver' , c_surface ) , ( 'buffer' , c_buffer ) ] ) c . AppendCall ( 'wl_surface' , 'damage' , [ ( 'receiver' , c_surface ) , ( 'width' , 1 ) , ( 'height' , 1 ) ] ) c . AppendCall ( 'wl_surface' , 'commit' , [ ( 'receiver' , c_surface ) ] ) c . AppendRoundTrip ( ) c . RecordInterfaceCreated ( 'wl_data_offer' ) e = SequenceBuilder ( 'empty' , dep_graph ) p = SequenceBuilder ( 'popup_configuration' , dep_graph ) p_positioner = p . BuildInterface ( 'zxdg_positioner_v6' ) p_parent = p . BuildInterface ( 'zxdg_toplevel_v6' ) p . AppendCall ( 'zxdg_surface_v6' , 'set_window_geometry' , [ ( 'receiver' , p_parent ) , ( 'x' , 0 ) , ( 'y' , 0 ) , ( 'width' , 10 ) , ( 'height' , 10 ) ] ) p . AppendRoundTrip ( ) p . AppendCall ( 'wl_surface' , 'commit' , [ ( 'receiver' , p_parent ) ] ) p . AppendRoundTrip ( ) p . AppendCall ( 'zxdg_surface_v6' , 'ack_configure' , [ ( 'receiver' , p_parent ) , ( 'serial' , 1 ) ] ) p_child = p . BuildInterface ( 'zxdg_surface_v6' ) p . AppendCall ( 'zxdg_surface_v6' , 'get_popup' , [ ( 'receiver' , p_child ) , ( 'parent' , p_parent ) , ( 'positioner' , p_positioner ) ] ) p . AppendRoundTrip ( ) return [ c , e , p ]
Get the sequences which can't be automated.
Get the sequences which can ' t be automated .
"""Get the sequences which can't be automated.

  Some sequences of messages are interesting, and involve more than what can be
  automatically generated by looking at the dependency graph. In such cases we
  define the sequence here so that it will still be automatically generated as
  part of the corpus.

  Args:
    dep_graph: the dependency graph between messages and interfaces.

  Returns:
    A list of SequenceBuilder objects, each one containing a manually-created
    sequence.
  """ # TODO(crbug/979456): make a fuzz-dictionary with all the mime-types. # Round trip so server can send us formats. # Round trip so server can make the data_offer.
A list of SequenceBuilder objects, each one containing a manually-created
sequence.
A list of SequenceBuilder objects each one containing a manually - created sequence .
dep_graph
the dependency graph between messages and interfaces.
the dependency graph between messages and interfaces .