Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/inspector/console/console-format-broken-unicode.html |
| diff --git a/third_party/WebKit/LayoutTests/inspector/console/console-format-broken-unicode.html b/third_party/WebKit/LayoutTests/inspector/console/console-format-broken-unicode.html |
| index e424e064ed4756c0d3ab01a16f24bd358ddace42..cfec9bfb491503b51e6a89e0844efd8784e98db8 100644 |
| --- a/third_party/WebKit/LayoutTests/inspector/console/console-format-broken-unicode.html |
| +++ b/third_party/WebKit/LayoutTests/inspector/console/console-format-broken-unicode.html |
| @@ -29,18 +29,30 @@ function test() |
| function step3() |
| { |
| - InspectorTest.evaluateInPage("obj.foo", step4); |
| + InspectorTest.expandConsoleMessages(step4, nestedObjectFilter); |
| } |
| - function step4(result) |
| + function step4() |
| + { |
| + InspectorTest.evaluateInPage("obj.foo", step5); |
| + } |
| + |
| + function step5(result) |
| { |
| var text = result.description; |
| InspectorTest.assertEquals(15, text.length, "text length"); |
| - InspectorTest.assertEquals(7, countTextNodes(text), "nodes count"); |
| + InspectorTest.assertEquals(6, countTextNodes(text), "nodes count"); |
| InspectorTest.addResult("PASS: Found all nodes with the broken text"); |
| InspectorTest.completeTest(); |
| } |
| + function nestedObjectFilter(treeElement) |
|
lushnikov
2016/07/30 00:29:49
can you please explain this filter?
luoe
2016/07/30 01:46:37
In the broken unicode test, it evaluates [{ ..inte
|
| + { |
| + var name = treeElement.nameElement && treeElement.nameElement.textContent; |
| + var titleName = treeElement.treeOutline.titleElement && treeElement.treeOutline.titleElement.textContent; |
| + return name === "0" || titleName === "Array[1]"; |
| + } |
| + |
| function countTextNodes(textContent) |
| { |
| InspectorTest.disableConsoleViewport(); |