tools/cygprofile/profile_android_startup.py
def _RunProfileCollection(self, package_info, simulate_user):
    """Runs the profile collection tasks.

    If |simulate_user| is True, then try to simulate a real user, with swiping.
    Also do a first load of the page instead of about:blank, in order to
    exercise the cache. This is not desirable with a page that only contains
    cachable resources, as in this instance the network code will not be called.

    Args:
      package_info: Which Chrome package to use.
      simulate_user: (bool) Whether to try to simulate a user interacting with
                     the browser.
    """
    initial_url = self._urls[0] if simulate_user else 'about:blank'
    # Start up chrome once with a page, just to get the one-off
    # activities out of the way such as apk resource extraction and profile
    # creation.
    self._StartChrome(package_info, initial_url)
    time.sleep(15)
    self._KillChrome(package_info)
    self._SetUpDeviceFolders()
    for url in self._urls:
      self._StartChrome(package_info, url)
      time.sleep(15)
      if simulate_user:
        # Down, down, up, up.
        _SimulateSwipe(self._device, 200, 700, 200, 300)
        _SimulateSwipe(self._device, 200, 700, 200, 300)
        _SimulateSwipe(self._device, 200, 700, 200, 1000)
        _SimulateSwipe(self._device, 200, 700, 200, 1000)
      time.sleep(30)
      self._AssertRunning(package_info)
      self._KillChrome(package_info)
Runs the profile collection tasks.

    If |simulate_user| is True, then try to simulate a real user, with swiping.
    Also do a first load of the page instead of about:blank, in order to
    exercise the cache. This is not desirable with a page that only contains
    cachable resources, as in this instance the network code will not be called.

    Args:
      package_info: Which Chrome package to use.
      simulate_user: (bool) Whether to try to simulate a user interacting with
                     the browser.
    
Runs the profile collection tasks.
If |simulate_user| is True, then try to simulate a real user, with swiping.
Also do a first load of the page instead of about:blank, in order to
exercise the cache. This is not desirable with a page that only contains
cachable resources, as in this instance the network code will not be called.
Runs the profile collection tasks . If |simulate_user| is True then try to simulate a real user with swiping . Also do a first load of the page instead of about : blank in order to exercise the cache . This is not desirable with a page that only contains cachable resources as in this instance the network code will not be called .
def _RunProfileCollection(self, package_info, simulate_user):
    initial_url = self._urls[0] if simulate_user else 'about:blank'
    self._StartChrome(package_info, initial_url)
    time.sleep(15)
    self._KillChrome(package_info)
    self._SetUpDeviceFolders()
    for url in self._urls:
      self._StartChrome(package_info, url)
      time.sleep(15)
      if simulate_user:
        _SimulateSwipe(self._device, 200, 700, 200, 300)
        _SimulateSwipe(self._device, 200, 700, 200, 300)
        _SimulateSwipe(self._device, 200, 700, 200, 1000)
        _SimulateSwipe(self._device, 200, 700, 200, 1000)
      time.sleep(30)
      self._AssertRunning(package_info)
      self._KillChrome(package_info)
def _RunProfileCollection ( self , package_info , simulate_user ) : initial_url = self . _urls [ 0 ] if simulate_user else 'about:blank' self . _StartChrome ( package_info , initial_url ) time . sleep ( 15 ) self . _KillChrome ( package_info ) self . _SetUpDeviceFolders ( ) for url in self . _urls : self . _StartChrome ( package_info , url ) time . sleep ( 15 ) if simulate_user : _SimulateSwipe ( self . _device , 200 , 700 , 200 , 300 ) _SimulateSwipe ( self . _device , 200 , 700 , 200 , 300 ) _SimulateSwipe ( self . _device , 200 , 700 , 200 , 1000 ) _SimulateSwipe ( self . _device , 200 , 700 , 200 , 1000 ) time . sleep ( 30 ) self . _AssertRunning ( package_info ) self . _KillChrome ( package_info )
Runs the profile collection tasks.
Runs the profile collection tasks .
"""Runs the profile collection tasks.

    If |simulate_user| is True, then try to simulate a real user, with swiping.
    Also do a first load of the page instead of about:blank, in order to
    exercise the cache. This is not desirable with a page that only contains
    cachable resources, as in this instance the network code will not be called.

    Args:
      package_info: Which Chrome package to use.
      simulate_user: (bool) Whether to try to simulate a user interacting with
                     the browser.
    """ # Start up chrome once with a page, just to get the one-off # activities out of the way such as apk resource extraction and profile # creation. # Down, down, up, up.
self
package_info
Which Chrome package to use.
Which Chrome package to use .
simulate_user
(bool) Whether to try to simulate a user interacting with
the browser.
( bool ) Whether to try to simulate a user interacting with the browser .