/** * Load a filtered list of events from the dev tools capture * * @param mixed $filter * @param mixed $testPath * @param mixed $run * @param mixed $cached * @param mixed $events */ function GetDevToolsEvents($filter, $testPath, $run, $cached, &$events, &$startOffset, $multistep = false) { $ok = false; $events = array(); $devToolsFile = "{$testPath}/devtools.json"; if (gz_is_file($devToolsFile)) { $raw = trim(gz_file_get_contents($devToolsFile)); ParseDevToolsEvents($raw, $events, $filter, true, $startOffset, $multistep); } if (count($events)) { $ok = true; } return $ok; }
/** * Load a filtered list of events from the dev tools capture * * @param mixed $filter * @param TestPaths $localPaths Paths of the run or step to get the events for * @param array $events Gets set to an array containing the events * @param int $startOffset Gets set to the start offset * @return bool True if successful, false otherwise */ function GetDevToolsEventsForStep($filter, $localPaths, &$events, &$startOffset) { $ok = false; $events = array(); $devToolsFile = $localPaths->devtoolsFile(); if (gz_is_file($devToolsFile)) { $raw = trim(gz_file_get_contents($devToolsFile)); ParseDevToolsEvents($raw, $events, $filter, true, $startOffset); } if (count($events)) { $ok = true; } return $ok; }
/** * Load a filtered list of events from the dev tools capture * * @param mixed $filter * @param mixed $testPath * @param mixed $run * @param mixed $cached * @param mixed $events */ function GetDevToolsEvents($filter, $testPath, $run, $cached, &$events, &$startOffset) { $ok = false; $events = array(); $cachedText = ''; if ($cached) { $cachedText = '_Cached'; } $devToolsFile = "{$testPath}/{$run}{$cachedText}_devtools.json"; if (gz_is_file($devToolsFile)) { $raw = trim(gz_file_get_contents($devToolsFile)); ParseDevToolsEvents($raw, $events, $filter, true, $startOffset); } if (count($events)) { $ok = true; } return $ok; }