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

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

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 { 50 {
51 var propertyName = treeElement.nameElement && treeElement.nameElement.te xtContent; 51 var propertyName = treeElement.nameElement && treeElement.nameElement.te xtContent;
52 return propertyName === "0"; 52 return propertyName === "0";
53 } 53 }
54 54
55 function countTextNodes(textContent) 55 function countTextNodes(textContent)
56 { 56 {
57 InspectorTest.disableConsoleViewport(); 57 InspectorTest.disableConsoleViewport();
58 58
59 var count = 0; 59 var count = 0;
60 var viewMessages = WebInspector.ConsoleView.instance()._visibleViewMessa ges; 60 var viewMessages = Console.ConsoleView.instance()._visibleViewMessages;
61 for (var i = 0; i < viewMessages.length; ++i) { 61 for (var i = 0; i < viewMessages.length; ++i) {
62 var node = viewMessages[i].contentElement(); 62 var node = viewMessages[i].contentElement();
63 var currentNode = node; 63 var currentNode = node;
64 while (currentNode = currentNode.traverseNextNode(node)) { 64 while (currentNode = currentNode.traverseNextNode(node)) {
65 if (currentNode.nodeType === Node.TEXT_NODE && currentNode.nodeV alue === textContent) 65 if (currentNode.nodeType === Node.TEXT_NODE && currentNode.nodeV alue === textContent)
66 ++count; 66 ++count;
67 } 67 }
68 } 68 }
69 return count; 69 return count;
70 } 70 }
71 } 71 }
72 72
73 </script> 73 </script>
74 </head> 74 </head>
75 75
76 <body onload="runTest()"> 76 <body onload="runTest()">
77 <p> 77 <p>
78 Tests that console logging dumps proper messages with broken Unicode. 78 Tests that console logging dumps proper messages with broken Unicode.
79 </p> 79 </p>
80 80
81 </body> 81 </body>
82 </html> 82 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698