4 <title>Benchmark - Stress Blink GC
</title>
7 <script src=
"../resources/runner.js"></script>
8 <script src=
"resources/measure-gc.js"></script>
10 window
.onload = function() {
12 for (var i
= 0; i
< 100000; ++i
)
13 css
+= '#a' + i
+ ' { color: red; background: linear-gradient(olive, tomato); display: inline; padding: 1px 2px 3px 4px; } ';
14 var styleElement
= document
.createElement('style');
15 styleElement
.setAttribute('type', 'text/css');
16 styleElement
.appendChild(document
.createTextNode(css
));
17 var head
= document
.getElementsByTagName('head')[0];
18 head
.appendChild(styleElement
);
20 PerfTestRunner
.measureBlinkGCTime({description
: 'Stress Blink GC by GCing many CSS style rules', done: function() {
21 head
.removeChild(styleElement
);