1<?php 2 3class TestWidthPercentage extends GenericTest { 4 function TestWidthPercentage1() { 5 $tree = $this->runPipeline(' 6<html><head> 7<style type="text/css"> 8<!-- 9.timeContainer { 10 position: relative; 11 width: 80%; 12} 13--> 14</style> 15</head> 16<body> 17<div id="wrapper" class="timecontainer">X</div> 18</body> 19</html> 20', $media, $pipeline, $context, $postponed); 21 22 $wrapper = $tree->get_element_by_id('wrapper'); 23 24 $this->assertTrue($wrapper->get_width() > 0, 25 sprintf('Non-zero width expected, got %s', $wrapper->get_width())); 26 } 27} 28 29?>