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

Unified Diff: webkit/glue/devtools/js/tests.js

Issue 155134: DevTools: Add global eval sanity test. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/debugger/devtools_sanity_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
};
« no previous file with comments | « chrome/browser/debugger/devtools_sanity_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698