2006-08-29 02:01:58 +00:00
|
|
|
<?php
|
|
|
|
|
2007-02-14 20:38:51 +00:00
|
|
|
class HTMLPurifier_AttrDef_CSS_ListStyleTest extends HTMLPurifier_AttrDefHarness
|
2006-08-29 02:01:58 +00:00
|
|
|
{
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2006-08-29 02:01:58 +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_ListStyle($config);
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2006-08-29 02:01:58 +00:00
|
|
|
$this->assertDef('lower-alpha');
|
|
|
|
$this->assertDef('upper-roman inside');
|
|
|
|
$this->assertDef('circle outside');
|
|
|
|
$this->assertDef('inside');
|
|
|
|
$this->assertDef('none');
|
2007-01-15 00:48:54 +00:00
|
|
|
$this->assertDef('url(foo.gif)');
|
|
|
|
$this->assertDef('circle url(foo.gif) inside');
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2007-01-15 00:48:54 +00:00
|
|
|
// invalid values
|
2006-08-29 02:01:58 +00:00
|
|
|
$this->assertDef('outside inside', 'outside');
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2007-01-15 00:48:54 +00:00
|
|
|
// ordering
|
|
|
|
$this->assertDef('url(foo.gif) none', 'none url(foo.gif)');
|
2006-08-29 02:01:58 +00:00
|
|
|
$this->assertDef('circle lower-alpha', 'circle');
|
2007-01-15 00:48:54 +00:00
|
|
|
// the spec is ambiguous about what happens in these
|
|
|
|
// cases, so we're going off the W3C CSS validator
|
|
|
|
$this->assertDef('disc none', 'disc');
|
|
|
|
$this->assertDef('none disc', 'none');
|
2008-12-06 07:28:20 +00:00
|
|
|
|
|
|
|
|
2006-08-29 02:01:58 +00:00
|
|
|
}
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2006-08-29 02:01:58 +00:00
|
|
|
}
|
|
|
|
|
2008-12-06 09:24:59 +00:00
|
|
|
// vim: et sw=4 sts=4
|