| OLD | NEW |
| 1 (function() { | 1 (function() { |
| 2 var templateParagraph = null; | 2 var templateParagraph = null; |
| 3 var templateFloatingNode = null; | 3 var templateFloatingNode = null; |
| 4 var DEFAULT_SHAPE_OBJECT_COUNT = 100; | 4 var DEFAULT_SHAPE_OBJECT_COUNT = 100; |
| 5 | 5 |
| 6 function createParagraphNode() { | 6 function createParagraphNode() { |
| 7 if (!templateParagraph) { | 7 if (!templateParagraph) { |
| 8 templateParagraph = document.createElement("p"); | 8 templateParagraph = document.createElement("p"); |
| 9 templateParagraph.innerHTML = "Lorem ipsum dolor sit amet, consectet
ur adipiscing elit. Etiam at turpis placerat sapien congue viverra nec sed felis
.\ | 9 templateParagraph.innerHTML = "Lorem ipsum dolor sit amet, consectet
ur adipiscing elit. Etiam at turpis placerat sapien congue viverra nec sed felis
.\ |
| 10 Aenean aliquam, justo eu condimentum pharetra, arcu eros blandit
metus, nec lacinia nisi orci vitae nunc.\ | 10 Aenean aliquam, justo eu condimentum pharetra, arcu eros blandit
metus, nec lacinia nisi orci vitae nunc.\ |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 function createShapeOutsideTest(properties, shapeObjectCount) { | 61 function createShapeOutsideTest(properties, shapeObjectCount) { |
| 62 shapeObjectCount = shapeObjectCount || DEFAULT_SHAPE_OBJECT_COUNT; | 62 shapeObjectCount = shapeObjectCount || DEFAULT_SHAPE_OBJECT_COUNT; |
| 63 | 63 |
| 64 var floatingObjects = createFloatingObjects(properties, shapeObjectCount
); | 64 var floatingObjects = createFloatingObjects(properties, shapeObjectCount
); |
| 65 document.body.appendChild(floatingObjects); | 65 document.body.appendChild(floatingObjects); |
| 66 return { | 66 return { |
| 67 description: "Testing shapes with " + properties['webkitShapeOutside
'] +" using " + shapeObjectCount + " shapes.", | 67 description: "Testing shapes with " + properties['webkitShapeOutside
'] +" using " + shapeObjectCount + " shapes.", |
| 68 run: function() { | 68 run: function() { |
| 69 applyFloating(); | 69 applyFloating(); |
| 70 document.body.offsetTop; | 70 PerfTestRunner.forceLayoutOrFullFrame(); |
| 71 }, | 71 }, |
| 72 setup: function() { | 72 setup: function() { |
| 73 PerfTestRunner.resetRandomSeed(); | 73 PerfTestRunner.resetRandomSeed(); |
| 74 document.body.offsetTop; | 74 PerfTestRunner.forceLayoutOrFullFrame(); |
| 75 }, | 75 }, |
| 76 done: function() { | 76 done: function() { |
| 77 document.body.removeChild(floatingObjects); | 77 document.body.removeChild(floatingObjects); |
| 78 templateParagraph = null; | 78 templateParagraph = null; |
| 79 } | 79 } |
| 80 }; | 80 }; |
| 81 } | 81 } |
| 82 | 82 |
| 83 window.createShapeOutsideTest = createShapeOutsideTest; | 83 window.createShapeOutsideTest = createShapeOutsideTest; |
| 84 | 84 |
| 85 })(); | 85 })(); |
| OLD | NEW |