| Index: third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js
|
| index 609d1a936626b32f23563fb00c2a879447bfc206..1e932c0968fb0c0ca4e826bdeaaf04cce7870cce 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js
|
| @@ -247,6 +247,21 @@ InspectorTest.dumpDeepInnerHTML = function(element)
|
| innerHTML("", element)
|
| }
|
|
|
| +InspectorTest.deepTextContent = function(element)
|
| +{
|
| + if (!element)
|
| + return "";
|
| + if (element.nodeType === Node.TEXT_NODE && element.nodeValue)
|
| + return !element.parentElement || element.parentElement.nodeName !== "STYLE" ? element.nodeValue : "";
|
| + var res = "";
|
| + var children = element.childNodes;
|
| + for (var i = 0; i < children.length; ++i)
|
| + res += InspectorTest.deepTextContent(children[i]);
|
| + if (element.shadowRoot)
|
| + res += InspectorTest.deepTextContent(element.shadowRoot);
|
| + return res;
|
| +}
|
| +
|
| InspectorTest.dump = function(value, customFormatters, prefix, prefixWithName)
|
| {
|
| prefixWithName = prefixWithName || prefix;
|
|
|