2007-01-20 02:21:43 +00:00
|
|
|
<?php
|
|
|
|
|
2007-02-14 20:38:51 +00:00
|
|
|
class HTMLPurifier_AttrDef_CSS_BackgroundTest extends HTMLPurifier_AttrDefHarness
|
2007-01-20 02:21:43 +00:00
|
|
|
{
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2007-01-20 02:21:43 +00:00
|
|
|
function test() {
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2007-02-14 20:38:51 +00:00
|
|
|
$config = HTMLPurifier_Config::createDefault();
|
|
|
|
$this->def = new HTMLPurifier_AttrDef_CSS_Background($config);
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2010-05-21 15:53:52 +00:00
|
|
|
$valid = '#333 url("chess.png") repeat fixed 50% top';
|
2007-01-20 02:21:43 +00:00
|
|
|
$this->assertDef($valid);
|
2010-05-21 15:53:52 +00:00
|
|
|
$this->assertDef('url(\'chess.png\') #333 50% top repeat fixed', $valid);
|
2008-03-16 19:14:39 +00:00
|
|
|
$this->assertDef(
|
|
|
|
'rgb(34, 56, 33) url(chess.png) repeat fixed top',
|
2010-05-21 15:53:52 +00:00
|
|
|
'rgb(34,56,33) url("chess.png") repeat fixed top'
|
2008-03-16 19:14:39 +00:00
|
|
|
);
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2007-01-20 02:21:43 +00:00
|
|
|
}
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2007-01-20 02:21:43 +00:00
|
|
|
}
|
|
|
|
|
2008-12-06 09:24:59 +00:00
|
|
|
// vim: et sw=4 sts=4
|