blob: 2d5bafdcda3cfcc98fbf7c1865f5d1cdf8a595e3 [file] [log] [blame]
Tests DOMSnapshot.getSnapshot method on a mobile page.
Emulating device: 600x600x1
{
"domNodes": [
{
"nodeType": 9,
"nodeName": "#document",
"nodeValue": "",
"backendNodeId": "<number>",
"childNodeIndexes": [
1,
2,
3
],
"layoutNodeIndex": 0,
"documentURL": "<string>",
"baseURL": "<string>",
"documentEncoding": "windows-1252",
"frameId": "<string>",
"scrollOffsetX": 0,
"scrollOffsetY": 0
},
{
"nodeType": 10,
"nodeName": "html",
"nodeValue": "",
"backendNodeId": "<number>",
"publicId": "",
"systemId": ""
},
{
"nodeType": 8,
"nodeName": "#comment",
"nodeValue": " domSnapshot test for a document with a viewport. ",
"backendNodeId": "<number>"
},
{
"nodeType": 1,
"nodeName": "HTML",
"nodeValue": "",
"backendNodeId": "<number>",
"childNodeIndexes": [
4,
15
],
"layoutNodeIndex": 1,
"frameId": "<string>"
},
{
"nodeType": 1,
"nodeName": "HEAD",
"nodeValue": "",
"backendNodeId": "<number>",
"childNodeIndexes": [
5,
6,
7,
9,
10,
12,
13,
14
]
},
{
"nodeType": 1,
"nodeName": "META",
"nodeValue": "",
"backendNodeId": "<number>",
"attributes": [
{
"name": "name",
"value": "viewport"
},
{
"name": "content",
"value": "width=300"
}
]
},
{
"nodeType": 3,
"nodeName": "#text",
"nodeValue": "\n",
"backendNodeId": "<number>"
},
{
"nodeType": 1,
"nodeName": "STYLE",
"nodeValue": "",
"backendNodeId": "<number>",
"childNodeIndexes": [
8
]
},
{
"nodeType": 3,
"nodeName": "#text",
"nodeValue": "\n@font-face {\n font-family: 'ahem';\n src: url(../../resources/Ahem.ttf);\n}\n",
"backendNodeId": "<number>"
},
{
"nodeType": 3,
"nodeName": "#text",
"nodeValue": "\n",
"backendNodeId": "<number>"
},
{
"nodeType": 1,
"nodeName": "STYLE",
"nodeValue": "",
"backendNodeId": "<number>",
"childNodeIndexes": [
11
]
},
{
"nodeType": 3,
"nodeName": "#text",
"nodeValue": "\n* {\n margin: 0;\n padding: 0;\n}\ndiv {\n position: absolute;\n top: 100px;\n left: 100px;\n width: 100px;\n height: 100px;\n background-color: green;\n}\n",
"backendNodeId": "<number>"
},
{
"nodeType": 3,
"nodeName": "#text",
"nodeValue": "\n",
"backendNodeId": "<number>"
},
{
"nodeType": 8,
"nodeName": "#comment",
"nodeValue": " The div's box should have size and position of 100x100 to match the\n computed style, even though it's visually scaled by the viewport. The\n text's box should also be inside the div's box, not outside it. ",
"backendNodeId": "<number>"
},
{
"nodeType": 3,
"nodeName": "#text",
"nodeValue": "\n",
"backendNodeId": "<number>"
},
{
"nodeType": 1,
"nodeName": "BODY",
"nodeValue": "",
"backendNodeId": "<number>",
"childNodeIndexes": [
16,
18
],
"layoutNodeIndex": 2
},
{
"nodeType": 1,
"nodeName": "DIV",
"nodeValue": "",
"backendNodeId": "<number>",
"childNodeIndexes": [
17
],
"attributes": [
{
"name": "style",
"value": "font-family: ahem;"
},
{
"name": "id",
"value": "100x100"
}
],
"layoutNodeIndex": 3
},
{
"nodeType": 3,
"nodeName": "#text",
"nodeValue": "Boxes!",
"backendNodeId": "<number>",
"layoutNodeIndex": 4
},
{
"nodeType": 3,
"nodeName": "#text",
"nodeValue": "\n\n",
"backendNodeId": "<number>"
}
],
"layoutTreeNodes": [
{
"domNodeIndex": 0,
"boundingBox": {
"x": 0,
"y": 0,
"width": 300,
"height": 300
},
"isStackingContext": true
},
{
"domNodeIndex": 3,
"boundingBox": {
"x": 0,
"y": 0,
"width": 300,
"height": 0
},
"isStackingContext": true
},
{
"domNodeIndex": 15,
"boundingBox": {
"x": 0,
"y": 0,
"width": 300,
"height": 0
}
},
{
"domNodeIndex": 16,
"boundingBox": {
"x": 100,
"y": 100,
"width": 100,
"height": 100
}
},
{
"domNodeIndex": 17,
"boundingBox": {
"x": 100,
"y": 100,
"width": 96,
"height": 16
},
"layoutText": "Boxes!",
"inlineTextNodes": [
{
"boundingBox": {
"x": 100,
"y": 100,
"width": 96,
"height": 16
},
"startCharacterIndex": 0,
"numCharacters": 6
}
]
}
],
"computedStyles": []
}