4 <title>Line height calculation performance test
</title>
5 <script src=
"../resources/runner.js"></script>
9 <div id=
"target" style=
"width: 300px; display: none;">
12 var target
= document
.getElementById("target");
13 var style
= target
.style
;
15 var el
= document
.createElement('p');
16 el
.innerHTML
= 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ut elit lacus, non convallis odio. Integer facilisis, dolor quis porttitor auctor\n';
17 for (var i
= 0; i
< rows
; ++i
) {
18 var e
= el
.cloneNode(true);
19 target
.appendChild(e
);
22 style
.display
= "block";
23 style
.width
= "280px";
24 PerfTestRunner
.forceLayoutOrFullFrame();
25 style
.width
= "300px";
26 PerfTestRunner
.forceLayoutOrFullFrame();
27 style
.width
= "290px";
28 PerfTestRunner
.forceLayoutOrFullFrame();
29 style
.display
= "none";
32 PerfTestRunner
.measureTime({
33 description
: "Measures performance of line-height calculation in layout.",