|
|
|
@ -215,13 +215,19 @@ class Framework_Utils extends PHPUnit_Framework_TestCase
|
|
|
|
|
// position: fixed (#5264)
|
|
|
|
|
$mod = rcube_utils::mod_css_styles(".test { position: fixed; }", 'rcmbody');
|
|
|
|
|
$this->assertEquals("#rcmbody .test { position: absolute; }", $mod, "Replace position:fixed with position:absolute (0)");
|
|
|
|
|
|
|
|
|
|
$mod = rcube_utils::mod_css_styles(".test { position:\nfixed; }", 'rcmbody');
|
|
|
|
|
$this->assertEquals("#rcmbody .test { position: absolute; }", $mod, "Replace position:fixed with position:absolute (1)");
|
|
|
|
|
|
|
|
|
|
$mod = rcube_utils::mod_css_styles(".test { position:/**/fixed; }", 'rcmbody');
|
|
|
|
|
$this->assertEquals("#rcmbody .test { position: absolute; }", $mod, "Replace position:fixed with position:absolute (2)");
|
|
|
|
|
|
|
|
|
|
// position: fixed (#6898)
|
|
|
|
|
$mod = rcube_utils::mod_css_styles(".test { position : fixed; top: 0; }", 'rcmbody');
|
|
|
|
|
$this->assertEquals("#rcmbody .test { position: absolute; top: 0; }", $mod, "Replace position:fixed with position:absolute (3)");
|
|
|
|
|
$mod = rcube_utils::mod_css_styles(".test { position/**/: fixed; top: 0; }", 'rcmbody');
|
|
|
|
|
$this->assertEquals("#rcmbody .test { position: absolute; top: 0; }", $mod, "Replace position:fixed with position:absolute (4)");
|
|
|
|
|
$mod = rcube_utils::mod_css_styles(".test { position\n: fixed; top: 0; }", 'rcmbody');
|
|
|
|
|
$this->assertEquals("#rcmbody .test { position: absolute; top: 0; }", $mod, "Replace position:fixed with position:absolute (5)");
|
|
|
|
|
|
|
|
|
|
// allow data URIs with images (#5580)
|
|
|
|
|
$mod = rcube_utils::mod_css_styles("body { background-image: url(data:image/png;base64,123); }", 'rcmbody');
|
|
|
|
|
$this->assertContains("#rcmbody { background-image: url(data:image/png;base64,123);", $mod, "Data URIs in url() allowed [1]");
|
|
|
|
|