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

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

Issue 2712513002: DevTools: extract ObjectUI module from Components (Closed)
Patch Set: fix build.gn Created 3 years, 10 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-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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 }; 85 };
86 MyClass.prototype = Object.create(null); 86 MyClass.prototype = Object.create(null);
87 mixin.call(MyClass.prototype); 87 mixin.call(MyClass.prototype);
88 window.x = new MyClass(); 88 window.x = new MyClass();
89 89
90 90
91 function test() 91 function test()
92 { 92 {
93 InspectorTest.changeExecutionContext("myIFrame"); 93 InspectorTest.changeExecutionContext("myIFrame");
94 94
95 Components.JavaScriptAutocomplete.completionsForExpression("", "myGlob").the n(checkCompletions.bind(this)); 95 ObjectUI.JavaScriptAutocomplete.completionsForExpression("", "myGlob").then( checkCompletions.bind(this));
96 function checkCompletions(completions) 96 function checkCompletions(completions)
97 { 97 {
98 InspectorTest.addResult("myGlob completions:") 98 InspectorTest.addResult("myGlob completions:")
99 dumpCompletions(completions, ["myGlobalVar", "myGlobalFunction"]); 99 dumpCompletions(completions, ["myGlobalVar", "myGlobalFunction"]);
100 requestIFrameCompletions(); 100 requestIFrameCompletions();
101 } 101 }
102 102
103 function requestIFrameCompletions() 103 function requestIFrameCompletions()
104 { 104 {
105 InspectorTest.changeExecutionContext("top"); 105 InspectorTest.changeExecutionContext("top");
106 Components.JavaScriptAutocomplete.completionsForExpression("myIFrame.", "").then(checkIframeCompletions.bind(this)); 106 ObjectUI.JavaScriptAutocomplete.completionsForExpression("myIFrame.", "" ).then(checkIframeCompletions.bind(this));
107 } 107 }
108 108
109 function checkIframeCompletions(completions) 109 function checkIframeCompletions(completions)
110 { 110 {
111 InspectorTest.addResult("myIFrame completions:") 111 InspectorTest.addResult("myIFrame completions:")
112 dumpCompletions(completions, ["self", "top", "window"]); 112 dumpCompletions(completions, ["self", "top", "window"]);
113 requestProxyCompletions(); 113 requestProxyCompletions();
114 } 114 }
115 115
116 116
117 function requestProxyCompletions() 117 function requestProxyCompletions()
118 { 118 {
119 InspectorTest.changeExecutionContext("top"); 119 InspectorTest.changeExecutionContext("top");
120 Components.JavaScriptAutocomplete.completionsForExpression("window.proxy 2.", "").then(checkProxyCompletions.bind(this)); 120 ObjectUI.JavaScriptAutocomplete.completionsForExpression("window.proxy2. ", "").then(checkProxyCompletions.bind(this));
121 } 121 }
122 122
123 function checkProxyCompletions(completions) 123 function checkProxyCompletions(completions)
124 { 124 {
125 InspectorTest.addResult("proxy completions:") 125 InspectorTest.addResult("proxy completions:")
126 dumpCompletions(completions, ["a"]); 126 dumpCompletions(completions, ["a"]);
127 InspectorTest.evaluateInPage("window.counter", dumpCounter); 127 InspectorTest.evaluateInPage("window.counter", dumpCounter);
128 } 128 }
129 129
130 function dumpCounter(result) 130 function dumpCounter(result)
131 { 131 {
132 InspectorTest.addResult("window.counter = " + result.value); 132 InspectorTest.addResult("window.counter = " + result.value);
133 requestMyClassWithMixinCompletions(); 133 requestMyClassWithMixinCompletions();
134 } 134 }
135 135
136 136
137 function requestMyClassWithMixinCompletions() 137 function requestMyClassWithMixinCompletions()
138 { 138 {
139 InspectorTest.changeExecutionContext("top"); 139 InspectorTest.changeExecutionContext("top");
140 Components.JavaScriptAutocomplete.completionsForExpression("window.x.", "").then(checkMyClassWithMixinCompletions.bind(this)); 140 ObjectUI.JavaScriptAutocomplete.completionsForExpression("window.x.", "" ).then(checkMyClassWithMixinCompletions.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(); 147 requestObjectCompletions();
148 } 148 }
149 149
150 150
151 function requestObjectCompletions() 151 function requestObjectCompletions()
152 { 152 {
153 InspectorTest.changeExecutionContext("top"); 153 InspectorTest.changeExecutionContext("top");
154 Components.JavaScriptAutocomplete.completionsForExpression("Object.", " ").then(checkObjectCompletions.bind(this)); 154 ObjectUI.JavaScriptAutocomplete.completionsForExpression("Object.", "") .then(checkObjectCompletions.bind(this));
155 } 155 }
156 156
157 function checkObjectCompletions(completions) 157 function checkObjectCompletions(completions)
158 { 158 {
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
(...skipping 22 matching lines...) Expand all
187 <p> 187 <p>
188 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
189 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
190 are found among completions AND there are NO console messages. 190 are found among completions AND there are NO console messages.
191 <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>
192 </p> 192 </p>
193 <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>
194 194
195 </body> 195 </body>
196 </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