/** * @return bool True if the step has a breakdown timeline, false otherwise */ public function hasBreakdownTimeline() { $info = $this->testInfo->getInfoArray(); if (!isset($info) || empty($info["timeline"])) { return false; } return $this->fileHandler->gzFileExists($this->localPaths->devtoolsFile()) || $this->fileHandler->gzFileExists($this->localPaths->devtoolsTraceFile()); }
/** * @param TestStepResult $stepResult * @return string Markup with links */ private function _getTraceLinks($stepResult) { $infoArray = $this->testInfo->getInfoArray(); $localPaths = $stepResult->createTestPaths(); if (empty($infoArray["trace"]) && !$this->testInfo->hasTimeline() || !gz_is_file($localPaths->devtoolsTraceFile())) { return ""; } $filenamePaths = $stepResult->createTestPaths(""); $urlGenerator = $stepResult->createUrlGenerator("", FRIENDLY_URLS); $zipUrl = $urlGenerator->getGZip($filenamePaths->devtoolsTraceFile()); $viewUrl = $urlGenerator->stepDetailPage("chrome/trace"); $out = "<br><br><a href=\"{$zipUrl}\" title=\"Download Chrome Trace\">Trace</a>\n"; $out .= " (<a href=\"{$viewUrl}\" title=\"View Chrome Trace\">view</a>)\n"; return $out; }