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

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

Issue 1963753003: DevTools: default all console object previews to lossy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added missing return Created 4 years, 7 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 18 matching lines...) Expand all
29 29
30 function step3() 30 function step3()
31 { 31 {
32 InspectorTest.evaluateInPage("obj.foo", step4); 32 InspectorTest.evaluateInPage("obj.foo", step4);
33 } 33 }
34 34
35 function step4(result) 35 function step4(result)
36 { 36 {
37 var text = result.description; 37 var text = result.description;
38 InspectorTest.assertEquals(15, text.length, "text length"); 38 InspectorTest.assertEquals(15, text.length, "text length");
39 InspectorTest.assertEquals(6, countTextNodes(text), "nodes count"); 39 InspectorTest.assertEquals(8, 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.ConsoleView.instance()._visibleViewMessa ges; 49 var viewMessages = WebInspector.ConsoleView.instance()._visibleViewMessa ges;
(...skipping 12 matching lines...) Expand all
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