OLD | NEW |
(Empty) | |
| 1 (async function(testRunner) { |
| 2 let {page, session, dp} = await testRunner.startURL('../resources/dom-snapshot
-input-value.html', 'Tests DOMSnapshot.getSnapshot method returning input values
.'); |
| 3 |
| 4 function stabilize(key, value) { |
| 5 var unstableKeys = ['documentURL', 'baseURL', 'frameId', 'backendNodeId', 'l
ayoutTreeNodes', 'computedStyles']; |
| 6 if (unstableKeys.indexOf(key) !== -1) |
| 7 return '<' + typeof(value) + '>'; |
| 8 if (typeof value === 'string' && value.indexOf('/dom-snapshot/') !== -1) |
| 9 value = '<value>'; |
| 10 return value; |
| 11 } |
| 12 |
| 13 var response = await dp.DOMSnapshot.getSnapshot({'computedStyleWhitelist': []}
); |
| 14 if (response.error) |
| 15 testRunner.log(response); |
| 16 else |
| 17 testRunner.log(JSON.stringify(response.result, stabilize, 2)); |
| 18 testRunner.completeTest(); |
| 19 }) |
OLD | NEW |