| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../http/tests/inspector/console-test.js"></script> | 4 <script src="../../http/tests/inspector/console-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 | 6 |
| 7 var str = " \uD835\uDC14\uD835\uDC0D\uD835\uDC08\uD835\uDC02\uD835\uDC0E\uD835\
uDC03\uD835\uDC04"; // " UNICODE" | 7 var str = " \uD835\uDC14\uD835\uDC0D\uD835\uDC08\uD835\uDC02\uD835\uDC0E\uD835\
uDC03\uD835\uDC04"; // " UNICODE" |
| 8 var brokenSurrogate = str.substring(0, str.length - 1); | 8 var brokenSurrogate = str.substring(0, str.length - 1); |
| 9 var obj = { foo: brokenSurrogate }; | 9 var obj = { foo: brokenSurrogate }; |
| 10 obj[brokenSurrogate] = "foo"; | 10 obj[brokenSurrogate] = "foo"; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 function step4() | 35 function step4() |
| 36 { | 36 { |
| 37 InspectorTest.evaluateInPage("obj.foo", step5); | 37 InspectorTest.evaluateInPage("obj.foo", step5); |
| 38 } | 38 } |
| 39 | 39 |
| 40 function step5(result) | 40 function step5(result) |
| 41 { | 41 { |
| 42 var text = result.description; | 42 var text = result.description; |
| 43 InspectorTest.assertEquals(15, text.length, "text length"); | 43 InspectorTest.assertEquals(15, text.length, "text length"); |
| 44 InspectorTest.assertEquals(6, countTextNodes(text), "nodes count"); | 44 InspectorTest.assertEquals(8, countTextNodes(text), "nodes count"); |
| 45 InspectorTest.assertEquals(1, countTextNodes("\"" + text + "\""), "nodes
with quoted text count"); |
| 45 InspectorTest.addResult("PASS: Found all nodes with the broken text"); | 46 InspectorTest.addResult("PASS: Found all nodes with the broken text"); |
| 46 InspectorTest.completeTest(); | 47 InspectorTest.completeTest(); |
| 47 } | 48 } |
| 48 | 49 |
| 49 function expandFirstArrayIndexFilter(treeElement) | 50 function expandFirstArrayIndexFilter(treeElement) |
| 50 { | 51 { |
| 51 var propertyName = treeElement.nameElement && treeElement.nameElement.te
xtContent; | 52 var propertyName = treeElement.nameElement && treeElement.nameElement.te
xtContent; |
| 52 return propertyName === "0"; | 53 return propertyName === "0"; |
| 53 } | 54 } |
| 54 | 55 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 73 </script> | 74 </script> |
| 74 </head> | 75 </head> |
| 75 | 76 |
| 76 <body onload="runTest()"> | 77 <body onload="runTest()"> |
| 77 <p> | 78 <p> |
| 78 Tests that console logging dumps proper messages with broken Unicode. | 79 Tests that console logging dumps proper messages with broken Unicode. |
| 79 </p> | 80 </p> |
| 80 | 81 |
| 81 </body> | 82 </body> |
| 82 </html> | 83 </html> |
| OLD | NEW |