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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-getFlattenedDocument-expected.txt

Issue 2633343003: Adds DOM.getFlatDocument which returns an array of nodes (Closed)
Patch Set: Fix headless browser test Created 3 years, 10 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
(Empty)
1 A
2 B
3 C
4 D
5 E
6
7 {
8 "nodes": [
9 {
10 "nodeId": 4,
11 "parentId": 3,
12 "backendNodeId": "<number>",
13 "nodeType": 1,
14 "nodeName": "SCRIPT",
15 "localName": "script",
16 "nodeValue": "",
17 "childNodeCount": 0,
18 "children": [],
19 "attributes": [
20 "type",
21 "text/javascript",
22 "src",
23 "../../http/tests/inspector-protocol/inspector-protocol-test.js"
24 ]
25 },
26 {
27 "nodeId": 6,
28 "parentId": 5,
29 "backendNodeId": "<number>",
30 "nodeType": 3,
31 "nodeName": "#text",
32 "localName": "",
33 "nodeValue": "\n\nfunction test()\n{\n InspectorTest.sendCommand(\"DOM. enable\", {});\n InspectorTest.sendCommandOrDie(\"DOM.getFlattenedDocument\", {\"depth\": -1, \"pierce\": true}, onDocument);\n\n function onDocument(resp onse) {\n function stabilize(key, value) {\n var unstableKeys = [\"backendNodeId\", \"documentURL\", \"baseURL\", \"frameId\"];\n i f (unstableKeys.indexOf(key) !== -1)\n return \"<\" + typeof(valu e) + \">\";\n return value;\n }\n InspectorTest.log(JSO N.stringify(response, stabilize, 2));\n InspectorTest.completeTest();\n }\n}\n\n"
34 },
35 {
36 "nodeId": 5,
37 "parentId": 3,
38 "backendNodeId": "<number>",
39 "nodeType": 1,
40 "nodeName": "SCRIPT",
41 "localName": "script",
42 "nodeValue": "",
43 "childNodeCount": 1,
44 "children": [],
45 "attributes": []
46 },
47 {
48 "nodeId": 3,
49 "parentId": 2,
50 "backendNodeId": "<number>",
51 "nodeType": 1,
52 "nodeName": "HEAD",
53 "localName": "head",
54 "nodeValue": "",
55 "childNodeCount": 2,
56 "children": [],
57 "attributes": []
58 },
59 {
60 "nodeId": 9,
61 "parentId": 8,
62 "backendNodeId": "<number>",
63 "nodeType": 3,
64 "nodeName": "#text",
65 "localName": "",
66 "nodeValue": " A\n "
67 },
68 {
69 "nodeId": 11,
70 "parentId": 10,
71 "backendNodeId": "<number>",
72 "nodeType": 3,
73 "nodeName": "#text",
74 "localName": "",
75 "nodeValue": " B\n "
76 },
77 {
78 "nodeId": 13,
79 "parentId": 12,
80 "backendNodeId": "<number>",
81 "nodeType": 3,
82 "nodeName": "#text",
83 "localName": "",
84 "nodeValue": " C\n "
85 },
86 {
87 "nodeId": 15,
88 "parentId": 14,
89 "backendNodeId": "<number>",
90 "nodeType": 3,
91 "nodeName": "#text",
92 "localName": "",
93 "nodeValue": " D\n "
94 },
95 {
96 "nodeId": 17,
97 "parentId": 16,
98 "backendNodeId": "<number>",
99 "nodeType": 3,
100 "nodeName": "#text",
101 "localName": "",
102 "nodeValue": " E\n "
103 },
104 {
105 "nodeId": 16,
106 "parentId": 14,
107 "backendNodeId": "<number>",
108 "nodeType": 1,
109 "nodeName": "DIV",
110 "localName": "div",
111 "nodeValue": "",
112 "childNodeCount": 1,
113 "children": [],
114 "attributes": [
115 "id",
116 "E"
117 ]
118 },
119 {
120 "nodeId": 14,
121 "parentId": 12,
122 "backendNodeId": "<number>",
123 "nodeType": 1,
124 "nodeName": "DIV",
125 "localName": "div",
126 "nodeValue": "",
127 "childNodeCount": 2,
128 "children": [],
129 "attributes": [
130 "id",
131 "D"
132 ]
133 },
134 {
135 "nodeId": 12,
136 "parentId": 10,
137 "backendNodeId": "<number>",
138 "nodeType": 1,
139 "nodeName": "DIV",
140 "localName": "div",
141 "nodeValue": "",
142 "childNodeCount": 2,
143 "children": [],
144 "attributes": [
145 "id",
146 "C"
147 ]
148 },
149 {
150 "nodeId": 10,
151 "parentId": 8,
152 "backendNodeId": "<number>",
153 "nodeType": 1,
154 "nodeName": "DIV",
155 "localName": "div",
156 "nodeValue": "",
157 "childNodeCount": 2,
158 "children": [],
159 "attributes": [
160 "id",
161 "B"
162 ]
163 },
164 {
165 "nodeId": 8,
166 "parentId": 7,
167 "backendNodeId": "<number>",
168 "nodeType": 1,
169 "nodeName": "DIV",
170 "localName": "div",
171 "nodeValue": "",
172 "childNodeCount": 2,
173 "children": [],
174 "attributes": [
175 "id",
176 "A"
177 ]
178 },
179 {
180 "nodeId": 23,
181 "parentId": 22,
182 "backendNodeId": "<number>",
183 "nodeType": 3,
184 "nodeName": "#text",
185 "localName": "",
186 "nodeValue": "\n@font-face {\n font-family: 'ahem';\n src: url(../../../ resources/Ahem.ttf);\n}\n"
187 },
188 {
189 "nodeId": 22,
190 "parentId": 21,
191 "backendNodeId": "<number>",
192 "nodeType": 1,
193 "nodeName": "STYLE",
194 "localName": "style",
195 "nodeValue": "",
196 "childNodeCount": 1,
197 "children": [],
198 "attributes": []
199 },
200 {
201 "nodeId": 21,
202 "parentId": 20,
203 "backendNodeId": "<number>",
204 "nodeType": 1,
205 "nodeName": "HEAD",
206 "localName": "head",
207 "nodeValue": "",
208 "childNodeCount": 1,
209 "children": [],
210 "attributes": []
211 },
212 {
213 "nodeId": 26,
214 "parentId": 25,
215 "backendNodeId": "<number>",
216 "nodeType": 3,
217 "nodeName": "#text",
218 "localName": "",
219 "nodeValue": "\nHello from the iframe.\n"
220 },
221 {
222 "nodeId": 25,
223 "parentId": 24,
224 "backendNodeId": "<number>",
225 "nodeType": 1,
226 "nodeName": "DIV",
227 "localName": "div",
228 "nodeValue": "",
229 "childNodeCount": 1,
230 "children": [],
231 "attributes": [
232 "style",
233 "font-family: ahem;"
234 ]
235 },
236 {
237 "nodeId": 24,
238 "parentId": 20,
239 "backendNodeId": "<number>",
240 "nodeType": 1,
241 "nodeName": "BODY",
242 "localName": "body",
243 "nodeValue": "",
244 "childNodeCount": 1,
245 "children": [],
246 "attributes": []
247 },
248 {
249 "nodeId": 20,
250 "parentId": 19,
251 "backendNodeId": "<number>",
252 "nodeType": 1,
253 "nodeName": "HTML",
254 "localName": "html",
255 "nodeValue": "",
256 "childNodeCount": 2,
257 "children": [],
258 "attributes": [],
259 "frameId": "<string>"
260 },
261 {
262 "nodeId": 18,
263 "parentId": 7,
264 "backendNodeId": "<number>",
265 "nodeType": 1,
266 "nodeName": "IFRAME",
267 "localName": "iframe",
268 "nodeValue": "",
269 "childNodeCount": 0,
270 "children": [],
271 "attributes": [
272 "src",
273 "../dom/resources/simple-iframe.html",
274 "width",
275 "400",
276 "height",
277 "200"
278 ],
279 "frameId": "<string>",
280 "contentDocument": {
281 "nodeId": 19,
282 "backendNodeId": "<number>",
283 "nodeType": 9,
284 "nodeName": "#document",
285 "localName": "",
286 "nodeValue": "",
287 "childNodeCount": 1,
288 "children": [],
289 "documentURL": "<string>",
290 "baseURL": "<string>",
291 "xmlVersion": ""
292 }
293 },
294 {
295 "nodeId": 30,
296 "parentId": 29,
297 "backendNodeId": "<number>",
298 "nodeType": 3,
299 "nodeName": "#text",
300 "localName": "",
301 "nodeValue": "\n:host {\n color: red;\n}\n"
302 },
303 {
304 "nodeId": 29,
305 "parentId": 28,
306 "backendNodeId": "<number>",
307 "nodeType": 1,
308 "nodeName": "STYLE",
309 "localName": "style",
310 "nodeValue": "",
311 "childNodeCount": 1,
312 "children": [],
313 "attributes": []
314 },
315 {
316 "nodeId": 31,
317 "parentId": 28,
318 "backendNodeId": "<number>",
319 "nodeType": 1,
320 "nodeName": "DIV",
321 "localName": "div",
322 "nodeValue": "",
323 "childNodeCount": 0,
324 "children": [],
325 "attributes": []
326 },
327 {
328 "nodeId": 33,
329 "parentId": 32,
330 "backendNodeId": "<number>",
331 "nodeType": 3,
332 "nodeName": "#text",
333 "localName": "",
334 "nodeValue": "Hi from a template!"
335 },
336 {
337 "nodeId": 32,
338 "parentId": 28,
339 "backendNodeId": "<number>",
340 "nodeType": 1,
341 "nodeName": "H1",
342 "localName": "h1",
343 "nodeValue": "",
344 "childNodeCount": 1,
345 "children": [],
346 "attributes": []
347 },
348 {
349 "nodeId": 27,
350 "parentId": 7,
351 "backendNodeId": "<number>",
352 "nodeType": 1,
353 "nodeName": "DIV",
354 "localName": "div",
355 "nodeValue": "",
356 "childNodeCount": 0,
357 "children": [],
358 "attributes": [
359 "id",
360 "shadow-host"
361 ],
362 "shadowRoots": [
363 {
364 "nodeId": 28,
365 "backendNodeId": "<number>",
366 "nodeType": 11,
367 "nodeName": "#document-fragment",
368 "localName": "",
369 "nodeValue": "",
370 "childNodeCount": 3,
371 "children": [],
372 "shadowRootType": "open"
373 }
374 ]
375 },
376 {
377 "nodeId": 35,
378 "parentId": 34,
379 "backendNodeId": "<number>",
380 "nodeType": 3,
381 "nodeName": "#text",
382 "localName": "",
383 "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 "
384 },
385 {
386 "nodeId": 34,
387 "parentId": 7,
388 "backendNodeId": "<number>",
389 "nodeType": 1,
390 "nodeName": "SCRIPT",
391 "localName": "script",
392 "nodeValue": "",
393 "childNodeCount": 1,
394 "children": [],
395 "attributes": [
396 "type",
397 "text/javascript"
398 ]
399 },
400 {
401 "nodeId": 7,
402 "parentId": 2,
403 "backendNodeId": "<number>",
404 "nodeType": 1,
405 "nodeName": "BODY",
406 "localName": "body",
407 "nodeValue": "",
408 "childNodeCount": 4,
409 "children": [],
410 "attributes": [
411 "class",
412 "body-class"
413 ]
414 },
415 {
416 "nodeId": 2,
417 "parentId": 1,
418 "backendNodeId": "<number>",
419 "nodeType": 1,
420 "nodeName": "HTML",
421 "localName": "html",
422 "nodeValue": "",
423 "childNodeCount": 2,
424 "children": [],
425 "attributes": [],
426 "frameId": "<string>"
427 },
428 {
429 "nodeId": 1,
430 "backendNodeId": "<number>",
431 "nodeType": 9,
432 "nodeName": "#document",
433 "localName": "",
434 "nodeValue": "",
435 "childNodeCount": 1,
436 "children": [],
437 "documentURL": "<string>",
438 "baseURL": "<string>",
439 "xmlVersion": ""
440 }
441 ]
442 }
443
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698