Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/console/console-format-broken-unicode.html

Issue 1820393002: DevTools: [ux regression] There is no way to clear console history. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 28 matching lines...) Expand all
39 InspectorTest.assertEquals(6, countTextNodes(text), "nodes count"); 39 InspectorTest.assertEquals(6, countTextNodes(text), "nodes count");
40 InspectorTest.addResult("PASS: Found all nodes with the broken text"); 40 InspectorTest.addResult("PASS: Found all nodes with the broken text");
41 InspectorTest.completeTest(); 41 InspectorTest.completeTest();
42 } 42 }
43 43
44 function countTextNodes(textContent) 44 function countTextNodes(textContent)
45 { 45 {
46 InspectorTest.disableConsoleViewport(); 46 InspectorTest.disableConsoleViewport();
47 47
48 var count = 0; 48 var count = 0;
49 var viewMessages = WebInspector.ConsolePanel._view()._visibleViewMessage s; 49 var viewMessages = WebInspector.ConsoleView.instance()._visibleViewMessa ges;
50 for (var i = 0; i < viewMessages.length; ++i) { 50 for (var i = 0; i < viewMessages.length; ++i) {
51 var node = viewMessages[i].contentElement(); 51 var node = viewMessages[i].contentElement();
52 var currentNode = node; 52 var currentNode = node;
53 while (currentNode = currentNode.traverseNextNode(node)) { 53 while (currentNode = currentNode.traverseNextNode(node)) {
54 if (currentNode.nodeType === Node.TEXT_NODE && currentNode.nodeV alue === textContent) 54 if (currentNode.nodeType === Node.TEXT_NODE && currentNode.nodeV alue === textContent)
55 ++count; 55 ++count;
56 } 56 }
57 } 57 }
58 return count; 58 return count;
59 } 59 }
60 } 60 }
61 61
62 </script> 62 </script>
63 </head> 63 </head>
64 64
65 <body onload="runTest()"> 65 <body onload="runTest()">
66 <p> 66 <p>
67 Tests that console logging dumps proper messages with broken Unicode. 67 Tests that console logging dumps proper messages with broken Unicode.
68 </p> 68 </p>
69 69
70 </body> 70 </body>
71 </html> 71 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698