<?php ini_set('display_errors', 'true'); require_once 'functions.php'; $path = $_GET['path']; $mode = @$_GET['mode']; $rightcommit = @$_GET['rightcommit']; $commit = @$_GET['commit']; // Used from Phantom test $compareJSON = compareJSON(); if (file_exists($compareJSON)) { $compare = json_decode(file_get_contents($compareJSON)); $comment = @$compare->{$path}->comment; } $nightly = json_decode(@file_get_contents('nightly/nightly.json')); if ($nightly) { $nightly = @$nightly->results->{$path}; } $details = @file_get_contents("../../samples/{$path}/demo.details"); $isUnitTest = file_exists("../../samples/{$path}/unit-tests.js") || strstr($details, 'qunit') ? true : false; $isManual = strstr($details, 'requiresManualTesting: true') !== false; $skipTest = strstr($details, 'skipTest: true') !== false; if ($isUnitTest) { $bodyClass = 'single-col unit'; } elseif ($isManual) { $bodyClass = 'single-col manual'; } else { $bodyClass = 'visual'; } $browser = getBrowser(); $browserKey = $browser['parent'];
<?php require_once 'functions.php'; $browser = getBrowser(); $browserKey = isset($_GET['browserKey']) ? $_GET['browserKey'] : $browser['parent']; $compare = @json_decode(file_get_contents(compareJSON())); ?> <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Highcharts samples</title> <script type='text/javascript' src='http://code.jquery.com/jquery-1.9.1.js'></script> <script type="text/javascript" src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script> <link rel="stylesheet" type="text/css" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css"/> <link rel="stylesheet" type="text/css" href="style.css"/> <link href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet"> <script> /* eslint-disable */ var diffThreshold = 0; window.continueBatch = false; function batchMode() { window.continueBatch = true; $('#batch-compare').hide(); $('#batch-stop').show(); } function runBatch() {
<?php session_start(); require_once 'functions.php'; $path = isset($_GET['path']) ? $_GET['path'] : $path; $diff = isset($_GET['diff']) ? $_GET['diff'] : @$difference['dissimilarityIndex']; $rightcommit = @$_GET['rightcommit']; $commit = @$_GET['commit']; $reportFile = compareJSON(); // Commit-specific reports go in a separate file if ($rightcommit) { $reportFile = 'temp/compare-' . $rightcommit . '.json'; } $compare = file_exists($reportFile) ? json_decode(file_get_contents($reportFile)) : new stdClass(); $browser = getBrowser(); $key = isset($browser['parent']) ? $browser['parent'] : 'Unknown'; /* if (isset($compare->$path->$key) && isset($difference)) { $difference['reference'] = $compare->$path->$key; error_log('first case'); } else */ if (isset($diff)) { @($compare->{$path}->{$key} = $diff); } file_put_contents($reportFile, json_encode($compare, JSON_PRETTY_PRINT));
<?php require_once 'functions.php'; @unlink(compareJSON()); $files = glob('cache/*'); foreach ($files as $file) { if (is_file($file)) { unlink($file); // delete file } } ?> window.parent.location.reload();