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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/console/console-log-object-with-getter.html

Issue 2521513006: DevTools: allow array previews to show static array getters (Closed)
Patch Set: Rebaseline Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/console/console-log-object-with-getter-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 var obj = {} 6 var obj = {}
7 Object.defineProperty(obj, 'foo', {enumerable: true, get: function() { return {a :1,b:2}; }}); 7 Object.defineProperty(obj, 'foo', {enumerable: true, get: function() { return {a :1,b:2}; }});
8 Object.defineProperty(obj, 'bar', {enumerable: false, set: function(x) { this.ba z = x; }}); 8 Object.defineProperty(obj, 'bar', {enumerable: false, set: function(x) { this.ba z = x; }});
9
10 var arr = [];
11 Object.defineProperty(arr, 0, {enumerable: true, get: function() { return 1; }}) ;
12 Object.defineProperty(arr, 1, {enumerable: false, set: function(x) { this.baz = x; }});
9 function logObject() 13 function logObject()
10 { 14 {
11 console.log(obj); 15 console.log(obj);
16 console.log(arr);
12 } 17 }
13 18
14 function test() 19 function test()
15 { 20 {
16 InspectorTest.evaluateInPage("logObject()", step2); 21 InspectorTest.evaluateInPage("logObject()", step2);
17 function step2() 22 function step2()
18 { 23 {
19 InspectorTest.expandConsoleMessages(step3); 24 InspectorTest.dumpConsoleMessages();
25 step3();
20 } 26 }
21 function step3() 27 function step3()
22 { 28 {
23 InspectorTest.expandGettersInConsoleMessages(step4); 29 InspectorTest.expandConsoleMessages(step4);
24 } 30 }
25 function step4() 31 function step4()
26 { 32 {
33 InspectorTest.expandGettersInConsoleMessages(step5);
34 }
35 function step5()
36 {
27 InspectorTest.dumpConsoleMessages(); 37 InspectorTest.dumpConsoleMessages();
28 InspectorTest.completeTest(); 38 InspectorTest.completeTest();
29 } 39 }
30 } 40 }
31 </script> 41 </script>
32 </head> 42 </head>
33 43
34 <body onload="runTest()"> 44 <body onload="runTest()">
35 <p> 45 <p>
36 Tests that console logging dumps object values defined by getters and allows to expand it. 46 Tests that console logging dumps object values defined by getters and allows to expand it.
37 </p> 47 </p>
38 </body> 48 </body>
39 </html> 49 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/console/console-log-object-with-getter-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698