| OLD | NEW |
| 1 var initialize_ConsoleTest = function() { | 1 var initialize_ConsoleTest = function() { |
| 2 | 2 |
| 3 InspectorTest.preloadPanel("console"); | 3 InspectorTest.preloadPanel("console"); |
| 4 | 4 |
| 5 InspectorTest.evaluateInConsole = function(code, callback) | 5 InspectorTest.evaluateInConsole = function(code, callback) |
| 6 { | 6 { |
| 7 callback = InspectorTest.safeWrap(callback); | 7 callback = InspectorTest.safeWrap(callback); |
| 8 | 8 |
| 9 var consoleView = WebInspector.ConsolePanel._view(); | 9 var consoleView = WebInspector.ConsolePanel._view(); |
| 10 consoleView.visible = true; | 10 consoleView.visible = true; |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 else | 245 else |
| 246 InspectorTest.addResult("SUCCESS: message parameters list is emp
ty. "); | 246 InspectorTest.addResult("SUCCESS: message parameters list is emp
ty. "); |
| 247 } else { | 247 } else { |
| 248 InspectorTest.addResult("FAILED: didn't find _parameters field in th
e message."); | 248 InspectorTest.addResult("FAILED: didn't find _parameters field in th
e message."); |
| 249 } | 249 } |
| 250 } | 250 } |
| 251 } | 251 } |
| 252 | 252 |
| 253 InspectorTest.waitUntilMessageReceived = function(callback) | 253 InspectorTest.waitUntilMessageReceived = function(callback) |
| 254 { | 254 { |
| 255 InspectorTest.addSniffer(WebInspector.consoleModel, "addMessage", callback,
false); | 255 InspectorTest.addSniffer(InspectorTest.consoleModel, "addMessage", callback,
false); |
| 256 } | 256 } |
| 257 | 257 |
| 258 InspectorTest.waitUntilNthMessageReceived = function(count, callback) | 258 InspectorTest.waitUntilNthMessageReceived = function(count, callback) |
| 259 { | 259 { |
| 260 function override() | 260 function override() |
| 261 { | 261 { |
| 262 if (--count === 0) | 262 if (--count === 0) |
| 263 InspectorTest.safeWrap(callback)(); | 263 InspectorTest.safeWrap(callback)(); |
| 264 else | 264 else |
| 265 InspectorTest.addSniffer(WebInspector.consoleModel, "addMessage", ov
erride, false); | 265 InspectorTest.addSniffer(InspectorTest.consoleModel, "addMessage", o
verride, false); |
| 266 } | 266 } |
| 267 InspectorTest.addSniffer(WebInspector.consoleModel, "addMessage", override,
false); | 267 InspectorTest.addSniffer(InspectorTest.consoleModel, "addMessage", override,
false); |
| 268 } | 268 } |
| 269 | 269 |
| 270 InspectorTest.changeExecutionContext = function(namePrefix) | 270 InspectorTest.changeExecutionContext = function(namePrefix) |
| 271 { | 271 { |
| 272 var selector = WebInspector.ConsolePanel._view()._executionContextSelector._
selectElement; | 272 var selector = WebInspector.ConsolePanel._view()._executionContextSelector._
selectElement; |
| 273 var option = selector.firstChild; | 273 var option = selector.firstChild; |
| 274 while (option) { | 274 while (option) { |
| 275 if (option.textContent && option.textContent.startsWith(namePrefix)) | 275 if (option.textContent && option.textContent.startsWith(namePrefix)) |
| 276 break; | 276 break; |
| 277 option = option.nextSibling; | 277 option = option.nextSibling; |
| 278 } | 278 } |
| 279 if (!option) { | 279 if (!option) { |
| 280 InspectorTest.addResult("FAILED: context with prefix: " + namePrefix +
" not found in the context list"); | 280 InspectorTest.addResult("FAILED: context with prefix: " + namePrefix +
" not found in the context list"); |
| 281 return; | 281 return; |
| 282 } | 282 } |
| 283 option.selected = true; | 283 option.selected = true; |
| 284 WebInspector.ConsolePanel._view()._executionContextChanged(); | 284 WebInspector.ConsolePanel._view()._executionContextChanged(); |
| 285 } | 285 } |
| 286 | 286 |
| 287 } | 287 } |
| OLD | NEW |