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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/css/css-getDocumentSnapshot-expected.txt

Issue 2882193002: [devtools] Add DOMSnapshot domain for dom+layout+style snapshots. (Closed)
Patch Set: move to CSS domain, remove getLayoutTreeAndStyles Created 3 years, 7 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
1 Some Text 1 Some Text
2 And More Text 2 And More Text
3 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque sit amet e st sem. Aenean ut neque volutpat, posuere odio at, mollis nibh. Aenean sodales n ulla et ligula efficitur sollicitudin blandit sed lectus. Duis orci enim, sodale s ac lectus sed, hendrerit efficitur est. Quisque gravida facilisis viverra. 3 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque sit amet e st sem. Aenean ut neque volutpat, posuere odio at, mollis nibh. Aenean sodales n ulla et ligula efficitur sollicitudin blandit sed lectus. Duis orci enim, sodale s ac lectus sed, hendrerit efficitur est. Quisque gravida facilisis viverra.
4 4
5 Lets have a span 5 Lets have a span
6 Rotated text! 6 Rotated text!
7 7
8
9 LayoutTreeNodes result:
10 { 8 {
9 "domNodes": [
10 {
11 "nodeId": 5,
12 "parentId": 4,
13 "backendNodeId": "<number>",
14 "nodeType": 3,
15 "nodeName": "#text",
16 "localName": "",
17 "nodeValue": "\n@font-face {\n font-family: 'ahem';\n src: url(../../res ources/Ahem.ttf);\n}\n"
18 },
19 {
20 "nodeId": 4,
21 "parentId": 3,
22 "backendNodeId": "<number>",
23 "nodeType": 1,
24 "nodeName": "STYLE",
25 "localName": "style",
26 "nodeValue": "",
27 "childNodeCount": 1,
28 "children": [],
29 "attributes": []
30 },
31 {
32 "nodeId": 6,
33 "parentId": 3,
34 "backendNodeId": "<number>",
35 "nodeType": 1,
36 "nodeName": "SCRIPT",
37 "localName": "script",
38 "nodeValue": "",
39 "childNodeCount": 0,
40 "children": [],
41 "attributes": [
42 "type",
43 "text/javascript",
44 "src",
45 "../../http/tests/inspector-protocol/inspector-protocol-test.js"
46 ]
47 },
48 {
49 "nodeId": 8,
50 "parentId": 7,
51 "backendNodeId": "<number>",
52 "nodeType": 3,
53 "nodeName": "#text",
54 "localName": "",
55 "nodeValue": "\n\nfunction test()\n{\n InspectorTest.sendCommand(\"DOM. enable\", {});\n\n var whitelist = [\"transform\", \"transform-origin\", \"he ight\", \"width\", \"display\", \"outline-color\"];\n InspectorTest.sendComma ndOrDie(\"CSS.getDocumentSnapshot\", {\"computedStyleWhitelist\": whitelist, \"d epth\": -1, \"pierce\": true}, onDocumentSnapshot);\n\n function onDocumentSn apshot(response) {\n function stabilize(key, value) {\n var un stableKeys = [\"backendNodeId\", \"documentURL\", \"baseURL\", \"frameId\"];\n if (unstableKeys.indexOf(key) !== -1)\n return \"<\" + typeof(value) + \">\";\n return value;\n }\n InspectorT est.log(JSON.stringify(response, stabilize, 2));\n InspectorTest.complete Test();\n }\n}\n\n"
56 },
57 {
58 "nodeId": 7,
59 "parentId": 3,
60 "backendNodeId": "<number>",
61 "nodeType": 1,
62 "nodeName": "SCRIPT",
63 "localName": "script",
64 "nodeValue": "",
65 "childNodeCount": 1,
66 "children": [],
67 "attributes": []
68 },
69 {
70 "nodeId": 3,
71 "parentId": 2,
72 "backendNodeId": "<number>",
73 "nodeType": 1,
74 "nodeName": "HEAD",
75 "localName": "head",
76 "nodeValue": "",
77 "childNodeCount": 3,
78 "children": [],
79 "attributes": []
80 },
81 {
82 "nodeId": 12,
83 "parentId": 11,
84 "backendNodeId": "<number>",
85 "nodeType": 3,
86 "nodeName": "#text",
87 "localName": "",
88 "nodeValue": "Some Text"
89 },
90 {
91 "nodeId": 11,
92 "parentId": 10,
93 "backendNodeId": "<number>",
94 "nodeType": 1,
95 "nodeName": "DIV",
96 "localName": "div",
97 "nodeValue": "",
98 "childNodeCount": 1,
99 "children": [],
100 "attributes": [
101 "class",
102 "class1"
103 ]
104 },
105 {
106 "nodeId": 13,
107 "parentId": 10,
108 "backendNodeId": "<number>",
109 "nodeType": 3,
110 "nodeName": "#text",
111 "localName": "",
112 "nodeValue": " And More Text\n "
113 },
114 {
115 "nodeId": 16,
116 "parentId": 15,
117 "backendNodeId": "<number>",
118 "nodeType": 3,
119 "nodeName": "#text",
120 "localName": "",
121 "nodeValue": "\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque sit amet est sem.\n Aenean ut neque volutpat, posuere odio at, mollis nibh. Aenean sodales nulla et\n ligula efficitur sollici tudin blandit sed lectus. Duis orci enim, sodales ac lectus sed,\n hendre rit efficitur est. Quisque gravida facilisis viverra.\n "
122 },
123 {
124 "nodeId": 15,
125 "parentId": 14,
126 "backendNodeId": "<number>",
127 "nodeType": 1,
128 "nodeName": "P",
129 "localName": "p",
130 "nodeValue": "",
131 "childNodeCount": 1,
132 "children": [],
133 "attributes": []
134 },
135 {
136 "nodeId": 18,
137 "parentId": 17,
138 "backendNodeId": "<number>",
139 "nodeType": 1,
140 "nodeName": "LI",
141 "localName": "li",
142 "nodeValue": "",
143 "childNodeCount": 0,
144 "children": [],
145 "attributes": [
146 "class",
147 "class4"
148 ]
149 },
150 {
151 "nodeId": 20,
152 "parentId": 19,
153 "backendNodeId": "<number>",
154 "nodeType": 3,
155 "nodeName": "#text",
156 "localName": "",
157 "nodeValue": "Lets have a span"
158 },
159 {
160 "nodeId": 19,
161 "parentId": 17,
162 "backendNodeId": "<number>",
163 "nodeType": 1,
164 "nodeName": "SPAN",
165 "localName": "span",
166 "nodeValue": "",
167 "childNodeCount": 1,
168 "children": [],
169 "attributes": []
170 },
171 {
172 "nodeId": 17,
173 "parentId": 14,
174 "backendNodeId": "<number>",
175 "nodeType": 1,
176 "nodeName": "UL",
177 "localName": "ul",
178 "nodeValue": "",
179 "childNodeCount": 2,
180 "children": [],
181 "attributes": [
182 "class",
183 "class3"
184 ]
185 },
186 {
187 "nodeId": 14,
188 "parentId": 10,
189 "backendNodeId": "<number>",
190 "nodeType": 1,
191 "nodeName": "DIV",
192 "localName": "div",
193 "nodeValue": "",
194 "childNodeCount": 2,
195 "children": [],
196 "attributes": [
197 "style",
198 "display:inline-block; width: 200px"
199 ]
200 },
201 {
202 "nodeId": 22,
203 "parentId": 21,
204 "backendNodeId": "<number>",
205 "nodeType": 3,
206 "nodeName": "#text",
207 "localName": "",
208 "nodeValue": "Rotated text!"
209 },
210 {
211 "nodeId": 21,
212 "parentId": 10,
213 "backendNodeId": "<number>",
214 "nodeType": 1,
215 "nodeName": "DIV",
216 "localName": "div",
217 "nodeValue": "",
218 "childNodeCount": 1,
219 "children": [],
220 "attributes": [
221 "style",
222 "transform: rotateZ(90deg); width: 200px"
223 ]
224 },
225 {
226 "nodeId": 28,
227 "parentId": 27,
228 "backendNodeId": "<number>",
229 "nodeType": 3,
230 "nodeName": "#text",
231 "localName": "",
232 "nodeValue": "\n@font-face {\n font-family: 'ahem';\n src: url(../../../ resources/Ahem.ttf);\n}\n"
233 },
234 {
235 "nodeId": 27,
236 "parentId": 26,
237 "backendNodeId": "<number>",
238 "nodeType": 1,
239 "nodeName": "STYLE",
240 "localName": "style",
241 "nodeValue": "",
242 "childNodeCount": 1,
243 "children": [],
244 "attributes": []
245 },
246 {
247 "nodeId": 26,
248 "parentId": 25,
249 "backendNodeId": "<number>",
250 "nodeType": 1,
251 "nodeName": "HEAD",
252 "localName": "head",
253 "nodeValue": "",
254 "childNodeCount": 1,
255 "children": [],
256 "attributes": []
257 },
258 {
259 "nodeId": 31,
260 "parentId": 30,
261 "backendNodeId": "<number>",
262 "nodeType": 3,
263 "nodeName": "#text",
264 "localName": "",
265 "nodeValue": "\nHello from the iframe.\n"
266 },
267 {
268 "nodeId": 30,
269 "parentId": 29,
270 "backendNodeId": "<number>",
271 "nodeType": 1,
272 "nodeName": "DIV",
273 "localName": "div",
274 "nodeValue": "",
275 "childNodeCount": 1,
276 "children": [],
277 "attributes": [
278 "style",
279 "font-family: ahem;"
280 ]
281 },
282 {
283 "nodeId": 29,
284 "parentId": 25,
285 "backendNodeId": "<number>",
286 "nodeType": 1,
287 "nodeName": "BODY",
288 "localName": "body",
289 "nodeValue": "",
290 "childNodeCount": 1,
291 "children": [],
292 "attributes": []
293 },
294 {
295 "nodeId": 25,
296 "parentId": 24,
297 "backendNodeId": "<number>",
298 "nodeType": 1,
299 "nodeName": "HTML",
300 "localName": "html",
301 "nodeValue": "",
302 "childNodeCount": 2,
303 "children": [],
304 "attributes": [],
305 "frameId": "<string>"
306 },
307 {
308 "nodeId": 23,
309 "parentId": 10,
310 "backendNodeId": "<number>",
311 "nodeType": 1,
312 "nodeName": "IFRAME",
313 "localName": "iframe",
314 "nodeValue": "",
315 "childNodeCount": 0,
316 "children": [],
317 "attributes": [
318 "src",
319 "../dom/resources/simple-iframe.html",
320 "width",
321 "400",
322 "height",
323 "200"
324 ],
325 "frameId": "<string>",
326 "contentDocument": {
327 "nodeId": 24,
328 "backendNodeId": "<number>",
329 "nodeType": 9,
330 "nodeName": "#document",
331 "localName": "",
332 "nodeValue": "",
333 "childNodeCount": 1,
334 "children": [],
335 "documentURL": "<string>",
336 "baseURL": "<string>",
337 "xmlVersion": ""
338 }
339 },
340 {
341 "nodeId": 35,
342 "parentId": 34,
343 "backendNodeId": "<number>",
344 "nodeType": 3,
345 "nodeName": "#text",
346 "localName": "",
347 "nodeValue": "\n:host {\n color: red;\n}\n"
348 },
349 {
350 "nodeId": 34,
351 "parentId": 33,
352 "backendNodeId": "<number>",
353 "nodeType": 1,
354 "nodeName": "STYLE",
355 "localName": "style",
356 "nodeValue": "",
357 "childNodeCount": 1,
358 "children": [],
359 "attributes": []
360 },
361 {
362 "nodeId": 38,
363 "parentId": 37,
364 "backendNodeId": "<number>",
365 "nodeType": 3,
366 "nodeName": "#text",
367 "localName": "",
368 "nodeValue": "Hi!"
369 },
370 {
371 "nodeId": 37,
372 "parentId": 36,
373 "backendNodeId": "<number>",
374 "nodeType": 1,
375 "nodeName": "H1",
376 "localName": "h1",
377 "nodeValue": "",
378 "childNodeCount": 1,
379 "children": [],
380 "attributes": []
381 },
382 {
383 "nodeId": 36,
384 "parentId": 33,
385 "backendNodeId": "<number>",
386 "nodeType": 1,
387 "nodeName": "DIV",
388 "localName": "div",
389 "nodeValue": "",
390 "childNodeCount": 1,
391 "children": [],
392 "attributes": [
393 "style",
394 "font-family: ahem;"
395 ]
396 },
397 {
398 "nodeId": 32,
399 "parentId": 10,
400 "backendNodeId": "<number>",
401 "nodeType": 1,
402 "nodeName": "DIV",
403 "localName": "div",
404 "nodeValue": "",
405 "childNodeCount": 0,
406 "children": [],
407 "attributes": [
408 "id",
409 "shadow-host"
410 ],
411 "shadowRoots": [
412 {
413 "nodeId": 33,
414 "backendNodeId": "<number>",
415 "nodeType": 11,
416 "nodeName": "#document-fragment",
417 "localName": "",
418 "nodeValue": "",
419 "childNodeCount": 2,
420 "children": [],
421 "shadowRootType": "open"
422 }
423 ]
424 },
425 {
426 "nodeId": 40,
427 "parentId": 39,
428 "backendNodeId": "<number>",
429 "nodeType": 3,
430 "nodeName": "#text",
431 "localName": "",
432 "nodeValue": "\n var host = document.querySelector(\"#shadow-host\" ).createShadowRoot();\n var template = document.querySelector(\"#shadow-t emplate\");\n host.appendChild(template.content);\n template.remov e();\n window.onload = runTest;\n "
433 },
434 {
435 "nodeId": 39,
436 "parentId": 10,
437 "backendNodeId": "<number>",
438 "nodeType": 1,
439 "nodeName": "SCRIPT",
440 "localName": "script",
441 "nodeValue": "",
442 "childNodeCount": 1,
443 "children": [],
444 "attributes": [
445 "type",
446 "text/javascript"
447 ]
448 },
449 {
450 "nodeId": 10,
451 "parentId": 9,
452 "backendNodeId": "<number>",
453 "nodeType": 1,
454 "nodeName": "DIV",
455 "localName": "div",
456 "nodeValue": "",
457 "childNodeCount": 7,
458 "children": [],
459 "attributes": [
460 "style",
461 "font-family: ahem;"
462 ]
463 },
464 {
465 "nodeId": 9,
466 "parentId": 2,
467 "backendNodeId": "<number>",
468 "nodeType": 1,
469 "nodeName": "BODY",
470 "localName": "body",
471 "nodeValue": "",
472 "childNodeCount": 1,
473 "children": [],
474 "attributes": [
475 "class",
476 "body-class"
477 ]
478 },
479 {
480 "nodeId": 2,
481 "parentId": 1,
482 "backendNodeId": "<number>",
483 "nodeType": 1,
484 "nodeName": "HTML",
485 "localName": "html",
486 "nodeValue": "",
487 "childNodeCount": 2,
488 "children": [],
489 "attributes": [],
490 "frameId": "<string>"
491 },
492 {
493 "nodeId": 1,
494 "backendNodeId": "<number>",
495 "nodeType": 9,
496 "nodeName": "#document",
497 "localName": "",
498 "nodeValue": "",
499 "childNodeCount": 1,
500 "children": [],
501 "documentURL": "<string>",
502 "baseURL": "<string>",
503 "xmlVersion": ""
504 }
505 ],
11 "layoutTreeNodes": [ 506 "layoutTreeNodes": [
12 { 507 {
13 "nodeId": 1, 508 "nodeId": 1,
14 "boundingBox": { 509 "boundingBox": {
15 "x": 0, 510 "x": 0,
16 "y": 0, 511 "y": 0,
17 "width": 785, 512 "width": 785,
18 "height": 600 513 "height": 600
19 } 514 }
20 }, 515 },
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 "width": 16, 1042 "width": 16,
548 "height": 80 1043 "height": 80
549 }, 1044 },
550 "startCharacterIndex": 8, 1045 "startCharacterIndex": 8,
551 "numCharacters": 5 1046 "numCharacters": 5
552 } 1047 }
553 ], 1048 ],
554 "styleIndex": 10 1049 "styleIndex": 10
555 }, 1050 },
556 { 1051 {
1052 "nodeId": 25,
1053 "boundingBox": {
1054 "x": 10,
1055 "y": 634,
1056 "width": 400,
1057 "height": 200
1058 },
1059 "styleIndex": 11
1060 },
1061 {
1062 "nodeId": 29,
1063 "boundingBox": {
1064 "x": 18,
1065 "y": 642,
1066 "width": 384,
1067 "height": 184
1068 },
1069 "styleIndex": 12
1070 },
1071 {
1072 "nodeId": 30,
1073 "boundingBox": {
1074 "x": 18,
1075 "y": 642,
1076 "width": 384,
1077 "height": 16
1078 },
1079 "styleIndex": 13
1080 },
1081 {
1082 "nodeId": 31,
1083 "boundingBox": {
1084 "x": 8,
1085 "y": 8,
1086 "width": 352,
1087 "height": 16
1088 },
1089 "layoutText": "\nHello from the iframe.\n",
1090 "inlineTextNodes": [
1091 {
1092 "boundingBox": {
1093 "x": 8,
1094 "y": 8,
1095 "width": 352,
1096 "height": 16
1097 },
1098 "startCharacterIndex": 1,
1099 "numCharacters": 22
1100 }
1101 ],
1102 "styleIndex": 3
1103 },
1104 {
557 "nodeId": 23, 1105 "nodeId": 23,
558 "boundingBox": { 1106 "boundingBox": {
559 "x": 8, 1107 "x": 8,
560 "y": 632, 1108 "y": 632,
561 "width": 404, 1109 "width": 404,
562 "height": 204 1110 "height": 204
563 }, 1111 },
564 "styleIndex": 11 1112 "styleIndex": 14
565 }, 1113 },
566 { 1114 {
567 "nodeId": 25, 1115 "nodeId": 36,
568 "boundingBox": { 1116 "boundingBox": {
569 "x": 8, 1117 "x": 8,
570 "y": 857, 1118 "y": 857,
571 "width": 769, 1119 "width": 769,
572 "height": 33 1120 "height": 33
573 }, 1121 },
574 "styleIndex": 12 1122 "styleIndex": 15
1123 },
1124 {
1125 "nodeId": 37,
1126 "boundingBox": {
1127 "x": 8,
1128 "y": 857,
1129 "width": 769,
1130 "height": 33
1131 },
1132 "styleIndex": 15
1133 },
1134 {
1135 "nodeId": 38,
1136 "boundingBox": {
1137 "x": 8,
1138 "y": 857,
1139 "width": 96,
1140 "height": 33
1141 },
1142 "layoutText": "Hi!",
1143 "inlineTextNodes": [
1144 {
1145 "boundingBox": {
1146 "x": 8,
1147 "y": 857.4375,
1148 "width": 96,
1149 "height": 32
1150 },
1151 "startCharacterIndex": 0,
1152 "numCharacters": 3
1153 }
1154 ],
1155 "styleIndex": 16
1156 },
1157 {
1158 "nodeId": 32,
1159 "boundingBox": {
1160 "x": 8,
1161 "y": 857,
1162 "width": 769,
1163 "height": 33
1164 },
1165 "styleIndex": 15
575 } 1166 }
576 ], 1167 ],
577 "computedStyles": [ 1168 "computedStyles": [
578 { 1169 {
579 "properties": [ 1170 "properties": [
580 { 1171 {
581 "name": "transform", 1172 "name": "transform",
582 "value": "none" 1173 "value": "none"
583 }, 1174 },
584 { 1175 {
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 ] 1475 ]
885 }, 1476 },
886 { 1477 {
887 "properties": [ 1478 "properties": [
888 { 1479 {
889 "name": "transform", 1480 "name": "transform",
890 "value": "none" 1481 "value": "none"
891 }, 1482 },
892 { 1483 {
893 "name": "transform-origin", 1484 "name": "transform-origin",
1485 "value": "200px 100px"
1486 },
1487 {
1488 "name": "height",
1489 "value": "200px"
1490 },
1491 {
1492 "name": "width",
1493 "value": "400px"
1494 },
1495 {
1496 "name": "display",
1497 "value": "block"
1498 },
1499 {
1500 "name": "outline-color",
1501 "value": "rgb(0, 0, 0)"
1502 }
1503 ]
1504 },
1505 {
1506 "properties": [
1507 {
1508 "name": "transform",
1509 "value": "none"
1510 },
1511 {
1512 "name": "transform-origin",
1513 "value": "192px 92px"
1514 },
1515 {
1516 "name": "height",
1517 "value": "184px"
1518 },
1519 {
1520 "name": "width",
1521 "value": "384px"
1522 },
1523 {
1524 "name": "display",
1525 "value": "block"
1526 },
1527 {
1528 "name": "outline-color",
1529 "value": "rgb(0, 0, 0)"
1530 }
1531 ]
1532 },
1533 {
1534 "properties": [
1535 {
1536 "name": "transform",
1537 "value": "none"
1538 },
1539 {
1540 "name": "transform-origin",
1541 "value": "192px 8px"
1542 },
1543 {
1544 "name": "height",
1545 "value": "16px"
1546 },
1547 {
1548 "name": "width",
1549 "value": "384px"
1550 },
1551 {
1552 "name": "display",
1553 "value": "block"
1554 },
1555 {
1556 "name": "outline-color",
1557 "value": "rgb(0, 0, 0)"
1558 }
1559 ]
1560 },
1561 {
1562 "properties": [
1563 {
1564 "name": "transform",
1565 "value": "none"
1566 },
1567 {
1568 "name": "transform-origin",
894 "value": "202px 102px" 1569 "value": "202px 102px"
895 }, 1570 },
896 { 1571 {
897 "name": "height", 1572 "name": "height",
898 "value": "200px" 1573 "value": "200px"
899 }, 1574 },
900 { 1575 {
901 "name": "width", 1576 "name": "width",
902 "value": "400px" 1577 "value": "400px"
903 }, 1578 },
(...skipping 27 matching lines...) Expand all
931 }, 1606 },
932 { 1607 {
933 "name": "display", 1608 "name": "display",
934 "value": "block" 1609 "value": "block"
935 }, 1610 },
936 { 1611 {
937 "name": "outline-color", 1612 "name": "outline-color",
938 "value": "rgb(255, 0, 0)" 1613 "value": "rgb(255, 0, 0)"
939 } 1614 }
940 ] 1615 ]
1616 },
1617 {
1618 "properties": [
1619 {
1620 "name": "transform",
1621 "value": "none"
1622 },
1623 {
1624 "name": "transform-origin",
1625 "value": "0px 0px"
1626 },
1627 {
1628 "name": "height",
1629 "value": "auto"
1630 },
1631 {
1632 "name": "width",
1633 "value": "auto"
1634 },
1635 {
1636 "name": "display",
1637 "value": "block"
1638 },
1639 {
1640 "name": "outline-color",
1641 "value": "rgb(255, 0, 0)"
1642 }
1643 ]
941 } 1644 }
942 ] 1645 ]
943 } 1646 }
944 1647
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698