Index: third_party/WebKit/PerformanceTests/Paint/appending-text.html |
diff --git a/third_party/WebKit/PerformanceTests/Paint/appending-text.html b/third_party/WebKit/PerformanceTests/Paint/appending-text.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d9c9ceb06b0dc142b390a4c790d575d7b62585e1 |
--- /dev/null |
+++ b/third_party/WebKit/PerformanceTests/Paint/appending-text.html |
@@ -0,0 +1,30 @@ |
+<!DOCTYPE html> |
+<body> |
+<script src="../resources/runner.js"></script> |
+<div id="container"></div> |
+<script> |
+// This test measures the lifecycle update performance when adding small |
+// amounts of text to a large page. |
+ |
+var initialTextCount = 20000; |
+var initialText = ""; |
+for (var i = 0; i < initialTextCount; i++) |
+ initialText += '<span>a</span>'; |
+ |
+var textToAppendEachRun = 5; |
+PerfTestRunner.measureFrameTime({ |
+ run: function() { |
+ var text = document.createElement('span'); |
+ text.innerText = 'abc'; |
+ container.appendChild(text); |
+ }, |
+ setup: function() { |
+ container.innerHTML = initialText; |
+ }, |
+ done: function() { |
+ container.innerHTML = ""; |
+ }, |
+ warmUpCount: 5, |
+}); |
+</script> |
+</body> |