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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/console-cd-completions.html

Issue 2557763003: DevTools: sort completions by prototype. (Closed)
Patch Set: rebaselined 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/http/tests/inspector/console-completions.html » ('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="console-test.js"></script> 3 <script src="console-test.js"></script>
4 <script src="inspector-test.js"></script> 4 <script src="inspector-test.js"></script>
5 <script> 5 <script>
6 6
7 window.counter = 0; 7 window.counter = 0;
8 var handler = { 8 var handler = {
9 get: function(target, name){ 9 get: function(target, name){
10 window.counter++; 10 window.counter++;
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 InspectorTest.addResult("Object completions:") 159 InspectorTest.addResult("Object completions:")
160 dumpCompletions(completions, ["getOwnPropertyNames", "getOwnPropertyDesc riptor", "keys"]); 160 dumpCompletions(completions, ["getOwnPropertyNames", "getOwnPropertyDesc riptor", "keys"]);
161 InspectorTest.dumpConsoleMessages(); 161 InspectorTest.dumpConsoleMessages();
162 InspectorTest.completeTest(); 162 InspectorTest.completeTest();
163 } 163 }
164 164
165 165
166 function dumpCompletions(completions, expected) 166 function dumpCompletions(completions, expected)
167 { 167 {
168 var completionSet = new Set(completions.map(c => c.title)); 168 var completionSet = new Set(completions.map(c => c.title));
169 var notFound = false;
169 for (var completion of expected) { 170 for (var completion of expected) {
170 if (completionSet.has(completion)) 171 if (completionSet.has(completion)) {
171 InspectorTest.addResult(completion); 172 InspectorTest.addResult(completion);
172 else 173 } else {
173 InspectorTest.addResult("NOT FOUND: " + completion); 174 InspectorTest.addResult("NOT FOUND: " + completion);
175 notFound = true;
176 }
174 } 177 }
178 if (notFound)
179 InspectorTest.addResult(JSON.stringify(completions));
175 } 180 }
176 } 181 }
177 182
178 </script> 183 </script>
179 </head> 184 </head>
180 185
181 <body> 186 <body>
182 <p> 187 <p>
183 Test that completions in the context of an iframe with a different origin will 188 Test that completions in the context of an iframe with a different origin will
184 result in names of its global variables. Test passes if all global variables 189 result in names of its global variables. Test passes if all global variables
185 are found among completions AND there are NO console messages. 190 are found among completions AND there are NO console messages.
186 <a href="https://bugs.webkit.org/show_bug.cgi?id=65457">Bug 65457.</a> 191 <a href="https://bugs.webkit.org/show_bug.cgi?id=65457">Bug 65457.</a>
187 </p> 192 </p>
188 <iframe name="myIFrame" src="http://localhost:8000/inspector/resources/console-c d-completions-iframe.html" onload="runTest()"></iframe> 193 <iframe name="myIFrame" src="http://localhost:8000/inspector/resources/console-c d-completions-iframe.html" onload="runTest()"></iframe>
189 194
190 </body> 195 </body>
191 </html> 196 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/console-completions.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698