Index: webkit/glue/devtools/js/tests.js |
=================================================================== |
--- webkit/glue/devtools/js/tests.js (revision 20017) |
+++ webkit/glue/devtools/js/tests.js (working copy) |
@@ -382,6 +382,11 @@ |
* Tests console eval. |
*/ |
TestSuite.prototype.testConsoleEval = function(controller) { |
+ WebInspector.console.visible = true; |
+ WebInspector.console.prompt.text = '123'; |
+ WebInspector.console.promptElement.handleKeyEvent( |
+ new TestSuite.KeyEvent('Enter')); |
+ |
var test = this; |
var originalConsoleAddMessage = WebInspector.Console.prototype.addMessage; |
WebInspector.Console.prototype.addMessage = function(commandResult) { |
@@ -391,11 +396,6 @@ |
controller.releaseControl(); |
}; |
- WebInspector.console.visible = true; |
- WebInspector.console.prompt.text = '123'; |
- WebInspector.console.promptElement.handleKeyEvent( |
- new TestSuite.KeyEvent('Enter')); |
- |
controller.takeControl(); |
}; |
@@ -445,20 +445,19 @@ |
* Tests eval of global objects. |
*/ |
TestSuite.prototype.testEvalGlobal = function(controller) { |
+ WebInspector.console.visible = true; |
+ WebInspector.console.prompt.text = 'foo'; |
+ WebInspector.console.promptElement.handleKeyEvent( |
+ new TestSuite.KeyEvent('Enter')); |
+ |
var test = this; |
var originalConsoleAddMessage = WebInspector.Console.prototype.addMessage; |
WebInspector.Console.prototype.addMessage = function(commandResult) { |
originalConsoleAddMessage.call(this, commandResult); |
- WebInspector.Console.prototype.addMessage = originalConsoleAddMessage; |
test.assertEquals('fooValue', commandResult.toMessageElement().textContent); |
controller.releaseControl(); |
}; |
- WebInspector.console.visible = true; |
- WebInspector.console.prompt.text = 'foo'; |
- WebInspector.console.promptElement.handleKeyEvent( |
- new TestSuite.KeyEvent('Enter')); |
- |
controller.takeControl(); |
}; |