diff --git a/application/themehandler.class.inc.php b/application/themehandler.class.inc.php index 99931a724..d755ab062 100644 --- a/application/themehandler.class.inc.php +++ b/application/themehandler.class.inc.php @@ -173,12 +173,15 @@ class ThemeHandler $iStyleLastModified = 0; clearstatcache(); // Loading files to import and stylesheet to compile, also getting most recent modification time on overall files + + $aStylesheetFile=array(); foreach ($aThemeParameters['imports'] as $sImport) { $sTmpThemeScssContent .= '@import "'.$sImport.'";'."\n"; $sFile = static::FindStylesheetFile($sImport, $aImportsPaths); $iImportLastModified = @filemtime($sFile); + $aStylesheetFile[]=$sFile; $iStyleLastModified = $iStyleLastModified < $iImportLastModified ? $iImportLastModified : $iStyleLastModified; } foreach ($aThemeParameters['stylesheets'] as $sStylesheet) @@ -187,9 +190,25 @@ class ThemeHandler $sFile = static::FindStylesheetFile($sStylesheet, $aImportsPaths); $iStylesheetLastModified = @filemtime($sFile); + $aStylesheetFile[]=$sFile; $iStyleLastModified = $iStyleLastModified < $iStylesheetLastModified ? $iStylesheetLastModified : $iStyleLastModified; } + $aIncludedImages=self::GetIncludedImages($aThemeParameters['variables'], $aStylesheetFile, $sThemeFolderPath); + foreach ($aIncludedImages as $sImage) + { + if (!is_file($sImage)) + { + //TODO log warning + echo "Cannot find $sImage\n"; + } + else + { + $iStylesheetLastModified = @filemtime($sImage); + $iStyleLastModified = $iStyleLastModified < $iStylesheetLastModified ? $iStylesheetLastModified : $iStyleLastModified; + } + } + // Checking if our compiled css is outdated $iFilemetime = @filemtime($sThemeCssPath); $bFileExists = file_exists($sThemeCssPath); @@ -208,7 +227,7 @@ class ThemeHandler if (!$bFileExists || $bVarSignatureChanged || (is_writable($sThemeFolderPath) && ($iFilemetime < $iStyleLastModified))) { // Dates don't match. Second chance: check if the already compiled stylesheet exists and is consistent based on its signature - $sActualSignature = static::ComputeSignature($aThemeParameters, $aImportsPaths); + $sActualSignature = static::ComputeSignature($aThemeParameters, $aImportsPaths, $aIncludedImages); if ($bFileExists && !$bSetup) { @@ -251,16 +270,18 @@ CSS; * * @param string[] $aThemeParameters * @param string[] $aImportsPaths + * @param $aIncludedImages * * @return string * @throws \Exception */ - public static function ComputeSignature($aThemeParameters, $aImportsPaths) + public static function ComputeSignature($aThemeParameters, $aImportsPaths, $aIncludedImages) { $aSignature = array( 'variables' => md5(json_encode($aThemeParameters['variables'])), 'stylesheets' => array(), 'imports' => array(), + 'images' => array(), ); foreach ($aThemeParameters['imports'] as $key => $sImport) @@ -273,9 +294,278 @@ CSS; $sFile = static::FindStylesheetFile($sStylesheet, $aImportsPaths); $aSignature['stylesheets'][$key] = md5_file($sFile); } + foreach ($aIncludedImages as $sImage) + { + if (is_file($sImage)) + { + $aSignature['images'][$sImage] = md5_file($sImage); + } + } + return json_encode($aSignature); } + const IMAGE_EXTENSIONS = array('png', 'gif', 'jpg', 'jpeg'); + + /** + * Search for images referenced in stylesheet files + * @param $aThemeParametersVariables + * @param $aStylesheetFile + * @param $sThemeFolderPath : used as relative paths to find css images + * + * @return array + */ + public static function GetIncludedImages($aThemeParametersVariables, $aStylesheetFile, $sThemeFolderPath) + { + $aCompleteUrls = array(); + $aToCompleteUrls = array(); + $aMissingVariables = array(); + $aFoundVariables = array(); + $aMap = array( + 'aCompleteUrls' => $aCompleteUrls, + 'aToCompleteUrls' => $aToCompleteUrls, + 'aMissingVariables' => $aMissingVariables, + 'aFoundVariables' => $aFoundVariables, + ); + + foreach ($aStylesheetFile as $sStylesheetFile) + { + $aRes = self::GetAllUrlFromScss($aThemeParametersVariables, $sStylesheetFile); + foreach($aMap as $key => /** array */$aVal) + { + if (array_key_exists($key, $aMap)) + { + $aMap[$key]=array_merge($aVal, $aRes[$key]); + } + } + } + + $aMap = ThemeHandler::ResolveUncompleteUrlsFromScss($aMap, $aThemeParametersVariables, $aStylesheetFile); + $aImages = array(); + foreach ($aMap ['aCompleteUrls'] as $sUrl) + { + $sImg = $sUrl; + if (preg_match("/(.*)\?/", $sUrl, $aMatches)) + { + $sImg=$aMatches[1]; + } + + if (self::HasImageExtension($sImg) + && ! array_key_exists($sImg, $aImages)) + { + if (!is_file($sImg)) + { + $sImg=$sThemeFolderPath.DIRECTORY_SEPARATOR.$sImg; + } + $aImages[$sImg]=$sImg; + } + } + + return array_values($aImages); + } + + /** + * Complete url using provided variables. Example with $var=1: XX + $var => XX1 + * @param $aMap + * @param $aThemeParametersVariables + * @param $aStylesheetFile + * + * @return mixed + */ + public static function ResolveUncompleteUrlsFromScss($aMap, $aThemeParametersVariables, $aStylesheetFile) + { + $sContent=""; + foreach ($aStylesheetFile as $sStylesheetFile) + { + if (is_file($sStylesheetFile)) + { + $sContent .= '\n' . file_get_contents($sStylesheetFile); + } + } + + $aMissingVariables=$aMap['aMissingVariables']; + $aFoundVariables=$aMap['aFoundVariables']; + $aToCompleteUrls=$aMap['aToCompleteUrls']; + $aCompleteUrls=$aMap['aCompleteUrls']; + list($aMissingVariables, $aFoundVariables) = self::FindMissingVariables($aThemeParametersVariables, $aMissingVariables, $aFoundVariables, $sContent); + list($aToCompleteUrls, $aCompleteUrls) = self::ResolveUrls($aFoundVariables, $aToCompleteUrls, $aCompleteUrls); + $aMap['aMissingVariables']=$aMissingVariables; + $aMap['aFoundVariables']=$aFoundVariables; + $aMap['aToCompleteUrls']=$aToCompleteUrls; + $aMap['aCompleteUrls']=$aCompleteUrls; + return $aMap; + } + + /** + * Find missing variable values from SCSS content based on their name. + * @param $aThemeParametersVariables + * @param $aMissingVariables + * @param $aFoundVariables + * @param $sContent: scss content + * + * @return array + */ + public static function FindMissingVariables($aThemeParametersVariables, $aMissingVariables, $aFoundVariables, $sContent) + { + if (!empty($aMissingVariables)) + { + foreach ($aMissingVariables as $var) + { + if (array_key_exists($var, $aThemeParametersVariables)) + { + $aFoundVariables[$var] = $aThemeParametersVariables[$var]; + unset($aMissingVariables[$var]); + } + else + { + if (preg_match_all("/\\\$$var\s*:\s*[\"'](.*)[\"']/", $sContent, $aValues)) + { + $aFoundVariables[$var] = $aValues[1][0]; + unset($aMissingVariables[$var]); + } + } + } + } + + return array($aMissingVariables, $aFoundVariables); + } + + /** + * @param $aFoundVariables + * @param array $aToCompleteUrls + * @param array $aCompleteUrls + * + * @return array + */ + public static function ResolveUrls($aFoundVariables, array $aToCompleteUrls, array $aCompleteUrls) + { + if (!empty($aFoundVariables)) + { + foreach ($aToCompleteUrls as $sUrlTemplate) + { + unset($aToCompleteUrls[$sUrlTemplate]); + $sResolvedUrl = ThemeHandler::ResolveUrl($sUrlTemplate, $aFoundVariables); + if ($sResolvedUrl == false) + { + $aToCompleteUrls[$sUrlTemplate] = $sUrlTemplate; + } + else + { + $aCompleteUrls[$sUrlTemplate] = $sResolvedUrl; + } + } + } + + return array($aToCompleteUrls, $aCompleteUrls); + } + + /** + * Find all referenced URLs from a SCSS file. + * @param $aThemeParametersVariables + * @param $sStylesheetFile + * + * @return array + */ + public static function GetAllUrlFromScss($aThemeParametersVariables, $sStylesheetFile) + { + $aCompleteUrls = array(); + $aToCompleteUrls = array(); + $aMissingVariables = array(); + $aFoundVariables = array(); + + if (is_file($sStylesheetFile)) + { + $sContent = file_get_contents($sStylesheetFile); + if (preg_match_all("/url\s*\((.*)\)/", $sContent, $aMatches)) + { + foreach ($aMatches[1] as $path) + { + if (!array_key_exists($path, $aCompleteUrls) + && !array_key_exists($path, $aToCompleteUrls)) + { + if (preg_match_all("/\\$([\w-_]+)/", $path, $aCurrentVars)) + { + foreach ($aCurrentVars[1] as $var) + { + if (!array_key_exists($var, $aMissingVariables)) + { + $aMissingVariables[$var] = $var; + } + } + $aToCompleteUrls[$path] = $path; + } + else + { + $aCompleteUrls[$path] = trim($path, "\"'"); + } + } + } + } + if (!empty($aMissingVariables)) + { + list($aMissingVariables, $aFoundVariables) = self::FindMissingVariables($aThemeParametersVariables, $aMissingVariables, $aFoundVariables, $sContent); + list($aToCompleteUrls, $aCompleteUrls) = self::ResolveUrls($aFoundVariables, $aToCompleteUrls, $aCompleteUrls); + } + } + + return array( + 'aCompleteUrls' => $aCompleteUrls, + 'aToCompleteUrls' => $aToCompleteUrls, + 'aMissingVariables' => $aMissingVariables, + 'aFoundVariables' => $aFoundVariables, + ); + } + + /** + * Calculate url based on its template + variables. + * @param $sUrlTemplate + * @param $aFoundVariables + * + * @return bool|string + */ + public static function ResolveUrl($sUrlTemplate, $aFoundVariables) + { + $aPattern=array(); + $aReplacement=array(); + foreach ($aFoundVariables as $aFoundVariable => $aFoundVariableValue) + { + //XX + $key + YY + $aPattern[]="/['\"]\s*\+\s*\\\$" . $aFoundVariable . "[\s\+]+\s*['\"]/"; + //$key + YY + $aPattern[]="/\\\$" . $aFoundVariable. "[\s\+]+\s*['\"]/"; + //XX + $key + $aPattern[]="/['\"]\s*[\+\s]+\\\$" . $aFoundVariable . "$/"; + $aReplacement[]=$aFoundVariableValue; + $aReplacement[]=$aFoundVariableValue; + $aReplacement[]=$aFoundVariableValue; + } + $sResolvedUrl=preg_replace($aPattern, $aReplacement, $sUrlTemplate); + if (strpos($sResolvedUrl, "+")!=false) + { + return false; + } + return trim($sResolvedUrl, "\"'"); + } + + /** + * indicate whether a string ends with image suffix. + * @param $path + * + * @return bool + */ + private static function HasImageExtension($path) + { + foreach (self::IMAGE_EXTENSIONS as $sExt) + { + if (endsWith($path, $sExt)) + { + return true; + } + } + return false; + } + + /** * Extract the signature for a generated CSS file. The signature MUST be alone one line immediately * followed (on the next line) by the === SIGNATURE END === pattern diff --git a/test/application/ThemeHandlerTest.php b/test/application/ThemeHandlerTest.php index c72a5a98e..1fe2aa00c 100644 --- a/test/application/ThemeHandlerTest.php +++ b/test/application/ThemeHandlerTest.php @@ -14,6 +14,7 @@ class ThemeHandlerTest extends ItopTestCase private $cssPath; private $jsonThemeParamFile; private $tmpDir; + private $aDirsToCleanup=array(); public function setUp() { @@ -25,6 +26,7 @@ class ThemeHandlerTest extends ItopTestCase ThemeHandler::mockCompileCSSService($this->compileCSSServiceMock); $this->tmpDir=$this->tmpdir(); + $aDirsToCleanup[] = $this->tmpDir; if (!is_dir($this->tmpDir ."/branding")) { @@ -37,6 +39,30 @@ class ThemeHandlerTest extends ItopTestCase $this->recurse_copy(APPROOT."/test/application/theme-handler/expected/css", $this->tmpDir."/branding/css"); } + public function tearDown() + { + parent::tearDown(); + foreach ($this->aDirsToCleanup as $dir) + { + $this->rrmdir($dir); + } + } + + function rrmdir($dir) { + if (is_dir($dir)) { + $objects = scandir($dir); + foreach ($objects as $object) { + if ($object != "." && $object != "..") { + if (is_dir($dir."/".$object)) + $this->rrmdir($dir."/".$object); + else + unlink($dir."/".$object); + } + } + rmdir($dir); + } + } + function tmpdir() { $tmpfile=tempnam(sys_get_temp_dir(),''); if (file_exists($tmpfile)) @@ -68,11 +94,106 @@ class ThemeHandlerTest extends ItopTestCase closedir($dir); } + /** + * Test used to be notified by CI when precompiled styles are not up to date anymore in code repository. + * @param $xmlDataCusto + * @dataProvider providePrecompiledStyleSheets + * @throws \Exception + */ + public function testValidatePrecompiledStyles($xmlDataCusto) + { + echo "=== datamodel custo: $xmlDataCusto\n"; + $oDom = new MFDocument(); + $oDom->load($xmlDataCusto); + /**DOMNodeList **/$oThemeNodes=$oDom->GetNodes("/itop_design/branding/themes/theme"); + $this->assertNotNull($oThemeNodes); + + // Parsing themes from DM + foreach($oThemeNodes as $oTheme) + { + $sPrecompiledStylesheet = $oTheme->GetChildText('precompiled_stylesheet', ''); + if (empty($sPrecompiledStylesheet)) + { + continue; + } + + $sThemeId = $oTheme->getAttribute('id'); + + echo "=== theme: $sThemeId ===\n"; + $precompiledSig= ThemeHandler::GetSignature(dirname(__FILE__)."/../../datamodels/2.x/".$sPrecompiledStylesheet); + echo " precompiled signature: $precompiledSig\n"; + $this->assertFalse(empty($precompiledSig), "Signature in precompiled theme '".$sThemeId."' is not retrievable (cf precompiledsheet $sPrecompiledStylesheet / datamodel $xmlDataCusto)"); + + $aThemeParameters = array( + 'variables' => array(), + 'imports' => array(), + 'stylesheets' => array(), + 'precompiled_stylesheet' => '', + ); + + $aThemeParameters['precompiled_stylesheet'] = $sPrecompiledStylesheet; + /** @var \DOMNodeList $oVariables */ + $oVariables = $oTheme->GetNodes('variables/variable'); + foreach($oVariables as $oVariable) + { + $sVariableId = $oVariable->getAttribute('id'); + $aThemeParameters['variables'][$sVariableId] = $oVariable->GetText(); + } + + /** @var \DOMNodeList $oImports */ + $oImports = $oTheme->GetNodes('imports/import'); + foreach($oImports as $oImport) + { + $sImportId = $oImport->getAttribute('id'); + $aThemeParameters['imports'][$sImportId] = $oImport->GetText(); + } + + /** @var \DOMNodeList $oStylesheets */ + $oStylesheets = $oTheme->GetNodes('stylesheets/stylesheet'); + foreach($oStylesheets as $oStylesheet) + { + $sStylesheetId = $oStylesheet->getAttribute('id'); + $aThemeParameters['stylesheets'][$sStylesheetId] = $oStylesheet->GetText(); + } + $sThemeFolderPath = APPROOT.'env-production/branding/themes/'.$sThemeId.'/test'; + if (!is_dir($sThemeFolderPath)) + { + mkdir($sThemeFolderPath); + } + $compiled_json_sig = ThemeHandler::ComputeSignature($aThemeParameters, array(APPROOT.'datamodels'), $sThemeFolderPath); + echo " current signature: $compiled_json_sig\n"; + rmdir($sThemeFolderPath); + $this->assertEquals($precompiledSig, $compiled_json_sig, "Precompiled signature does not match currently compiled one on theme '".$sThemeId."' (cf precompiledsheet $sPrecompiledStylesheet / datamodel $xmlDataCusto)"); + } + + } + + public function providePrecompiledStyleSheets() + { + $datamodelfiles=glob(dirname(__FILE__)."/../../datamodels/2.x/**/datamodel*.xml"); + $test_set = array(); + + foreach ($datamodelfiles as $datamodelfile) + { + if (is_file($datamodelfile) && + $datamodelfile=="/var/www/html/iTop/test/application/../../datamodels/2.x/itop-config-mgmt/datamodel.itop-config-mgmt.xml") + { + $content=file_get_contents($datamodelfile); + if (strpos($content, "precompiled_stylesheet")!==false) + { + $test_set[$datamodelfile]=array($datamodelfile); + } + } + } + + return $test_set; + } + public function testGetSignature() { $sig = ThemeHandler::GetSignature(APPROOT.'test/application/theme-handler/expected/themes/basque-red/main.css'); $expect_sig=<<assertEquals($expect_sig,$sig); @@ -182,9 +303,31 @@ JSON; */ public function testCompileThemes($ThemeParametersJson, $CompileCSSFromSASSCount, $missingFile=0, $filesTouchedRecently=0, $fileMd5sumModified=0, $fileToTest=null, $expected_maincss_path=null, $bSetup=true) { - $fileToTest=$this->tmpDir.'/'.$fileToTest; + if (is_file($this->tmpDir.'/'.$fileToTest)) + { + $fileToTest=$this->tmpDir.'/'.$fileToTest; + } + else + { + $fileToTest=APPROOT.'/'.$fileToTest; + } + $cssPath = $this->tmpDir . '/branding/themes/basque-red/main.css'; - copy(APPROOT . 'test/application/theme-handler/expected/themes/basque-red/main.css', $cssPath); + copy(APPROOT."test/application/theme-handler/expected/themes/basque-red/main_testcompilethemes.css", $cssPath); + + $sAbsoluteImagePath = APPROOT .'test/application/theme-handler/copied/testimages/'; + @mkdir(APPROOT .'test/application/theme-handler/copied/'); + @mkdir($sAbsoluteImagePath); + $aDirsToCleanup[] = $sAbsoluteImagePath; + $this->recurse_copy(APPROOT .'test/application/theme-handler/expected/testimages/', $sAbsoluteImagePath); + + //change approot-relative in css-variable to use absolute path + $sCssVarPath = $this->tmpDir."/branding/css/css-variables.scss"; + $sCssVariableContent = file_get_contents($sCssVarPath); + $sLine = '$approot-relative: "' . $sAbsoluteImagePath . '" !default;'; + + $sCssVariableContent=preg_replace("/\\\$approot-relative: \"(.*)\"/", $sLine, $sCssVariableContent); + file_put_contents($sCssVarPath, $sCssVariableContent); if ($missingFile==1) { @@ -223,14 +366,16 @@ JSON; $modifiedVariableThemeParameterJson='{"variables":{"brand-primary1":"#C53030","hover-background-color":"#F6F6F6","icons-filter":"grayscale(1)","search-form-container-bg-color":"#4A5568"},"imports":{"css-variables":"..\/css\/css-variables.scss"},"stylesheets":{"jqueryui":"..\/css\/ui-lightness\/jqueryui.scss","main":"..\/css\/light-grey.scss"}}'; $initialThemeParamJson='{"variables":{"brand-primary":"#C53030","hover-background-color":"#F6F6F6","icons-filter":"grayscale(1)","search-form-container-bg-color":"#4A5568"},"imports":{"css-variables":"..\/css\/css-variables.scss"},"stylesheets":{"jqueryui":"..\/css\/ui-lightness\/jqueryui.scss","main":"..\/css\/light-grey.scss"}}'; $import_file_path = '/branding/css/css-variables.scss'; - $importmodified_maincss="test/application/theme-handler/expected/themes/basque-red/main_importmodified.css"; $varchanged_maincss="test/application/theme-handler/expected/themes/basque-red/main_varchanged.css"; $stylesheet_maincss="test/application/theme-handler/expected/themes/basque-red/main_stylesheet.css"; + $image_maincss="test/application/theme-handler/expected/themes/basque-red/main_imagemodified.css"; + $importmodified_maincss="test/application/theme-handler/expected/themes/basque-red/main_importmodified.css"; $stylesheet_file_path = '/branding/css/light-grey.scss'; + $image_file_path = 'test/application/theme-handler/copied/testimages/images/green-header.gif'; return array( "setup context: variables list modified without any file touched" => array($modifiedVariableThemeParameterJson, 1,0,0,0,$import_file_path, $varchanged_maincss), "setup context: variables list modified with files touched" => array($modifiedVariableThemeParameterJson, 1,0,1,0,$import_file_path, $varchanged_maincss, false), - "itop page/theme loading; variables list modified sans touch de fichier" => array($modifiedVariableThemeParameterJson, 0,0,0,0,$import_file_path, $varchanged_maincss, false), + "itop page/theme loading; variables list modified without any file touched" => array($modifiedVariableThemeParameterJson, 0,0,0,0,$import_file_path, $varchanged_maincss, false), //imports "import file missing" => array($initialThemeParamJson, 0, 1, 0, 0, $import_file_path), "import file touched" => array($initialThemeParamJson, 0, 0, 1, 0, $import_file_path), @@ -238,96 +383,81 @@ JSON; //stylesheets "stylesheets file missing" => array($initialThemeParamJson, 0, 1, 0, 0, $stylesheet_file_path), "stylesheets file touched" => array($initialThemeParamJson, 0, 0, 1, 0, $stylesheet_file_path), - "stylesheets file modified" => array($initialThemeParamJson, 1, 0, 0, 1, $stylesheet_file_path, $stylesheet_maincss) + "stylesheets file modified" => array($initialThemeParamJson, 1, 0, 0, 1, $stylesheet_file_path, $stylesheet_maincss), + //images + "image file missing" => array($initialThemeParamJson, 0, 1, 0, 0, $image_file_path), + "image file touched" => array($initialThemeParamJson, 0, 0, 1, 0, $image_file_path), + "image file modified" => array($initialThemeParamJson, 1, 0, 0, 1, $image_file_path, $image_maincss), ); } /** - * @param $xmlDataCusto - * @dataProvider providePrecompiledStyleSheets - * @throws \Exception + * @param $sScssFile + * + * @dataProvider GetAllUrlFromScssProvider */ - public function testValidatePrecompiledStyles($xmlDataCusto) + public function testGetAllUrlFromScss($sScssFile) { - echo "=== datamodel custo: $xmlDataCusto\n"; - $oDom = new MFDocument(); - $oDom->load($xmlDataCusto); - /**DOMNodeList **/$oThemeNodes=$oDom->GetNodes("/itop_design/branding/themes/theme"); - $this->assertNotNull($oThemeNodes); - - // Parsing themes from DM - foreach($oThemeNodes as $oTheme) - { - $sPrecompiledStylesheet = $oTheme->GetChildText('precompiled_stylesheet', ''); - if (empty($sPrecompiledStylesheet)) - { - continue; - } - - $sThemeId = $oTheme->getAttribute('id'); - - echo "=== theme: $sThemeId ===\n"; - $precompiledSig= ThemeHandler::GetSignature(dirname(__FILE__)."/../../datamodels/2.x/".$sPrecompiledStylesheet); - echo " precompiled signature: $precompiledSig\n"; - $this->assertFalse(empty($precompiledSig), "Signature in precompiled theme '".$sThemeId."' is not retrievable (cf precompiledsheet $sPrecompiledStylesheet / datamodel $xmlDataCusto)"); - - $aThemeParameters = array( - 'variables' => array(), - 'imports' => array(), - 'stylesheets' => array(), - 'precompiled_stylesheet' => '', - ); - - $aThemeParameters['precompiled_stylesheet'] = $sPrecompiledStylesheet; - /** @var \DOMNodeList $oVariables */ - $oVariables = $oTheme->GetNodes('variables/variable'); - foreach($oVariables as $oVariable) - { - $sVariableId = $oVariable->getAttribute('id'); - $aThemeParameters['variables'][$sVariableId] = $oVariable->GetText(); - } - - /** @var \DOMNodeList $oImports */ - $oImports = $oTheme->GetNodes('imports/import'); - foreach($oImports as $oImport) - { - $sImportId = $oImport->getAttribute('id'); - $aThemeParameters['imports'][$sImportId] = $oImport->GetText(); - } - - /** @var \DOMNodeList $oStylesheets */ - $oStylesheets = $oTheme->GetNodes('stylesheets/stylesheet'); - foreach($oStylesheets as $oStylesheet) - { - $sStylesheetId = $oStylesheet->getAttribute('id'); - $aThemeParameters['stylesheets'][$sStylesheetId] = $oStylesheet->GetText(); - } - $compiled_json_sig = ThemeHandler::ComputeSignature($aThemeParameters, array(APPROOT.'datamodels')); - echo " current signature: $compiled_json_sig\n"; - $this->assertEquals($precompiledSig, $compiled_json_sig, "Precompiled signature does not match currently compiled one on theme '".$sThemeId."' (cf precompiledsheet $sPrecompiledStylesheet / datamodel $xmlDataCusto)"); - } - + $aIncludedUrls = ThemeHandler::GetAllUrlFromScss(array('attr' => "123"),APPROOT.$sScssFile); + $this->assertEquals(array('version1'), array_values($aIncludedUrls['aMissingVariables'])); + $this->assertEquals(array("approot-relative" => "../../../../../", "version" => "aaa", "attr"=>"123"), + $aIncludedUrls['aFoundVariables']); + $expected_array = array( + 'css/ui-lightness/images/tutu.jpg', + "css/ui-lightness/images/tata.jpeg", + 'abc/../../../../../css/ui-lightness/images/toutou.png?v=aaa', + "../../../../../css/ui-lightness/images/toto.png?v=aaa", + "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7?v=aaa", + "css/ui-lightness/images/tete.jpeg?g=123" + ); + $aIncludedUrls['aCompleteUrls']; + $this->assertEquals($expected_array, array_values($aIncludedUrls['aCompleteUrls'])); + $this->assertEquals(array('$approot-relative + \'css/ui-lightness/images/titi.gif?v=\' + $version1'), array_values($aIncludedUrls['aToCompleteUrls'])); } - public function providePrecompiledStyleSheets() + /** + * @return array + */ + public function GetAllUrlFromScssProvider() { - $datamodelfiles=glob(dirname(__FILE__)."/../../datamodels/2.x/**/datamodel*.xml"); - $test_set = array(); - - foreach ($datamodelfiles as $datamodelfile) - { - if (is_file($datamodelfile) && - $datamodelfile=="/var/www/html/iTop/test/application/../../datamodels/2.x/itop-config-mgmt/datamodel.itop-config-mgmt.xml") - { - $content=file_get_contents($datamodelfile); - if (strpos($content, "precompiled_stylesheet")!==false) - { - $test_set[$datamodelfile]=array($datamodelfile); - } - } - } - - return $test_set; + return array('test-getimages.scss' => array('test/application/theme-handler/getimages/test-getimages.scss')); } + /** + * @param $sUrlTemplate + * @param $aFoundVariables + * @param $sExpectedUrl + * + * @dataProvider ResolveUrlProvider + */ + public function testResolveUrl($sUrlTemplate, $aFoundVariables, $sExpectedUrl) + { + $this->assertEquals($sExpectedUrl, ThemeHandler::ResolveUrl($sUrlTemplate, $aFoundVariables)); + } + + public function ResolveUrlProvider() + { + return array( + 'XXX + $key1 UNresolved' => array("abc/'+ \$key1", array('key'=>'123'), false), + '$key1 + XXX UNresolved' => array("\$key1 + abs", array('key'=>'123'), false), + 'XXX + $key UNresolved' => array("abc/'+ \$unknownkey", array('key'=>'123'), false), + 'XXX + $key resolved' => array("abc/'+ \$key", array('key'=>'123'), "abc/123"), + 'XXX + $key1 resolved' => array("abc/'+ \$key1", array('key1'=>'123'), "abc/123"), + '$key + XXX resolved' => array("\$key + \"/abc", array('key'=>'123'), "123/abc"), + 'XXX + $key + YYY resolved' => array("abc/'+ \$key + '/def", array('key'=>'123'), "abc/123/def"), + ); + } + + public function testGetIncludedImages() + { + $aStylesheetFile=glob($this->tmpDir."/branding/css/*.scss"); + $aStylesheetFile[]=$this->tmpDir."/branding/css/ui-lightness/jqueryui.scss"; + $expectJsonFilePath = APPROOT.'test/application/theme-handler/expected/themes/basque-red/theme-parameters.json'; + $expectedThemeParamJson = file_get_contents($expectJsonFilePath); + $aThemeParametersVariables = json_decode($expectedThemeParamJson, true); + $aIncludedImages = ThemeHandler::GetIncludedImages($aThemeParametersVariables['variables'], $aStylesheetFile, "RELATIVEPATH"); + + $aExpectedImages = json_decode(file_get_contents(APPROOT.'test/application/theme-handler/getimages/expected-getimages.json'), true); + $this->assertEquals($aExpectedImages, $aIncludedImages); + } } \ No newline at end of file diff --git a/test/application/theme-handler/copied/testimages/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/test/application/theme-handler/copied/testimages/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png new file mode 100644 index 000000000..ea3abcbd5 Binary files /dev/null and b/test/application/theme-handler/copied/testimages/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png differ diff --git a/test/application/theme-handler/copied/testimages/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png b/test/application/theme-handler/copied/testimages/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png new file mode 100644 index 000000000..61826c13c Binary files /dev/null and b/test/application/theme-handler/copied/testimages/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png differ diff --git a/test/application/theme-handler/copied/testimages/css/ui-lightness/images/ui-icons_1c94c4_256x240.png b/test/application/theme-handler/copied/testimages/css/ui-lightness/images/ui-icons_1c94c4_256x240.png new file mode 100644 index 000000000..b74ef5986 Binary files /dev/null and b/test/application/theme-handler/copied/testimages/css/ui-lightness/images/ui-icons_1c94c4_256x240.png differ diff --git a/test/application/theme-handler/copied/testimages/css/ui-lightness/images/ui-icons_222222_256x240.png b/test/application/theme-handler/copied/testimages/css/ui-lightness/images/ui-icons_222222_256x240.png new file mode 100644 index 000000000..e9c8e16ac Binary files /dev/null and b/test/application/theme-handler/copied/testimages/css/ui-lightness/images/ui-icons_222222_256x240.png differ diff --git a/test/application/theme-handler/copied/testimages/css/ui-lightness/images/ui-icons_E87C1E_256x240.png b/test/application/theme-handler/copied/testimages/css/ui-lightness/images/ui-icons_E87C1E_256x240.png new file mode 100644 index 000000000..07fa75b35 Binary files /dev/null and b/test/application/theme-handler/copied/testimages/css/ui-lightness/images/ui-icons_E87C1E_256x240.png differ diff --git a/test/application/theme-handler/copied/testimages/css/ui-lightness/images/ui-icons_F26522_256x240.png b/test/application/theme-handler/copied/testimages/css/ui-lightness/images/ui-icons_F26522_256x240.png new file mode 100644 index 000000000..2e7852423 Binary files /dev/null and b/test/application/theme-handler/copied/testimages/css/ui-lightness/images/ui-icons_F26522_256x240.png differ diff --git a/test/application/theme-handler/copied/testimages/css/ui-lightness/images/ui-icons_ffd27a_256x240.png b/test/application/theme-handler/copied/testimages/css/ui-lightness/images/ui-icons_ffd27a_256x240.png new file mode 100644 index 000000000..4435b497e Binary files /dev/null and b/test/application/theme-handler/copied/testimages/css/ui-lightness/images/ui-icons_ffd27a_256x240.png differ diff --git a/test/application/theme-handler/copied/testimages/css/ui-lightness/images/ui-icons_ffffff_256x240.png b/test/application/theme-handler/copied/testimages/css/ui-lightness/images/ui-icons_ffffff_256x240.png new file mode 100644 index 000000000..4d66f596e Binary files /dev/null and b/test/application/theme-handler/copied/testimages/css/ui-lightness/images/ui-icons_ffffff_256x240.png differ diff --git a/test/application/theme-handler/copied/testimages/images/ac-background.gif b/test/application/theme-handler/copied/testimages/images/ac-background.gif new file mode 100644 index 000000000..5f72b4f03 Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/ac-background.gif differ diff --git a/test/application/theme-handler/copied/testimages/images/actions_right.png b/test/application/theme-handler/copied/testimages/images/actions_right.png new file mode 100644 index 000000000..fe7fc5483 Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/actions_right.png differ diff --git a/test/application/theme-handler/copied/testimages/images/bg.gif b/test/application/theme-handler/copied/testimages/images/bg.gif new file mode 100644 index 000000000..e2d7d0e3c Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/bg.gif differ diff --git a/test/application/theme-handler/copied/testimages/images/breadcrumb-separator.png b/test/application/theme-handler/copied/testimages/images/breadcrumb-separator.png new file mode 100644 index 000000000..0eba6f0e0 Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/breadcrumb-separator.png differ diff --git a/test/application/theme-handler/copied/testimages/images/calendar.png b/test/application/theme-handler/copied/testimages/images/calendar.png new file mode 100644 index 000000000..353be63d9 Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/calendar.png differ diff --git a/test/application/theme-handler/copied/testimages/images/delete.png b/test/application/theme-handler/copied/testimages/images/delete.png new file mode 100644 index 000000000..e9920bf47 Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/delete.png differ diff --git a/test/application/theme-handler/copied/testimages/images/desc.gif b/test/application/theme-handler/copied/testimages/images/desc.gif new file mode 100644 index 000000000..e59584d35 Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/desc.gif differ diff --git a/test/application/theme-handler/copied/testimages/images/error.png b/test/application/theme-handler/copied/testimages/images/error.png new file mode 100644 index 000000000..dbfda2297 Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/error.png differ diff --git a/test/application/theme-handler/copied/testimages/images/eye-closed-555.png b/test/application/theme-handler/copied/testimages/images/eye-closed-555.png new file mode 100644 index 000000000..6366701c3 Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/eye-closed-555.png differ diff --git a/test/application/theme-handler/copied/testimages/images/eye-closed-fff.png b/test/application/theme-handler/copied/testimages/images/eye-closed-fff.png new file mode 100644 index 000000000..765064b1a Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/eye-closed-fff.png differ diff --git a/test/application/theme-handler/copied/testimages/images/eye-open-555.png b/test/application/theme-handler/copied/testimages/images/eye-open-555.png new file mode 100644 index 000000000..9cc1cb0ee Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/eye-open-555.png differ diff --git a/test/application/theme-handler/copied/testimages/images/eye-open-fff.png b/test/application/theme-handler/copied/testimages/images/eye-open-fff.png new file mode 100644 index 000000000..b118f2b3f Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/eye-open-fff.png differ diff --git a/test/application/theme-handler/copied/testimages/images/full-screen.png b/test/application/theme-handler/copied/testimages/images/full-screen.png new file mode 100644 index 000000000..300b153db Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/full-screen.png differ diff --git a/test/application/theme-handler/copied/testimages/images/green-header.gif b/test/application/theme-handler/copied/testimages/images/green-header.gif new file mode 100644 index 000000000..f5840defd Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/green-header.gif differ diff --git a/test/application/theme-handler/copied/testimages/images/green-square.gif b/test/application/theme-handler/copied/testimages/images/green-square.gif new file mode 100644 index 000000000..d9611644d Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/green-square.gif differ diff --git a/test/application/theme-handler/copied/testimages/images/indicator.gif b/test/application/theme-handler/copied/testimages/images/indicator.gif new file mode 100644 index 000000000..085ccaeca Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/indicator.gif differ diff --git a/test/application/theme-handler/copied/testimages/images/info-mini.png b/test/application/theme-handler/copied/testimages/images/info-mini.png new file mode 100644 index 000000000..de189bd8f Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/info-mini.png differ diff --git a/test/application/theme-handler/copied/testimages/images/minus.gif b/test/application/theme-handler/copied/testimages/images/minus.gif new file mode 100644 index 000000000..289ea7374 Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/minus.gif differ diff --git a/test/application/theme-handler/copied/testimages/images/ok.png b/test/application/theme-handler/copied/testimages/images/ok.png new file mode 100644 index 000000000..46710a0cd Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/ok.png differ diff --git a/test/application/theme-handler/copied/testimages/images/orange-header.gif b/test/application/theme-handler/copied/testimages/images/orange-header.gif new file mode 100644 index 000000000..b491460d7 Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/orange-header.gif differ diff --git a/test/application/theme-handler/copied/testimages/images/plus.gif b/test/application/theme-handler/copied/testimages/images/plus.gif new file mode 100644 index 000000000..a2ec0742e Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/plus.gif differ diff --git a/test/application/theme-handler/copied/testimages/images/red-header.gif b/test/application/theme-handler/copied/testimages/images/red-header.gif new file mode 100644 index 000000000..505896969 Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/red-header.gif differ diff --git a/test/application/theme-handler/copied/testimages/images/truncated.png b/test/application/theme-handler/copied/testimages/images/truncated.png new file mode 100644 index 000000000..57d3e77ea Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/truncated.png differ diff --git a/test/application/theme-handler/copied/testimages/images/tv-collapsable-last.gif b/test/application/theme-handler/copied/testimages/images/tv-collapsable-last.gif new file mode 100644 index 000000000..4acff93b0 Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/tv-collapsable-last.gif differ diff --git a/test/application/theme-handler/copied/testimages/images/tv-collapsable.gif b/test/application/theme-handler/copied/testimages/images/tv-collapsable.gif new file mode 100644 index 000000000..857262fae Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/tv-collapsable.gif differ diff --git a/test/application/theme-handler/copied/testimages/images/tv-expandable-last.gif b/test/application/theme-handler/copied/testimages/images/tv-expandable-last.gif new file mode 100644 index 000000000..1ede2de78 Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/tv-expandable-last.gif differ diff --git a/test/application/theme-handler/copied/testimages/images/tv-expandable.gif b/test/application/theme-handler/copied/testimages/images/tv-expandable.gif new file mode 100644 index 000000000..305d57fc8 Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/tv-expandable.gif differ diff --git a/test/application/theme-handler/copied/testimages/images/tv-item-last.gif b/test/application/theme-handler/copied/testimages/images/tv-item-last.gif new file mode 100644 index 000000000..42a139ad5 Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/tv-item-last.gif differ diff --git a/test/application/theme-handler/copied/testimages/images/tv-item.gif b/test/application/theme-handler/copied/testimages/images/tv-item.gif new file mode 100644 index 000000000..281e5dce6 Binary files /dev/null and b/test/application/theme-handler/copied/testimages/images/tv-item.gif differ diff --git a/test/application/theme-handler/expected/testimages/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/test/application/theme-handler/expected/testimages/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png new file mode 100644 index 000000000..ea3abcbd5 Binary files /dev/null and b/test/application/theme-handler/expected/testimages/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png differ diff --git a/test/application/theme-handler/expected/testimages/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png b/test/application/theme-handler/expected/testimages/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png new file mode 100644 index 000000000..61826c13c Binary files /dev/null and b/test/application/theme-handler/expected/testimages/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png differ diff --git a/test/application/theme-handler/expected/testimages/css/ui-lightness/images/ui-icons_1c94c4_256x240.png b/test/application/theme-handler/expected/testimages/css/ui-lightness/images/ui-icons_1c94c4_256x240.png new file mode 100644 index 000000000..b74ef5986 Binary files /dev/null and b/test/application/theme-handler/expected/testimages/css/ui-lightness/images/ui-icons_1c94c4_256x240.png differ diff --git a/test/application/theme-handler/expected/testimages/css/ui-lightness/images/ui-icons_222222_256x240.png b/test/application/theme-handler/expected/testimages/css/ui-lightness/images/ui-icons_222222_256x240.png new file mode 100644 index 000000000..e9c8e16ac Binary files /dev/null and b/test/application/theme-handler/expected/testimages/css/ui-lightness/images/ui-icons_222222_256x240.png differ diff --git a/test/application/theme-handler/expected/testimages/css/ui-lightness/images/ui-icons_E87C1E_256x240.png b/test/application/theme-handler/expected/testimages/css/ui-lightness/images/ui-icons_E87C1E_256x240.png new file mode 100644 index 000000000..07fa75b35 Binary files /dev/null and b/test/application/theme-handler/expected/testimages/css/ui-lightness/images/ui-icons_E87C1E_256x240.png differ diff --git a/test/application/theme-handler/expected/testimages/css/ui-lightness/images/ui-icons_F26522_256x240.png b/test/application/theme-handler/expected/testimages/css/ui-lightness/images/ui-icons_F26522_256x240.png new file mode 100644 index 000000000..2e7852423 Binary files /dev/null and b/test/application/theme-handler/expected/testimages/css/ui-lightness/images/ui-icons_F26522_256x240.png differ diff --git a/test/application/theme-handler/expected/testimages/css/ui-lightness/images/ui-icons_ffd27a_256x240.png b/test/application/theme-handler/expected/testimages/css/ui-lightness/images/ui-icons_ffd27a_256x240.png new file mode 100644 index 000000000..4435b497e Binary files /dev/null and b/test/application/theme-handler/expected/testimages/css/ui-lightness/images/ui-icons_ffd27a_256x240.png differ diff --git a/test/application/theme-handler/expected/testimages/css/ui-lightness/images/ui-icons_ffffff_256x240.png b/test/application/theme-handler/expected/testimages/css/ui-lightness/images/ui-icons_ffffff_256x240.png new file mode 100644 index 000000000..4d66f596e Binary files /dev/null and b/test/application/theme-handler/expected/testimages/css/ui-lightness/images/ui-icons_ffffff_256x240.png differ diff --git a/test/application/theme-handler/expected/testimages/images/ac-background.gif b/test/application/theme-handler/expected/testimages/images/ac-background.gif new file mode 100644 index 000000000..5f72b4f03 Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/ac-background.gif differ diff --git a/test/application/theme-handler/expected/testimages/images/actions_right.png b/test/application/theme-handler/expected/testimages/images/actions_right.png new file mode 100644 index 000000000..fe7fc5483 Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/actions_right.png differ diff --git a/test/application/theme-handler/expected/testimages/images/bg.gif b/test/application/theme-handler/expected/testimages/images/bg.gif new file mode 100644 index 000000000..e2d7d0e3c Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/bg.gif differ diff --git a/test/application/theme-handler/expected/testimages/images/breadcrumb-separator.png b/test/application/theme-handler/expected/testimages/images/breadcrumb-separator.png new file mode 100644 index 000000000..0eba6f0e0 Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/breadcrumb-separator.png differ diff --git a/test/application/theme-handler/expected/testimages/images/calendar.png b/test/application/theme-handler/expected/testimages/images/calendar.png new file mode 100644 index 000000000..353be63d9 Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/calendar.png differ diff --git a/test/application/theme-handler/expected/testimages/images/delete.png b/test/application/theme-handler/expected/testimages/images/delete.png new file mode 100644 index 000000000..e9920bf47 Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/delete.png differ diff --git a/test/application/theme-handler/expected/testimages/images/desc.gif b/test/application/theme-handler/expected/testimages/images/desc.gif new file mode 100644 index 000000000..e59584d35 Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/desc.gif differ diff --git a/test/application/theme-handler/expected/testimages/images/error.png b/test/application/theme-handler/expected/testimages/images/error.png new file mode 100644 index 000000000..dbfda2297 Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/error.png differ diff --git a/test/application/theme-handler/expected/testimages/images/eye-closed-555.png b/test/application/theme-handler/expected/testimages/images/eye-closed-555.png new file mode 100644 index 000000000..6366701c3 Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/eye-closed-555.png differ diff --git a/test/application/theme-handler/expected/testimages/images/eye-closed-fff.png b/test/application/theme-handler/expected/testimages/images/eye-closed-fff.png new file mode 100644 index 000000000..765064b1a Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/eye-closed-fff.png differ diff --git a/test/application/theme-handler/expected/testimages/images/eye-open-555.png b/test/application/theme-handler/expected/testimages/images/eye-open-555.png new file mode 100644 index 000000000..9cc1cb0ee Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/eye-open-555.png differ diff --git a/test/application/theme-handler/expected/testimages/images/eye-open-fff.png b/test/application/theme-handler/expected/testimages/images/eye-open-fff.png new file mode 100644 index 000000000..b118f2b3f Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/eye-open-fff.png differ diff --git a/test/application/theme-handler/expected/testimages/images/full-screen.png b/test/application/theme-handler/expected/testimages/images/full-screen.png new file mode 100644 index 000000000..300b153db Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/full-screen.png differ diff --git a/test/application/theme-handler/expected/testimages/images/green-header.gif b/test/application/theme-handler/expected/testimages/images/green-header.gif new file mode 100644 index 000000000..ad0b2b7d1 Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/green-header.gif differ diff --git a/test/application/theme-handler/expected/testimages/images/green-square.gif b/test/application/theme-handler/expected/testimages/images/green-square.gif new file mode 100644 index 000000000..d9611644d Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/green-square.gif differ diff --git a/test/application/theme-handler/expected/testimages/images/indicator.gif b/test/application/theme-handler/expected/testimages/images/indicator.gif new file mode 100644 index 000000000..085ccaeca Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/indicator.gif differ diff --git a/test/application/theme-handler/expected/testimages/images/info-mini.png b/test/application/theme-handler/expected/testimages/images/info-mini.png new file mode 100644 index 000000000..de189bd8f Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/info-mini.png differ diff --git a/test/application/theme-handler/expected/testimages/images/minus.gif b/test/application/theme-handler/expected/testimages/images/minus.gif new file mode 100644 index 000000000..289ea7374 Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/minus.gif differ diff --git a/test/application/theme-handler/expected/testimages/images/ok.png b/test/application/theme-handler/expected/testimages/images/ok.png new file mode 100644 index 000000000..46710a0cd Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/ok.png differ diff --git a/test/application/theme-handler/expected/testimages/images/orange-header.gif b/test/application/theme-handler/expected/testimages/images/orange-header.gif new file mode 100644 index 000000000..b491460d7 Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/orange-header.gif differ diff --git a/test/application/theme-handler/expected/testimages/images/plus.gif b/test/application/theme-handler/expected/testimages/images/plus.gif new file mode 100644 index 000000000..a2ec0742e Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/plus.gif differ diff --git a/test/application/theme-handler/expected/testimages/images/red-header.gif b/test/application/theme-handler/expected/testimages/images/red-header.gif new file mode 100644 index 000000000..505896969 Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/red-header.gif differ diff --git a/test/application/theme-handler/expected/testimages/images/truncated.png b/test/application/theme-handler/expected/testimages/images/truncated.png new file mode 100644 index 000000000..57d3e77ea Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/truncated.png differ diff --git a/test/application/theme-handler/expected/testimages/images/tv-collapsable-last.gif b/test/application/theme-handler/expected/testimages/images/tv-collapsable-last.gif new file mode 100644 index 000000000..4acff93b0 Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/tv-collapsable-last.gif differ diff --git a/test/application/theme-handler/expected/testimages/images/tv-collapsable.gif b/test/application/theme-handler/expected/testimages/images/tv-collapsable.gif new file mode 100644 index 000000000..857262fae Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/tv-collapsable.gif differ diff --git a/test/application/theme-handler/expected/testimages/images/tv-expandable-last.gif b/test/application/theme-handler/expected/testimages/images/tv-expandable-last.gif new file mode 100644 index 000000000..1ede2de78 Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/tv-expandable-last.gif differ diff --git a/test/application/theme-handler/expected/testimages/images/tv-expandable.gif b/test/application/theme-handler/expected/testimages/images/tv-expandable.gif new file mode 100644 index 000000000..305d57fc8 Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/tv-expandable.gif differ diff --git a/test/application/theme-handler/expected/testimages/images/tv-item-last.gif b/test/application/theme-handler/expected/testimages/images/tv-item-last.gif new file mode 100644 index 000000000..42a139ad5 Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/tv-item-last.gif differ diff --git a/test/application/theme-handler/expected/testimages/images/tv-item.gif b/test/application/theme-handler/expected/testimages/images/tv-item.gif new file mode 100644 index 000000000..281e5dce6 Binary files /dev/null and b/test/application/theme-handler/expected/testimages/images/tv-item.gif differ diff --git a/test/application/theme-handler/expected/themes/basque-red/main.css b/test/application/theme-handler/expected/themes/basque-red/main.css index 488f681b3..9569218bd 100644 --- a/test/application/theme-handler/expected/themes/basque-red/main.css +++ b/test/application/theme-handler/expected/themes/basque-red/main.css @@ -1,6 +1,6 @@ /* === SIGNATURE BEGIN === -{"variables":"37c31105548fce44fecca5cb34e455c9","stylesheets":{"css-variables":"934888ebb4991d4c76555be6b6d1d5cc","jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"52d8a7c5530ceb3a4d777364fa4e1eea"},"imports":[]} +{"variables":"37c31105548fce44fecca5cb34e455c9","stylesheets":{"css-variables":"934888ebb4991d4c76555be6b6d1d5cc","jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"52d8a7c5530ceb3a4d777364fa4e1eea"},"imports":[],"images":[]} === SIGNATURE END === */ ====CSSCOMPILEDCONTENT==== \ No newline at end of file diff --git a/test/application/theme-handler/expected/themes/basque-red/main_imagemodified.css b/test/application/theme-handler/expected/themes/basque-red/main_imagemodified.css new file mode 100644 index 000000000..a23205ffd --- /dev/null +++ b/test/application/theme-handler/expected/themes/basque-red/main_imagemodified.css @@ -0,0 +1,6 @@ +/* +=== SIGNATURE BEGIN === +{"variables":"37c31105548fce44fecca5cb34e455c9","stylesheets":{"css-variables":"c3696bee72015021cadb8230259f983f","jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"52d8a7c5530ceb3a4d777364fa4e1eea"},"imports":[],"images":{"\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_222222_256x240.png":"3a3c5468f484f07ac4a320d9e22acb8c","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_20_666666_40x40.png":"4429d568c67d8dfeb9040273ea0fb8c4","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_E87C1E_256x240.png":"7003dd36cb2aa032c8ec871ce4d4e03d","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_1c94c4_256x240.png":"dbd693dc8e0ef04e90a2f7ac7b390086","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_F26522_256x240.png":"16278ec0c07270be571f4c2e97fcc10c","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_18_b81900_40x40.png":"e460a66d4b3e093fc651e62a236267cb","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffffff_256x240.png":"41612b0f4a034424f8321c9f824a94da","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffd27a_256x240.png":"dda1b6f694b0d196aefc66a1d6d758f6","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/actions_right.png":"31c8906bd25d27b83a0a2466bf903462","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/ac-background.gif":"76135f3697b41a15aed787cfd77776c7","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/green-square.gif":"16ea9a497d72f5e66e4e8ea9ae08024e","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-item.gif":"719fe2d4566108e73162fb8868d3778c","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable.gif":"63a3351ea0d580797c9b8c386aa4f48b","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable.gif":"a2d1af4128e4a798a7f3390b12a28574","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-item-last.gif":"2ae7e1d9972ce71e5caa65a086bc5b7e","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable-last.gif":"71acaa9d7c2616e9e8b7131a75ca65da","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable-last.gif":"9d51036b3a8102742709da66789fd0f7","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/red-header.gif":"c73b8765f0c8c3c183cb6a0c2bb0ec69","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/green-header.gif":"06886d405efe86b85023ef64c4349095","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/orange-header.gif":"ce1f93f0af64431771b4cbd6c99c567b","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/calendar.png":"ab56e59af3c96ca661821257d376465e","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/truncated.png":"c6f91108afe8159d417b4dc556cd3b2a","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/plus.gif":"f00e1e6e1161f48608bb2bbc79b9948c","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/minus.gif":"6d77c0c0c2f86b6995d1cdf78274eaab","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/full-screen.png":"b541fadd3f1563856a4b44aeebd9d563","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/indicator.gif":"03ce3dcc84af110e9da8699a841e5200","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/delete.png":"93c047549c31a270a037840277cf59d3","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/bg.gif":"a315146ab814c73632480136576cd271","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/desc.gif":"0f58b33929095ea17795dd53bbced5d9","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/info-mini.png":"445c090ed777c5e6a08ac390fa896193","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/ok.png":"f6973773335fd83d8d2875f9a3c925af","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/error.png":"1af8a1041016f67669c5fd22dc88c82e","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-555.png":"9940f4e5b1248042c238e1924359fd5e","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-555.png":"6ad3b0bae791bf61addc9d8ca80a642d","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-fff.png":"b7db2402d4d5c72314c25790a66150d4","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-fff.png":"f9be7454dbb47b0e0bca3aa370ae7db5","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/breadcrumb-separator.png":"1e7e50a8f573e230cf1e0f0399c516e8"}} +=== SIGNATURE END === +*/ +====CSSCOMPILEDCONTENT==== \ No newline at end of file diff --git a/test/application/theme-handler/expected/themes/basque-red/main_importmodified.css b/test/application/theme-handler/expected/themes/basque-red/main_importmodified.css index d1599c281..5b128fd06 100644 --- a/test/application/theme-handler/expected/themes/basque-red/main_importmodified.css +++ b/test/application/theme-handler/expected/themes/basque-red/main_importmodified.css @@ -1,6 +1,6 @@ /* === SIGNATURE BEGIN === -{"variables":"37c31105548fce44fecca5cb34e455c9","stylesheets":{"css-variables":"6b9dcbf6f6ae66d3f94ab6c19729b5ee","jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"52d8a7c5530ceb3a4d777364fa4e1eea"},"imports":[]} +{"variables":"37c31105548fce44fecca5cb34e455c9","stylesheets":{"css-variables":"33a68788adaafe915c70bb54ab5db176","jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"52d8a7c5530ceb3a4d777364fa4e1eea"},"imports":[],"images":{"\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_222222_256x240.png":"3a3c5468f484f07ac4a320d9e22acb8c","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_20_666666_40x40.png":"4429d568c67d8dfeb9040273ea0fb8c4","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_E87C1E_256x240.png":"7003dd36cb2aa032c8ec871ce4d4e03d","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_1c94c4_256x240.png":"dbd693dc8e0ef04e90a2f7ac7b390086","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_F26522_256x240.png":"16278ec0c07270be571f4c2e97fcc10c","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_18_b81900_40x40.png":"e460a66d4b3e093fc651e62a236267cb","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffffff_256x240.png":"41612b0f4a034424f8321c9f824a94da","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffd27a_256x240.png":"dda1b6f694b0d196aefc66a1d6d758f6","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/actions_right.png":"31c8906bd25d27b83a0a2466bf903462","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/ac-background.gif":"76135f3697b41a15aed787cfd77776c7","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/green-square.gif":"16ea9a497d72f5e66e4e8ea9ae08024e","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-item.gif":"719fe2d4566108e73162fb8868d3778c","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable.gif":"63a3351ea0d580797c9b8c386aa4f48b","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable.gif":"a2d1af4128e4a798a7f3390b12a28574","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-item-last.gif":"2ae7e1d9972ce71e5caa65a086bc5b7e","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable-last.gif":"71acaa9d7c2616e9e8b7131a75ca65da","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable-last.gif":"9d51036b3a8102742709da66789fd0f7","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/red-header.gif":"c73b8765f0c8c3c183cb6a0c2bb0ec69","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/green-header.gif":"0e22a09bb8051b2a274b3427ede62e82","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/orange-header.gif":"ce1f93f0af64431771b4cbd6c99c567b","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/calendar.png":"ab56e59af3c96ca661821257d376465e","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/truncated.png":"c6f91108afe8159d417b4dc556cd3b2a","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/plus.gif":"f00e1e6e1161f48608bb2bbc79b9948c","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/minus.gif":"6d77c0c0c2f86b6995d1cdf78274eaab","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/full-screen.png":"b541fadd3f1563856a4b44aeebd9d563","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/indicator.gif":"03ce3dcc84af110e9da8699a841e5200","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/delete.png":"93c047549c31a270a037840277cf59d3","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/bg.gif":"a315146ab814c73632480136576cd271","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/desc.gif":"0f58b33929095ea17795dd53bbced5d9","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/info-mini.png":"445c090ed777c5e6a08ac390fa896193","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/ok.png":"f6973773335fd83d8d2875f9a3c925af","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/error.png":"1af8a1041016f67669c5fd22dc88c82e","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-555.png":"9940f4e5b1248042c238e1924359fd5e","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-555.png":"6ad3b0bae791bf61addc9d8ca80a642d","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-fff.png":"b7db2402d4d5c72314c25790a66150d4","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-fff.png":"f9be7454dbb47b0e0bca3aa370ae7db5","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/breadcrumb-separator.png":"1e7e50a8f573e230cf1e0f0399c516e8"}} === SIGNATURE END === */ ====CSSCOMPILEDCONTENT==== \ No newline at end of file diff --git a/test/application/theme-handler/expected/themes/basque-red/main_stylesheet.css b/test/application/theme-handler/expected/themes/basque-red/main_stylesheet.css index fecd1adcd..76e2d8c98 100644 --- a/test/application/theme-handler/expected/themes/basque-red/main_stylesheet.css +++ b/test/application/theme-handler/expected/themes/basque-red/main_stylesheet.css @@ -1,6 +1,6 @@ /* === SIGNATURE BEGIN === -{"variables":"37c31105548fce44fecca5cb34e455c9","stylesheets":{"css-variables":"934888ebb4991d4c76555be6b6d1d5cc","jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"63ba7dfe2a2eba40c2596ebb2a405f0b"},"imports":[]} +{"variables":"37c31105548fce44fecca5cb34e455c9","stylesheets":{"css-variables":"c3696bee72015021cadb8230259f983f","jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"63ba7dfe2a2eba40c2596ebb2a405f0b"},"imports":[],"images":{"\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_222222_256x240.png":"3a3c5468f484f07ac4a320d9e22acb8c","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_20_666666_40x40.png":"4429d568c67d8dfeb9040273ea0fb8c4","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_E87C1E_256x240.png":"7003dd36cb2aa032c8ec871ce4d4e03d","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_1c94c4_256x240.png":"dbd693dc8e0ef04e90a2f7ac7b390086","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_F26522_256x240.png":"16278ec0c07270be571f4c2e97fcc10c","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_18_b81900_40x40.png":"e460a66d4b3e093fc651e62a236267cb","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffffff_256x240.png":"41612b0f4a034424f8321c9f824a94da","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffd27a_256x240.png":"dda1b6f694b0d196aefc66a1d6d758f6","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/actions_right.png":"31c8906bd25d27b83a0a2466bf903462","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/ac-background.gif":"76135f3697b41a15aed787cfd77776c7","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/green-square.gif":"16ea9a497d72f5e66e4e8ea9ae08024e","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-item.gif":"719fe2d4566108e73162fb8868d3778c","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable.gif":"63a3351ea0d580797c9b8c386aa4f48b","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable.gif":"a2d1af4128e4a798a7f3390b12a28574","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-item-last.gif":"2ae7e1d9972ce71e5caa65a086bc5b7e","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable-last.gif":"71acaa9d7c2616e9e8b7131a75ca65da","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable-last.gif":"9d51036b3a8102742709da66789fd0f7","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/red-header.gif":"c73b8765f0c8c3c183cb6a0c2bb0ec69","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/green-header.gif":"0e22a09bb8051b2a274b3427ede62e82","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/orange-header.gif":"ce1f93f0af64431771b4cbd6c99c567b","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/calendar.png":"ab56e59af3c96ca661821257d376465e","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/truncated.png":"c6f91108afe8159d417b4dc556cd3b2a","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/plus.gif":"f00e1e6e1161f48608bb2bbc79b9948c","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/minus.gif":"6d77c0c0c2f86b6995d1cdf78274eaab","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/full-screen.png":"b541fadd3f1563856a4b44aeebd9d563","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/indicator.gif":"03ce3dcc84af110e9da8699a841e5200","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/delete.png":"93c047549c31a270a037840277cf59d3","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/bg.gif":"a315146ab814c73632480136576cd271","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/desc.gif":"0f58b33929095ea17795dd53bbced5d9","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/info-mini.png":"445c090ed777c5e6a08ac390fa896193","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/ok.png":"f6973773335fd83d8d2875f9a3c925af","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/error.png":"1af8a1041016f67669c5fd22dc88c82e","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-555.png":"9940f4e5b1248042c238e1924359fd5e","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-555.png":"6ad3b0bae791bf61addc9d8ca80a642d","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-fff.png":"b7db2402d4d5c72314c25790a66150d4","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-fff.png":"f9be7454dbb47b0e0bca3aa370ae7db5","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/breadcrumb-separator.png":"1e7e50a8f573e230cf1e0f0399c516e8"}} === SIGNATURE END === */ ====CSSCOMPILEDCONTENT==== \ No newline at end of file diff --git a/test/application/theme-handler/expected/themes/basque-red/main_testcompilethemes.css b/test/application/theme-handler/expected/themes/basque-red/main_testcompilethemes.css new file mode 100644 index 000000000..6fbe4bea4 --- /dev/null +++ b/test/application/theme-handler/expected/themes/basque-red/main_testcompilethemes.css @@ -0,0 +1,6 @@ +/* +=== SIGNATURE BEGIN === +{"variables":"37c31105548fce44fecca5cb34e455c9","stylesheets":{"css-variables":"c3696bee72015021cadb8230259f983f","jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"52d8a7c5530ceb3a4d777364fa4e1eea"},"imports":[],"images":{"\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_222222_256x240.png":"3a3c5468f484f07ac4a320d9e22acb8c","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_20_666666_40x40.png":"4429d568c67d8dfeb9040273ea0fb8c4","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_E87C1E_256x240.png":"7003dd36cb2aa032c8ec871ce4d4e03d","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_1c94c4_256x240.png":"dbd693dc8e0ef04e90a2f7ac7b390086","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_F26522_256x240.png":"16278ec0c07270be571f4c2e97fcc10c","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_18_b81900_40x40.png":"e460a66d4b3e093fc651e62a236267cb","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffffff_256x240.png":"41612b0f4a034424f8321c9f824a94da","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffd27a_256x240.png":"dda1b6f694b0d196aefc66a1d6d758f6","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/actions_right.png":"31c8906bd25d27b83a0a2466bf903462","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/ac-background.gif":"76135f3697b41a15aed787cfd77776c7","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/green-square.gif":"16ea9a497d72f5e66e4e8ea9ae08024e","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-item.gif":"719fe2d4566108e73162fb8868d3778c","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable.gif":"63a3351ea0d580797c9b8c386aa4f48b","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable.gif":"a2d1af4128e4a798a7f3390b12a28574","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-item-last.gif":"2ae7e1d9972ce71e5caa65a086bc5b7e","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable-last.gif":"71acaa9d7c2616e9e8b7131a75ca65da","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable-last.gif":"9d51036b3a8102742709da66789fd0f7","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/red-header.gif":"c73b8765f0c8c3c183cb6a0c2bb0ec69","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/green-header.gif":"0e22a09bb8051b2a274b3427ede62e82","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/orange-header.gif":"ce1f93f0af64431771b4cbd6c99c567b","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/calendar.png":"ab56e59af3c96ca661821257d376465e","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/truncated.png":"c6f91108afe8159d417b4dc556cd3b2a","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/plus.gif":"f00e1e6e1161f48608bb2bbc79b9948c","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/minus.gif":"6d77c0c0c2f86b6995d1cdf78274eaab","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/full-screen.png":"b541fadd3f1563856a4b44aeebd9d563","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/indicator.gif":"03ce3dcc84af110e9da8699a841e5200","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/delete.png":"93c047549c31a270a037840277cf59d3","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/bg.gif":"a315146ab814c73632480136576cd271","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/desc.gif":"0f58b33929095ea17795dd53bbced5d9","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/info-mini.png":"445c090ed777c5e6a08ac390fa896193","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/ok.png":"f6973773335fd83d8d2875f9a3c925af","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/error.png":"1af8a1041016f67669c5fd22dc88c82e","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-555.png":"9940f4e5b1248042c238e1924359fd5e","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-555.png":"6ad3b0bae791bf61addc9d8ca80a642d","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-fff.png":"b7db2402d4d5c72314c25790a66150d4","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-fff.png":"f9be7454dbb47b0e0bca3aa370ae7db5","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/breadcrumb-separator.png":"1e7e50a8f573e230cf1e0f0399c516e8"}} +=== SIGNATURE END === +*/ +====CSSCOMPILEDCONTENT==== \ No newline at end of file diff --git a/test/application/theme-handler/expected/themes/basque-red/main_varchanged.css b/test/application/theme-handler/expected/themes/basque-red/main_varchanged.css index a1b350cdb..ee2d1cf32 100644 --- a/test/application/theme-handler/expected/themes/basque-red/main_varchanged.css +++ b/test/application/theme-handler/expected/themes/basque-red/main_varchanged.css @@ -1,6 +1,6 @@ /* === SIGNATURE BEGIN === -{"variables":"8100523d2e76a70266f3e7110e2fe5fb","stylesheets":{"css-variables":"934888ebb4991d4c76555be6b6d1d5cc","jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"52d8a7c5530ceb3a4d777364fa4e1eea"},"imports":[]} +{"variables":"8100523d2e76a70266f3e7110e2fe5fb","stylesheets":{"css-variables":"c3696bee72015021cadb8230259f983f","jqueryui":"78cfafc3524dac98e61fc2460918d4e5","main":"52d8a7c5530ceb3a4d777364fa4e1eea"},"imports":[],"images":{"\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_222222_256x240.png":"3a3c5468f484f07ac4a320d9e22acb8c","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_20_666666_40x40.png":"4429d568c67d8dfeb9040273ea0fb8c4","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_E87C1E_256x240.png":"7003dd36cb2aa032c8ec871ce4d4e03d","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_1c94c4_256x240.png":"dbd693dc8e0ef04e90a2f7ac7b390086","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_F26522_256x240.png":"16278ec0c07270be571f4c2e97fcc10c","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-bg_diagonals-thick_18_b81900_40x40.png":"e460a66d4b3e093fc651e62a236267cb","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffffff_256x240.png":"41612b0f4a034424f8321c9f824a94da","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/css\/ui-lightness\/images\/ui-icons_ffd27a_256x240.png":"dda1b6f694b0d196aefc66a1d6d758f6","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/actions_right.png":"31c8906bd25d27b83a0a2466bf903462","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/ac-background.gif":"76135f3697b41a15aed787cfd77776c7","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/green-square.gif":"16ea9a497d72f5e66e4e8ea9ae08024e","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-item.gif":"719fe2d4566108e73162fb8868d3778c","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable.gif":"63a3351ea0d580797c9b8c386aa4f48b","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable.gif":"a2d1af4128e4a798a7f3390b12a28574","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-item-last.gif":"2ae7e1d9972ce71e5caa65a086bc5b7e","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-collapsable-last.gif":"71acaa9d7c2616e9e8b7131a75ca65da","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/tv-expandable-last.gif":"9d51036b3a8102742709da66789fd0f7","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/red-header.gif":"c73b8765f0c8c3c183cb6a0c2bb0ec69","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/green-header.gif":"0e22a09bb8051b2a274b3427ede62e82","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/orange-header.gif":"ce1f93f0af64431771b4cbd6c99c567b","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/calendar.png":"ab56e59af3c96ca661821257d376465e","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/truncated.png":"c6f91108afe8159d417b4dc556cd3b2a","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/plus.gif":"f00e1e6e1161f48608bb2bbc79b9948c","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/minus.gif":"6d77c0c0c2f86b6995d1cdf78274eaab","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/full-screen.png":"b541fadd3f1563856a4b44aeebd9d563","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/indicator.gif":"03ce3dcc84af110e9da8699a841e5200","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/delete.png":"93c047549c31a270a037840277cf59d3","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/bg.gif":"a315146ab814c73632480136576cd271","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/desc.gif":"0f58b33929095ea17795dd53bbced5d9","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/info-mini.png":"445c090ed777c5e6a08ac390fa896193","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/ok.png":"f6973773335fd83d8d2875f9a3c925af","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/error.png":"1af8a1041016f67669c5fd22dc88c82e","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-555.png":"9940f4e5b1248042c238e1924359fd5e","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-555.png":"6ad3b0bae791bf61addc9d8ca80a642d","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/eye-open-fff.png":"b7db2402d4d5c72314c25790a66150d4","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/eye-closed-fff.png":"f9be7454dbb47b0e0bca3aa370ae7db5","\/var\/www\/html\/iTop\/test\/application\/theme-handler\/copied\/testimages\/images\/breadcrumb-separator.png":"1e7e50a8f573e230cf1e0f0399c516e8"}} === SIGNATURE END === */ ====CSSCOMPILEDCONTENT==== \ No newline at end of file diff --git a/test/application/theme-handler/getimages/expected-getimages.json b/test/application/theme-handler/getimages/expected-getimages.json new file mode 100644 index 000000000..b4b7321ce --- /dev/null +++ b/test/application/theme-handler/getimages/expected-getimages.json @@ -0,0 +1,42 @@ +[ + "RELATIVEPATH/../../../../../css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png", + "RELATIVEPATH/../../../../../css/ui-lightness/images/ui-icons_ffffff_256x240.png", + "RELATIVEPATH/../../../../../images/actions_right.png", + "RELATIVEPATH/../../../../../images/ac-background.gif", + "RELATIVEPATH/../../../../../images/green-square.gif", + "RELATIVEPATH/../../../../../images/tv-item.gif", + "RELATIVEPATH/../../../../../images/tv-collapsable.gif", + "RELATIVEPATH/../../../../../images/tv-expandable.gif", + "RELATIVEPATH/../../../../../images/tv-item-last.gif", + "RELATIVEPATH/../../../../../images/tv-collapsable-last.gif", + "RELATIVEPATH/../../../../../images/tv-expandable-last.gif", + "RELATIVEPATH/../../../../../images/red-header.gif", + "RELATIVEPATH/../../../../../images/green-header.gif", + "RELATIVEPATH/../../../../../images/orange-header.gif", + "RELATIVEPATH/../../../../../images/calendar.png", + "RELATIVEPATH/../../../../../images/truncated.png", + "RELATIVEPATH/../../../../../images/itop-logo-2.png", + "RELATIVEPATH/../../../../../images/splitter-bkg.png", + "RELATIVEPATH/../../../../../images/plus.gif", + "RELATIVEPATH/../../../../../images/minus.gif", + "RELATIVEPATH/../../../../../images/full-screen.png", + "RELATIVEPATH/../../../../../images/indicator.gif", + "RELATIVEPATH/../../../../../images/delete.png", + "RELATIVEPATH/../../../../../images/bg.gif", + "RELATIVEPATH/../../../../../images/desc.gif", + "RELATIVEPATH/../../../../../images/asc.gif", + "RELATIVEPATH/../../../../../images/info-mini.png", + "RELATIVEPATH/../../../../../images/ok.png", + "RELATIVEPATH/../../../../../images/error.png", + "RELATIVEPATH/../../../../../images/eye-open-555.png", + "RELATIVEPATH/../../../../../images/eye-closed-555.png", + "RELATIVEPATH/../../../../../images/eye-open-fff.png", + "RELATIVEPATH/../../../../../images/eye-closed-fff.png", + "RELATIVEPATH/../../../../../css/ui-lightness/images/ui-icons_222222_256x240.png", + "RELATIVEPATH/../../../../../images/breadcrumb-separator.png", + "RELATIVEPATH/../../../../../css/ui-lightness/images/ui-icons_E87C1E_256x240.png", + "RELATIVEPATH/../../../../../css/ui-lightness/images/ui-icons_1c94c4_256x240.png", + "RELATIVEPATH/../../../../../css/ui-lightness/images/ui-icons_F26522_256x240.png", + "RELATIVEPATH/../../../../../css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png", + "RELATIVEPATH/../../../../../css/ui-lightness/images/ui-icons_ffd27a_256x240.png" +] \ No newline at end of file diff --git a/test/application/theme-handler/getimages/test-getimages.scss b/test/application/theme-handler/getimages/test-getimages.scss new file mode 100644 index 000000000..5435c5d2d --- /dev/null +++ b/test/application/theme-handler/getimages/test-getimages.scss @@ -0,0 +1,9 @@ +$approot-relative: "../../../../../" +$version:"aaa" +background-image: url('abc/'+ $approot-relative + "css/ui-lightness/images/toutou.png?v=" + $version); +background-image: url($approot-relative + "css/ui-lightness/images/toto.png?v=" + $version); +background: #666666 url($approot-relative + 'css/ui-lightness/images/titi.gif?v=' + $version1) 50% 50% repeat; +list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7?v=" + $version); +background-image: url('css/ui-lightness/images/tutu.jpg'); +background-image: url("css/ui-lightness/images/tata.jpeg"); +background-image: url("css/ui-lightness/images/tete.jpeg?g=" + $attr); \ No newline at end of file