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

Side by Side Diff: LayoutTests/inspector/console/console-format.html

Issue 11415185: Merge 134053 - Web Inspector: wrong output for empty object {} (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years 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 // Global Values 7 // Global Values
8 var globals = []; 8 var globals = [];
9 9
10 function onload() 10 function onload()
11 { 11 {
12 console.log('Message format number %i, %d and %f', 1, 2, 3.5); 12 console.log('Message format number %i, %d and %f', 1, 2, 3.5);
13 console.log('Message %s for %s', 'format', 'string'); 13 console.log('Message %s for %s', 'format', 'string');
14 console.log('Object %o', {'foo' : 'bar' }); 14 console.log('Object %o', {'foo' : 'bar' });
15 var foo = { foo: "foo"};
16 var bar = { bar: "bar" };
17 bar.__proto__ = foo;
15 18
16 var array = ["test", "test2"]; array.length = 10; 19 var array = ["test", "test2"]; array.length = 10;
17 array.foo = {}; 20 array.foo = {};
18 array[4] = "test4"; 21 array[4] = "test4";
19 22
20 console.log(array); 23 console.log(array);
21 console.log("%o", array); 24 console.log("%o", array);
22 console.log("%O", array); 25 console.log("%O", array);
23 26
24 // Populate Globals 27 // Populate Globals
(...skipping 11 matching lines...) Expand all
36 var linkify = "http://webkit.org/"; 39 var linkify = "http://webkit.org/";
37 var valuelessAttribute = document.createAttribute("attr"); 40 var valuelessAttribute = document.createAttribute("attr");
38 var valuedAttribute = document.createAttribute("attr"); 41 var valuedAttribute = document.createAttribute("attr");
39 valuedAttribute.value = "value"; 42 valuedAttribute.value = "value";
40 var existingAttribute = document.getElementById("x").attributes[0]; 43 var existingAttribute = document.getElementById("x").attributes[0];
41 var throwingLengthGetter = {get length() { throw "Length called"; }}; 44 var throwingLengthGetter = {get length() { throw "Length called"; }};
42 45
43 globals = [ 46 globals = [
44 regex1, regex2, str, str2, error, node, func, multilinefunc, num, linkif y, 47 regex1, regex2, str, str2, error, node, func, multilinefunc, num, linkif y,
45 null, undefined, valuelessAttribute, valuedAttribute, existingAttribute, throwingLengthGetter, 48 null, undefined, valuelessAttribute, valuedAttribute, existingAttribute, throwingLengthGetter,
46 NaN, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, array 49 NaN, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, array, {}, [fun ction() {}], bar
47 ]; 50 ];
48 51
49 runTest(); 52 runTest();
50 } 53 }
51 54
52 function log(current) 55 function log(current)
53 { 56 {
54 console.log(globals[current]); 57 console.log(globals[current]);
55 console.log([globals[current]]); 58 console.log([globals[current]]);
56 } 59 }
(...skipping 25 matching lines...) Expand all
82 } 85 }
83 } 86 }
84 </script> 87 </script>
85 </head> 88 </head>
86 89
87 <body onload="onload()"> 90 <body onload="onload()">
88 <div id="x"></div> 91 <div id="x"></div>
89 <p id="p">Tests that console logging dumps proper messages.</p> 92 <p id="p">Tests that console logging dumps proper messages.</p>
90 </body> 93 </body>
91 </html> 94 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698