Chromium Code Reviews| Index: third_party/WebKit/PerformanceTests/Layout/attach-inlines.html |
| diff --git a/third_party/WebKit/PerformanceTests/Layout/attach-inlines.html b/third_party/WebKit/PerformanceTests/Layout/attach-inlines.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f097c49b63be8bb67ca3d978814f322807f97342 |
| --- /dev/null |
| +++ b/third_party/WebKit/PerformanceTests/Layout/attach-inlines.html |
| @@ -0,0 +1,38 @@ |
| +<!DOCTYPE html> |
| + <div id="div" style="display: none;"> |
| + <span id="span"></span> |
| + </div> |
| +<script src="../resources/runner.js"></script> |
| +<script> |
| + var div = document.getElementById("div"); |
| + var style = div.style; |
| + |
| + function createInlines() { |
| + var innerHTML = "<span>Text</span>"; |
|
esprehn
2016/07/18 22:16:51
innerHTML = "<span>Text</span>".repeat(N);
|
| + for (var x = 0; x < 500; ++x){ |
| + innerHTML = innerHTML + "<span>Text</span>"; |
|
esprehn
2016/07/18 22:16:51
this is making it exponentially bigger btw, lets j
|
| + } |
| + return innerHTML; |
| + } |
| + |
| + var originalLines = createInlines(); |
| + span.innerHTML = originalLines; |
|
esprehn
2016/07/18 22:16:51
do all mutations inside the test
|
| + |
| + function test() { |
| + style.display = "block"; |
| + PerfTestRunner.forceLayout(); |
| + |
| + span.innerHTML += originalLines; |
|
esprehn
2016/07/18 22:16:51
This is measuring the performance of serializing t
|
| + PerfTestRunner.forceLayout(); |
| + |
| + style.display = "none"; |
| + span.innerHTML = originalLines; |
| + PerfTestRunner.forceLayout(); |
| + } |
| + |
| + PerfTestRunner.measureRunsPerSecond({ |
| + description: "Measures performance of attaching a large number of inlines to an inline.", |
| + run: test |
| + }); |
| +</script> |
| +</html> |