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

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

Issue 1962443002: [DevTools] Fix completions for "Object." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/console-cd-completions-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="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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 function requestMyClassWithMixinCompletions() 137 function requestMyClassWithMixinCompletions()
138 { 138 {
139 InspectorTest.changeExecutionContext("top"); 139 InspectorTest.changeExecutionContext("top");
140 WebInspector.context.flavor(WebInspector.ExecutionContext).completionsFo rExpression("window.x.", "window.x.", 0, "", false, checkMyClassWithMixinComplet ions.bind(this)); 140 WebInspector.context.flavor(WebInspector.ExecutionContext).completionsFo rExpression("window.x.", "window.x.", 0, "", false, checkMyClassWithMixinComplet ions.bind(this));
141 } 141 }
142 142
143 function checkMyClassWithMixinCompletions(completions) 143 function checkMyClassWithMixinCompletions(completions)
144 { 144 {
145 InspectorTest.addResult("MyClass with mixin completions:") 145 InspectorTest.addResult("MyClass with mixin completions:")
146 dumpCompletions(completions, ["myMethod"]); 146 dumpCompletions(completions, ["myMethod"]);
147 requestObjectCompletions();
148 }
149
150
151 function requestObjectCompletions()
152 {
153 InspectorTest.changeExecutionContext("top");
154 WebInspector.context.flavor(WebInspector.ExecutionContext).completionsFo rExpression("Object.", "Object.", 0, "", false, checkObjectCompletions.bind(this ));
155 }
156
157 function checkObjectCompletions(completions)
158 {
159 InspectorTest.addResult("Object completions:")
160 dumpCompletions(completions, ["getOwnPropertyNames", "getOwnPropertyDesc riptor", "keys"]);
147 InspectorTest.dumpConsoleMessages(); 161 InspectorTest.dumpConsoleMessages();
148 InspectorTest.completeTest(); 162 InspectorTest.completeTest();
149 } 163 }
150 164
151 165
152 function dumpCompletions(completions, expected) 166 function dumpCompletions(completions, expected)
153 { 167 {
154 var completionSet = new Set(completions); 168 var completionSet = new Set(completions);
155 for (var completion of expected) { 169 for (var completion of expected) {
156 if (completionSet.has(completion)) 170 if (completionSet.has(completion))
(...skipping 11 matching lines...) Expand all
168 <p> 182 <p>
169 Test that completions in the context of an iframe with a different origin will 183 Test that completions in the context of an iframe with a different origin will
170 result in names of its global variables. Test passes if all global variables 184 result in names of its global variables. Test passes if all global variables
171 are found among completions AND there are NO console messages. 185 are found among completions AND there are NO console messages.
172 <a href="https://bugs.webkit.org/show_bug.cgi?id=65457">Bug 65457.</a> 186 <a href="https://bugs.webkit.org/show_bug.cgi?id=65457">Bug 65457.</a>
173 </p> 187 </p>
174 <iframe name="myIFrame" src="http://localhost:8000/inspector/resources/console-c d-completions-iframe.html" onload="runTest()"></iframe> 188 <iframe name="myIFrame" src="http://localhost:8000/inspector/resources/console-c d-completions-iframe.html" onload="runTest()"></iframe>
175 189
176 </body> 190 </body>
177 </html> 191 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/console-cd-completions-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698