blob: 8edefb41e5bb9367b381e096b3d5e6b9244cd382 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
<!DOCTYPE html>
<html>
<head>
<style>
body {
margin: 100px;
height: 3500px;
background-image: url('resources/simple_image.png');
background-size: 200px 200px;
background-attachment: fixed;
background-repeat: no-repeat;
background-position: bottom right;
}
.test {
height: 400px;
width: 600px;
background-color: rgba(0, 0, 0, 0.5);
border: 20px solid orange;
}
</style>
<script src="../resources/run-after-layout-and-paint.js"></script>
<script>
if (window.testRunner) {
testRunner.dumpAsTextWithPixelResults();
window.internals.settings.setPreferCompositingToLCDTextEnabled(true);
}
function doTest()
{
window.scrollTo(0, 200);
runAfterLayoutAndPaint(function()
{
if (window.internals && window.testRunner) {
var layerTree = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_ROOT_LAYER);
if (layerTree.indexOf('\n {\n\n }\n') != -1)
layerTree = internals.layerTreeAsText(document, 1 | internals.LAYER_TREE_INCLUDES_ROOT_LAYER);
testRunner.setCustomTextOutput(layerTree);
}
}, true);
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<div class="test"></div>
</body>
</html>
|