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

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: added preview test Created 7 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 | 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 console.log(denseArray); 53 console.log(denseArray);
54 54
55 console.log("Object with properties containing whitespaces"); 55 console.log("Object with properties containing whitespaces");
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
64 console.log("Object with special numbers");
65 var obj = { nan: NaN, posInf: Infinity, negInf: -Infinity, negZero: -0 };
66 console.log(obj);
63 } 67 }
64 68
65 function test() 69 function test()
66 { 70 {
67 InspectorTest.evaluateInPage("logToConsole()", callback); 71 InspectorTest.evaluateInPage("logToConsole()", callback);
68 72
69 function callback() 73 function callback()
70 { 74 {
71 InspectorTest.dumpConsoleMessages(false, true); 75 InspectorTest.dumpConsoleMessages(false, true);
72 InspectorTest.completeTest(); 76 InspectorTest.completeTest();
73 } 77 }
74 } 78 }
75 </script> 79 </script>
76 </head> 80 </head>
77 81
78 <body onload="runTest()"> 82 <body onload="runTest()">
79 <p> 83 <p>
80 Tests that console produces instant previews for arrays and objects. 84 Tests that console produces instant previews for arrays and objects.
81 </p> 85 </p>
82 86
83 </body> 87 </body>
84 </html> 88 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698