| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Performance tester for non-overlaping 3D layers</title> | 4 <title>Performance tester for non-overlaping 3D layers</title> |
| 5 <style> | 5 <style> |
| 6 .container { | 6 .container { |
| 7 width: 20px; | 7 width: 20px; |
| 8 height: 20px; | 8 height: 20px; |
| 9 border: 1px solid #AAA; | 9 border: 1px solid #AAA; |
| 10 margin: 0 auto 5px; | 10 margin: 0 auto 5px; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 var container = document.createElement("div"); | 29 var container = document.createElement("div"); |
| 30 for(i = 0; i < count; ++i) { | 30 for(i = 0; i < count; ++i) { |
| 31 var outer = document.createElement('div'); | 31 var outer = document.createElement('div'); |
| 32 outer.className = 'container'; | 32 outer.className = 'container'; |
| 33 var inner = document.createElement('div'); | 33 var inner = document.createElement('div'); |
| 34 inner.className = 'box'; | 34 inner.className = 'box'; |
| 35 outer.appendChild(inner); | 35 outer.appendChild(inner); |
| 36 container.appendChild(outer); | 36 container.appendChild(outer); |
| 37 } | 37 } |
| 38 document.body.appendChild(container); | 38 document.body.appendChild(container); |
| 39 // Force a layout update. | 39 PerfTestRunner.forceLayoutOrFullFrame(); |
| 40 document.body.clientHeight; | |
| 41 container.remove(); | 40 container.remove(); |
| 42 } | 41 } |
| 43 } | 42 } |
| 44 PerfTestRunner.measureTime({ | 43 PerfTestRunner.measureTime({ |
| 45 description: "Measures performance of non-overlapping 3D layers.
", | 44 description: "Measures performance of non-overlapping 3D layers.
", |
| 46 run: createTestFunction(5000) | 45 run: createTestFunction(5000) |
| 47 }); | 46 }); |
| 48 </script> | 47 </script> |
| 49 </body> | 48 </body> |
| 50 </html> | 49 </html> |
| OLD | NEW |