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

Unified Diff: third_party/WebKit/LayoutTests/inspector/console/console-smart-enter.html

Issue 2361273002: DevTools: Move "enter" logic from ConsoleView to ConsolePrompt (Closed)
Patch Set: Fix browser tests Created 4 years, 3 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
Index: third_party/WebKit/LayoutTests/inspector/console/console-smart-enter.html
diff --git a/third_party/WebKit/LayoutTests/inspector/console/console-smart-enter.html b/third_party/WebKit/LayoutTests/inspector/console/console-smart-enter.html
index 16e8e9fb527ed3cbdcb341dcf33cece1377610c4..294767e107e9acf6fe9fd0cf9f2ddeccabec5496 100644
--- a/third_party/WebKit/LayoutTests/inspector/console/console-smart-enter.html
+++ b/third_party/WebKit/LayoutTests/inspector/console/console-smart-enter.html
@@ -57,22 +57,16 @@ function test()
function pressEnterAfter(text)
{
var fulfill;
- var ended = false;
var promise = new Promise(x => fulfill = x);
- InspectorTest.addConsoleViewSniffer(enterProcessed);
- InspectorTest.addSniffer(WebInspector.ConsolePrompt.prototype, "newlineAndIndent", enterProcessed);
+ InspectorTest.addSniffer(WebInspector.ConsolePrompt.prototype, "_enterProcessedForTest", enterProcessed);
prompt.setText(text);
prompt.moveCaretToEndOfPrompt();
- prompt.element.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
-
+ prompt._enterKeyPressed(InspectorTest.createKeyEvent("Enter"));
return promise;
function enterProcessed()
{
- if (ended)
- return;
- ended = true;
InspectorTest.addResult("Text Before Enter:");
InspectorTest.addResult(text.replace(/ /g, "."));
InspectorTest.addResult("Text After Enter:");

Powered by Google App Engine
This is Rietveld 408576698