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

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

Issue 82553008: DevTools: Show -0 for negative zero in console. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed Created 7 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 | Annotate | Revision Log
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 var obj = { $foo5_: 0 }; 56 var obj = { $foo5_: 0 };
57 obj[" a b "] = " a b "; 57 obj[" a b "] = " a b ";
58 obj["c d"] = "c d"; 58 obj["c d"] = "c d";
59 obj[""] = ""; 59 obj[""] = "";
60 obj[" "] = " "; 60 obj[" "] = " ";
61 obj["a\n\nb\nc"] = "a\n\nb\nc"; 61 obj["a\n\nb\nc"] = "a\n\nb\nc";
62 console.log(obj); 62 console.log(obj);
63 63
64 console.log("Object with a document.all property"); 64 console.log("Object with a document.all property");
65 console.log({all: document.all}); 65 console.log({all: document.all});
66
67 console.log("Object with special numbers");
68 var obj = { nan: NaN, posInf: Infinity, negInf: -Infinity, negZero: -0 };
69 console.log(obj);
66 } 70 }
67 71
68 function test() 72 function test()
69 { 73 {
70 InspectorTest.evaluateInPage("logToConsole()", callback); 74 InspectorTest.evaluateInPage("logToConsole()", callback);
71 75
72 function callback() 76 function callback()
73 { 77 {
74 InspectorTest.dumpConsoleMessages(false, true); 78 InspectorTest.dumpConsoleMessages(false, true);
75 InspectorTest.completeTest(); 79 InspectorTest.completeTest();
76 } 80 }
77 } 81 }
78 </script> 82 </script>
79 </head> 83 </head>
80 84
81 <body onload="runTest()"> 85 <body onload="runTest()">
82 <p> 86 <p>
83 Tests that console produces instant previews for arrays and objects. 87 Tests that console produces instant previews for arrays and objects.
84 </p> 88 </p>
85 89
86 </body> 90 </body>
87 </html> 91 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698