Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Unified Diff: PerformanceTests/Layout/AddWhitespaceToAnonymousTable.html

Issue 1126673002: Test out performance when adding whitespace to the DOM (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: PerformanceTests/Layout/AddWhitespaceToAnonymousTable.html
diff --git a/PerformanceTests/Layout/AddWhitespaceToAnonymousTable.html b/PerformanceTests/Layout/AddWhitespaceToAnonymousTable.html
new file mode 100644
index 0000000000000000000000000000000000000000..aba481396d6797c7281b6fd8a28dc3015e52e07e
--- /dev/null
+++ b/PerformanceTests/Layout/AddWhitespaceToAnonymousTable.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
esprehn 2015/05/04 22:14:39 ditto.
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title>Adding whitespace to table with anonymous descendant performance test</title>
+ <script src="../resources/runner.js"></script>
+</head>
+<body>
+ <pre id="log"></pre>
+ <div style="display: table;" id="test"></div>
+ <script>
+ var target = document.getElementById("test");
+ function test() {
+ target.innerHTML = '<div style="display: inline-block;"></div>';
esprehn 2015/05/04 22:14:38 Why inline blocks? This just makes us create an an
+ for (var i = 0; i < 1000; i++) {
+ var testElement = document.createTextNode(" ");
+ target.insertBefore(testElement, target.firstChild);
+ }
+ document.body.offsetTop;
+ }
+
+ PerfTestRunner.measureRunsPerSecond({
+ description: "Is sensitive to the performance of layout adding whitespace to a table with anonymous descendants.",
+ run: test
+ });
+ </script>
+</body>
+</html>
« PerformanceTests/Layout/AddWhitespace.html ('K') | « PerformanceTests/Layout/AddWhitespace.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698