| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script type="text/javascript" src="../resources/runner.js"></script> | 4 <script type="text/javascript" src="../resources/runner.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 | 7 |
| 8 <div id="wrapper"> | 8 <div id="wrapper"> |
| 9 <h2>Selected</h2> | 9 <h2>Selected</h2> |
| 10 <div id="selected"></div> | 10 <div id="selected"></div> |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 var nonSelected = document.getElementById('nonselected'); | 40 var nonSelected = document.getElementById('nonselected'); |
| 41 | 41 |
| 42 for (var i = 0; i < 100; ++i) { | 42 for (var i = 0; i < 100; ++i) { |
| 43 for (var j = 0; j < typeNames.length; ++j) { | 43 for (var j = 0; j < typeNames.length; ++j) { |
| 44 for (var k = 0; k < nDivs; ++k) { | 44 for (var k = 0; k < nDivs; ++k) { |
| 45 if (array[k].className == typeNames[j]) | 45 if (array[k].className == typeNames[j]) |
| 46 selected.appendChild(array[k]); | 46 selected.appendChild(array[k]); |
| 47 else | 47 else |
| 48 nonSelected.appendChild(array[k]); | 48 nonSelected.appendChild(array[k]); |
| 49 } | 49 } |
| 50 selected.offsetLeft; | 50 PerfTestRunner.forceLayoutOrFullFrame(); |
| 51 nonSelected.offsetLeft; | |
| 52 } | 51 } |
| 53 } | 52 } |
| 54 } | 53 } |
| 55 | 54 |
| 56 function done() | 55 function done() |
| 57 { | 56 { |
| 58 wrapper.innerHTML = ''; | 57 wrapper.innerHTML = ''; |
| 59 } | 58 } |
| 60 | 59 |
| 61 setup(); | 60 setup(); |
| 62 | 61 |
| 63 PerfTestRunner.measureTime({ | 62 PerfTestRunner.measureTime({ |
| 64 description: "Measure distribution and layout performance when we do the alm
ost same thing as select attribute of content element is changed using JavaScrip
t", | 63 description: "Measure distribution and layout performance when we do the alm
ost same thing as select attribute of content element is changed using JavaScrip
t", |
| 65 run: run, | 64 run: run, |
| 66 done: done | 65 done: done |
| 67 }); | 66 }); |
| 68 </script> | 67 </script> |
| 69 </body> | 68 </body> |
| 70 </html> | 69 </html> |
| OLD | NEW |