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