Blame | Letzte Änderung | Log anzeigen | RSS feed
<?phpclass TestLineHeight100 extends GenericTest {function testHeightsWithBR() {$tree = $this->runPipeline('<html><head><style type="text/css">body { font-size: 10mm; }#div1 { height: 100mm; float: left; background-color: green; width: 100mm; }#div2 { line-height: 1; float: left; background-color: red; width: 100mm; }</style></head><body><div id="div1"> </div><div id="div2">LINE1<br/>LINE2<br/>LINE3<br/>LINE4<br/>LINE5<br/>LINE6<br/>LINE7<br/>LINE8<br/>LINE9<br/>LINE10<br/></div></body></html>');$first_div = $tree->get_element_by_id('div1');$second_div = $tree->get_element_by_id('div2');$this->assertWithinMargin($first_div->get_full_height(),$second_div->get_full_height(),0.01,"DIVs have different heights! [%s]");}function testHeightsWithoutBR() {$tree = $this->runPipeline('<html><head><style type="text/css">body { font-size: 10mm; }#div1 { height: 100mm; float: left; background-color: green; width: 100mm; }#div2 { line-height: 1; float: left; background-color: red; width: 2em; }</style></head><body><div id="div1"> </div><div id="div2">LINE1LINE2LINE3LINE4LINE5LINE6LINE7LINE8LINE9LINE10</div></body></html>');$first_div = $tree->get_element_by_id('div1');$second_div = $tree->get_element_by_id('div2');$this->assertWithinMargin($first_div->get_full_height(),$second_div->get_full_height(),0.01,"DIVs have different heights! [%s]");}}?>