2006-08-29 02:01:58 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once 'HTMLPurifier/AttrDefHarness.php';
|
|
|
|
require_once 'HTMLPurifier/AttrDef/ListStyle.php';
|
|
|
|
|
|
|
|
class HTMLPurifier_AttrDef_ListStyleTest extends HTMLPurifier_AttrDefHarness
|
|
|
|
{
|
|
|
|
|
|
|
|
function test() {
|
|
|
|
|
2006-08-31 20:33:07 +00:00
|
|
|
$this->def = new HTMLPurifier_AttrDef_ListStyle(HTMLPurifier_Config::createDefault());
|
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');
|
2006-08-29 02:01:58 +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');
|
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');
|
|
|
|
|
2006-08-29 02:01:58 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|