Index: PerformanceTests/Layout/AddWhitespace.html |
diff --git a/PerformanceTests/Layout/AddWhitespace.html b/PerformanceTests/Layout/AddWhitespace.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c7a7b267a2d99056ed74217fe12cf180bcb4e6eb |
--- /dev/null |
+++ b/PerformanceTests/Layout/AddWhitespace.html |
@@ -0,0 +1,29 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
+ <title>Adding whitespace performance test</title> |
+ <script src="../resources/runner.js"></script> |
+</head> |
+<body> |
+ <pre id="log"></pre> |
+ <div id="test"> |
+ <div style="display: inline-block;"></div> |
leviw_travelin_and_unemployed
2015/05/04 20:55:24
Nit: your whitespace test has too much whitespace
|
+ <div> |
leviw_travelin_and_unemployed
2015/05/04 20:55:24
</div>?
|
+ <script> |
+ var target = document.getElementById("test"); |
+ function test() { |
+ for (var i = 0; i < 100; i++) { |
+ target.innerHTML += ' <div style="display: inline-block;"></div> '; |
esprehn
2015/05/04 21:22:40
This is serializing the DOM into a big string, des
|
+ PerfTestRunner.forceLayoutOrFullFrame(); |
esprehn
2015/05/04 21:22:40
This is forcing a full frame update, that means co
|
+ } |
+ target.innerHTML = '<div style="display: inline-block;"></div>'; |
esprehn
2015/05/04 21:22:40
This is going to destroy all the nodes you created
|
+ } |
+ |
+ PerfTestRunner.measureRunsPerSecond({ |
+ description: "Measures performance of layout when adding whitespace to a div.", |
leviw_travelin_and_unemployed
2015/05/04 20:55:24
This isn't the greatest description. Right now, yo
|
+ run: test |
+ }); |
+ </script> |
+</body> |
+</html> |