1 function initialize_AuditTests()
4 InspectorTest.collectAuditResults = function()
6 WebInspector.panels.audits.showResults(WebInspector.panels.audits.auditResultsTreeElement.children[0].results);
7 var liElements = WebInspector.panels.audits.visibleView.element.getElementsByTagName("li");
8 for (var j = 0; j < liElements.length; ++j) {
9 if (liElements[j].treeElement)
10 liElements[j].treeElement.expand();
12 InspectorTest.collectTextContent(WebInspector.panels.audits.visibleView.element, 0);
15 InspectorTest.collectTextContent = function(element, level)
18 var child = element.firstChild;
21 if (child.nodeType === Node.TEXT_NODE) {
22 for (var i = 0; i < level; ++i)
24 nodeOutput += child.nodeValue;
25 } else if (child.nodeType === Node.ELEMENT_NODE) {
26 if (nodeOutput !== "") {
27 InspectorTest.addResult(nodeOutput);
30 InspectorTest.collectTextContent(child, level + 1);
32 child = child.nextSibling;
34 if (nodeOutput !== "")
35 InspectorTest.addResult(nodeOutput);