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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/console/console-object-preview.html

Issue 2596133002: Reland of DevTools: merge array formatting logic (Closed)
Patch Set: test Created 3 years, 11 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 function logToConsole() 7 function logToConsole()
8 { 8 {
9 console.log("Mutating object in a loop"); 9 console.log("Mutating object in a loop");
10 var object = { a: 0, b: 0 }; 10 var object = { a: 0, b: 0 };
(...skipping 16 matching lines...) Expand all
27 } 27 }
28 console.log(objectWithManyProperties); 28 console.log(objectWithManyProperties);
29 29
30 console.log("Array with many properties"); 30 console.log("Array with many properties");
31 var arrayWithManyProperties = [0, 1]; 31 var arrayWithManyProperties = [0, 1];
32 for (var i = 0; i < 10; ++i) { 32 for (var i = 0; i < 10; ++i) {
33 arrayWithManyProperties["property_" + i] = i; 33 arrayWithManyProperties["property_" + i] = i;
34 } 34 }
35 console.log(arrayWithManyProperties); 35 console.log(arrayWithManyProperties);
36 36
37 console.log("Array with gaps and overflow");
38 var arrayWithGapsAndOverflow = [];
39 for (var i = 0; i < 101; i++) {
40 arrayWithGapsAndOverflow[57 * i + 32] = i;
41 }
42 console.log(arrayWithGapsAndOverflow);
43
44 console.log("Array with gaps without overflow");
45 var arrayWithGapsWithoutOverflow = [];
46 for (var i = 0; i < 99; i++) {
47 arrayWithGapsWithoutOverflow[57 * i + 32] = i;
48 }
49 console.log(arrayWithGapsWithoutOverflow);
50
37 console.log("Object with proto"); 51 console.log("Object with proto");
38 var objectWithProto = { d: 1 }; 52 var objectWithProto = { d: 1 };
39 objectWithProto.__proto__ = object; 53 objectWithProto.__proto__ = object;
40 console.log(objectWithProto); 54 console.log(objectWithProto);
41 55
42 console.log("Sparse array"); 56 console.log("Sparse array");
43 var sparseArray = new Array(150); 57 var sparseArray = new Array(150);
44 sparseArray[50] = 50; 58 sparseArray[50] = 50;
45 console.log(sparseArray); 59 console.log(sparseArray);
46 60
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 </script> 108 </script>
95 </head> 109 </head>
96 110
97 <body onload="runTest()"> 111 <body onload="runTest()">
98 <p> 112 <p>
99 Tests that console produces instant previews for arrays and objects. 113 Tests that console produces instant previews for arrays and objects.
100 </p> 114 </p>
101 115
102 </body> 116 </body>
103 </html> 117 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698