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

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

Issue 654753003: DevTools: text node rendering in the console regressed when migrated to promises. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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
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 log(current) 10 function log(current)
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 var valuelessAttribute = document.createAttribute("attr"); 51 var valuelessAttribute = document.createAttribute("attr");
52 var valuedAttribute = document.createAttribute("attr"); 52 var valuedAttribute = document.createAttribute("attr");
53 valuedAttribute.value = "value"; 53 valuedAttribute.value = "value";
54 var existingAttribute = document.getElementById("x").attributes[0]; 54 var existingAttribute = document.getElementById("x").attributes[0];
55 var throwingLengthGetter = {get length() { throw "Length called"; }}; 55 var throwingLengthGetter = {get length() { throw "Length called"; }};
56 var objectWithNonEnumerables = Object.create({ foo: 1 }, { 56 var objectWithNonEnumerables = Object.create({ foo: 1 }, {
57 getFoo: { value: function() { return this.foo; } }, 57 getFoo: { value: function() { return this.foo; } },
58 bar: { get: function() { return this.bar; }, set: function(x) { this.bar = x; } } 58 bar: { get: function() { return this.bar; }, set: function(x) { this.bar = x; } }
59 }); 59 });
60 var negZero = 1 / Number.NEGATIVE_INFINITY; 60 var negZero = 1 / Number.NEGATIVE_INFINITY;
61 61 var textNode = document.getElementById("x").nextSibling;
62 var arrayLikeFunction = function() {}; 62 var arrayLikeFunction = function() {};
63 arrayLikeFunction.splice = function() {}; 63 arrayLikeFunction.splice = function() {};
64 64
65 globals = [ 65 globals = [
66 regex1, regex2, str, str2, error, errorWithMessage, node, func, multilin efunc, num, linkify, 66 regex1, regex2, str, str2, error, errorWithMessage, node, func, multilin efunc, num, linkify,
67 null, undefined, valuelessAttribute, valuedAttribute, existingAttribute, throwingLengthGetter, 67 null, undefined, valuelessAttribute, valuedAttribute, existingAttribute, throwingLengthGetter,
68 NaN, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, array, {}, [fun ction() {}], bar, svg, 68 NaN, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, array, {}, [fun ction() {}], bar, svg,
69 objectWithNonEnumerables, negZero, Object.create(null), Object, Object.p rototype, arrayLikeFunction, 69 objectWithNonEnumerables, negZero, Object.create(null), Object, Object.p rototype, arrayLikeFunction,
70 new Number(42), new String("abc"), new Uint16Array([1, 2, 3]) 70 new Number(42), new String("abc"), new Uint16Array([1, 2, 3]), textNode
71 ]; 71 ];
72 72
73 runTest(); 73 runTest();
74 } 74 }
75 75
76 function test() 76 function test()
77 { 77 {
78 InspectorTest.hideInspectorView(); 78 InspectorTest.hideInspectorView();
79 InspectorTest.evaluateInPage("globals.length", loopOverGlobals.bind(this, 0) ); 79 InspectorTest.evaluateInPage("globals.length", loopOverGlobals.bind(this, 0) );
80 80
81 function loopOverGlobals(current, total) 81 function loopOverGlobals(current, total)
82 { 82 {
83 function advance() 83 function advance()
84 { 84 {
85 var next = current + 1; 85 var next = current + 1;
86 if (next == total.description) 86 if (next == total.description)
87 InspectorTest.waitForRemoteObjectsConsoleMessages(onRemoteObject sLoaded); 87 InspectorTest.waitForRemoteObjectsConsoleMessages(onRemoteObject sLoaded);
88 else 88 else
89 loopOverGlobals(next, total); 89 loopOverGlobals(next, total);
90 } 90 }
91 91
92 function onRemoteObjectsLoaded() 92 function onRemoteObjectsLoaded()
93 { 93 {
94 InspectorTest.expandConsoleMessages(finish); 94 InspectorTest.expandConsoleMessages(finish, undefined, function(sect ion) { return section.titleElement.textContent !== "#text"; });
95 } 95 }
96 96
97 function finish() 97 function finish()
98 { 98 {
99 InspectorTest.dumpConsoleMessages(); 99 InspectorTest.dumpConsoleMessages();
100 InspectorTest.completeTest(); 100 InspectorTest.completeTest();
101 } 101 }
102 102
103 InspectorTest.evaluateInPage("log(" + current + ")"); 103 InspectorTest.evaluateInPage("log(" + current + ")");
104 InspectorTest.runAfterPendingDispatches(evalInConsole); 104 InspectorTest.runAfterPendingDispatches(evalInConsole);
105 function evalInConsole() 105 function evalInConsole()
106 { 106 {
107 InspectorTest.evaluateInConsole("globals[" + current + "]"); 107 InspectorTest.evaluateInConsole("globals[" + current + "]");
108 InspectorTest.runAfterPendingDispatches(advance); 108 InspectorTest.runAfterPendingDispatches(advance);
109 } 109 }
110 } 110 }
111 } 111 }
112 </script> 112 </script>
113 </head> 113 </head>
114 114
115 <body onload="onload()"> 115 <body onload="onload()">
116 <div id="x"></div> 116 <div id="x"></div>
117 <p id="p">Tests that console logging dumps proper messages.</p> 117 <p id="p">Tests that console logging dumps proper messages.</p>
118 </body> 118 </body>
119 <svg id="svg-node"></svg> 119 <svg id="svg-node"></svg>
120 </html> 120 </html>
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/inspector/console-test.js ('k') | LayoutTests/inspector/console/console-format-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698