content/test/gpu/gpu_tests/gpu_integration_test_unittest.py
def _RunIntegrationTest(self, test_args):
    """Runs an integration and asserts fail/success/skip expectations.

    Args:
      test_args: A _IntegrationTestArgs instance to use.
    """
    config = chromium_config.ChromiumConfig(
        top_level_dir=path_util.GetGpuTestDir(),
        benchmark_dirs=[
            os.path.join(path_util.GetGpuTestDir(), 'unittest_data')
        ])

    with binary_manager.TemporarilyReplaceBinaryManager(None), \
         tempfile_ext.NamedTemporaryDirectory() as temp_dir:
      test_results_path = os.path.join(temp_dir, 'test_results.json')
      test_state_path = os.path.join(temp_dir, 'test_state.json')
      # We are processing ChromiumConfig instance and getting the argument
      # list. Then we pass it directly to run_browser_tests.RunTests. If
      # we called browser_test_runner.Run, then it would spawn another
      # subprocess which is less efficient.
      args = browser_test_runner.ProcessConfig(
          config,
          [
              test_args.test_name,
              '--write-full-results-to=%s' % test_results_path,
              '--test-state-json-path=%s' % test_state_path,
              # We don't want the underlying typ-based tests to report their
              # results to ResultDB.
              '--disable-resultsink',
          ] + test_args.additional_args)
      run_browser_tests.RunTests(args)
      with open(test_results_path) as f:
        self._test_result = json.load(f)
      with open(test_state_path) as f:
        self._test_state = json.load(f)
      actual_successes, actual_failures, actual_skips = (_ExtractTestResults(
          self._test_result))
      self.assertEquals(set(actual_failures), set(test_args.failures))
      self.assertEquals(set(actual_successes), set(test_args.successes))
      self.assertEquals(set(actual_skips), set(test_args.skips))
Runs an integration and asserts fail/success/skip expectations.

    Args:
      test_args: A _IntegrationTestArgs instance to use.
    
Runs an integration and asserts fail/success/skip expectations.
Runs an integration and asserts fail / success / skip expectations .
def _RunIntegrationTest(self, test_args):
    config = chromium_config.ChromiumConfig(
        top_level_dir=path_util.GetGpuTestDir(),
        benchmark_dirs=[
            os.path.join(path_util.GetGpuTestDir(), 'unittest_data')
        ])
    with binary_manager.TemporarilyReplaceBinaryManager(None), \
         tempfile_ext.NamedTemporaryDirectory() as temp_dir:
      test_results_path = os.path.join(temp_dir, 'test_results.json')
      test_state_path = os.path.join(temp_dir, 'test_state.json')
      args = browser_test_runner.ProcessConfig(
          config,
          [
              test_args.test_name,
              '--write-full-results-to=%s' % test_results_path,
              '--test-state-json-path=%s' % test_state_path,
              '--disable-resultsink',
          ] + test_args.additional_args)
      run_browser_tests.RunTests(args)
      with open(test_results_path) as f:
        self._test_result = json.load(f)
      with open(test_state_path) as f:
        self._test_state = json.load(f)
      actual_successes, actual_failures, actual_skips = (_ExtractTestResults(
          self._test_result))
      self.assertEquals(set(actual_failures), set(test_args.failures))
      self.assertEquals(set(actual_successes), set(test_args.successes))
      self.assertEquals(set(actual_skips), set(test_args.skips))
def _RunIntegrationTest ( self , test_args ) : config = chromium_config . ChromiumConfig ( top_level_dir = path_util . GetGpuTestDir ( ) , benchmark_dirs = [ os . path . join ( path_util . GetGpuTestDir ( ) , 'unittest_data' ) ] ) with binary_manager . TemporarilyReplaceBinaryManager ( None ) , tempfile_ext . NamedTemporaryDirectory ( ) as temp_dir : test_results_path = os . path . join ( temp_dir , 'test_results.json' ) test_state_path = os . path . join ( temp_dir , 'test_state.json' ) args = browser_test_runner . ProcessConfig ( config , [ test_args . test_name , '--write-full-results-to=%s' % test_results_path , '--test-state-json-path=%s' % test_state_path , '--disable-resultsink' , ] + test_args . additional_args ) run_browser_tests . RunTests ( args ) with open ( test_results_path ) as f : self . _test_result = json . load ( f ) with open ( test_state_path ) as f : self . _test_state = json . load ( f ) actual_successes , actual_failures , actual_skips = ( _ExtractTestResults ( self . _test_result ) ) self . assertEquals ( set ( actual_failures ) , set ( test_args . failures ) ) self . assertEquals ( set ( actual_successes ) , set ( test_args . successes ) ) self . assertEquals ( set ( actual_skips ) , set ( test_args . skips ) )
Runs an integration and asserts fail/success/skip expectations.
Runs an integration and asserts fail / success / skip expectations .
"""Runs an integration and asserts fail/success/skip expectations.

    Args:
      test_args: A _IntegrationTestArgs instance to use.
    """ # We are processing ChromiumConfig instance and getting the argument # list. Then we pass it directly to run_browser_tests.RunTests. If # we called browser_test_runner.Run, then it would spawn another # subprocess which is less efficient. # We don't want the underlying typ-based tests to report their # results to ResultDB.
self
test_args
A _IntegrationTestArgs instance to use.
A _IntegrationTestArgs instance to use .