3 class HTMLPurifier_AttrDef_HTML_LengthTest
extends HTMLPurifier_AttrDef_HTML_PixelsTest
6 public function setup()
8 $this->def
= new HTMLPurifier_AttrDef_HTML_Length();
11 public function test()
17 $this->assertDef('25%');
19 // Firefox maintains percent, so will we
20 $this->assertDef('0%');
22 // 0% <= percent <= 100%
23 $this->assertDef('-15%', '0%');
24 $this->assertDef('120%', '100%');
26 // fractional percents, apparently, aren't allowed
27 $this->assertDef('56.5%', '56%');