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

Side by Side Diff: LayoutTests/inspector/console/console-dir-es6.html

Issue 512003003: DevTools: Show preview in console of ES6 Map, Set, WeakMap and WeakSet entries. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed dbg tests Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/inspector/console/console-dir-es6-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 onload() 7 function onload()
8 { 8 {
9 var obj = new Object(); 9 var obj = new Object();
10 obj["a"] = 1; 10 obj["a"] = 1;
11 obj[Symbol()] = 2; 11 obj[Symbol()] = 2;
12 obj[Symbol("a")] = 3; 12 obj[Symbol("a")] = 3;
13 obj[Symbol("a")] = Symbol.iterator; 13 obj[Symbol("a")] = Symbol.iterator;
14 obj[Symbol.iterator] = Symbol("foo"); 14 obj[Symbol.iterator] = Symbol("foo");
15 console.dir(obj); 15 console.dir(obj);
16 16
17 // This used to crash in debug build. 17 // This used to crash in debug build.
18 console.dir(Symbol()); 18 console.dir(Symbol());
19 19
20 [new Map(), new WeakMap()].forEach(function(m) { 20 [new Map(), new WeakMap()].forEach(function(m) {
21 m.set(obj, {foo: 1}); 21 m.set(obj, {foo: 1});
22 console.dir(m); 22 console.dir(m);
23 }); 23 });
24 [new Set(), new WeakSet()].forEach(function(s) { 24 [new Set(), new WeakSet()].forEach(function(s) {
25 s.add(obj); 25 s.add(obj);
26 console.dir(s); 26 console.dir(s);
27 }); 27 });
28 28
29 // Test circular dependency by entries.
30 var s1 = new Set();
31 var s2 = new Set();
32 s1.add(s2);
33 s2.add(s1);
34 console.dir(s1);
35
29 runTest(); 36 runTest();
30 } 37 }
31 38
32 function test() 39 function test()
33 { 40 {
34 InspectorTest.expandConsoleMessages(step1); 41 InspectorTest.expandConsoleMessages(step1);
35 42
36 function step1() 43 function step1()
37 { 44 {
38 InspectorTest.expandConsoleMessages(dumpConsoleMessages, true); 45 InspectorTest.expandConsoleMessages(dumpConsoleMessages, true);
39 } 46 }
40 47
41 function dumpConsoleMessages() 48 function dumpConsoleMessages()
42 { 49 {
43 InspectorTest.dumpConsoleMessages(false, false, InspectorTest.textConten tWithLineBreaks); 50 InspectorTest.dumpConsoleMessages(false, false, InspectorTest.textConten tWithLineBreaks);
44 InspectorTest.completeTest(); 51 InspectorTest.completeTest();
45 } 52 }
46 } 53 }
47 54
48 </script> 55 </script>
49 </head> 56 </head>
50 57
51 <body onload="onload()"> 58 <body onload="onload()">
52 <p> 59 <p>
53 Tests that console logging dumps proper messages. 60 Tests that console logging dumps proper messages.
54 </p> 61 </p>
55 62
56 </body> 63 </body>
57 </html> 64 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/console/console-dir-es6-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698