blob: baa8d12dd6e11a02d13c8474af8e3815d1267741 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="../resources/runner.js"></script>
</head>
<body>
<div id="wrapper">
<div id="host"></div>
</div>
<script>
var numDivsInHost = 1000;
var nLoops = 30;
function setup()
{
var nDivs = numDivsInHost;
for (var i = 0; i < nDivs; ++i) {
var div = document.createElement('div');
div.appendChild(document.createTextNode('div' + i));
host.appendChild(div);
}
window.content = document.createElement('content');
var shadowRoot = host.createShadowRoot();
shadowRoot.appendChild(content);
}
function run()
{
var host = document.getElementById('host');
var content = window.content;
var nLoops = window.nLoops;
var div = document.createElement('div');
for (var i = 0; i < nLoops; ++i) {
host.appendChild(div);
host.removeChild(div);
content.getDistributedNodes();
}
}
function done()
{
wrapper.innerHTML = '';
}
setup();
PerfTestRunner.measureTime({
description: "Measure Distribution (without layout time) with a lot of host children",
run: run,
done: done
});
</script>
</body>
</html>