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

Side by Side Diff: third_party/WebKit/PerformanceTests/Paint/containment-resize.html

Issue 2723243002: Add several tough paint performance tests (Closed)
Patch Set: Minimize tests Created 3 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <!-- This case is based on the test in crbug.com/692614.
3 https://www.scirra.com/labs/bugs/containlayoutperf-workaround/ -->
4 <style>
5 #container {
6 border: 1px solid green;
7 contain: content;
8 width: 600px;
9 }
10 .item {
11 outline: 1px solid blue;
12 overflow: hidden;
13 contain: content;
14 }
15 </style>
16
17 <div id="container">
18 </div>
19
20 <script src="../resources/runner.js"></script>
21 <script>
22 const LOREM_IPSUM="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident , sunt in culpa qui officia deserunt mollit anim id est laborum.";
23 function createListItem() {
24 let wrap = document.createElement("div");
25 let item = document.createElement("div");
26 item.classList.add('item');
27 item.textContent = LOREM_IPSUM;
28 wrap.appendChild(item);
29 container.appendChild(wrap);
30 };
31
32 for (let i = 0; i < 20000; ++i)
33 createListItem();
34
35 var target = container.firstElementChild.firstElementChild;
36 PerfTestRunner.measureFrameTime({
37 run: function() {
38 target.style.height = (target.offsetHeight - 1) + 'px';
39 },
40 });
41 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698