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

Unified Diff: LayoutTests/inspector/editor/text-editor-autocomplete.html

Issue 670163002: DevTools: [CodeMirrro] defer autocomplete controller initialization (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebaseline test Created 6 years, 2 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 | « no previous file | LayoutTests/inspector/editor/text-editor-autocomplete-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/editor/text-editor-autocomplete.html
diff --git a/LayoutTests/inspector/editor/text-editor-autocomplete.html b/LayoutTests/inspector/editor/text-editor-autocomplete.html
index 43794fb72bd1888682a07559635cbf346c527e6a..073e522898afc23294cf8795e01689612a5c1643 100644
--- a/LayoutTests/inspector/editor/text-editor-autocomplete.html
+++ b/LayoutTests/inspector/editor/text-editor-autocomplete.html
@@ -18,6 +18,21 @@ function test()
textEditor.setCompletionDictionary(completionDictionary);
InspectorTest.runTestSuite([
+ // This test has to be the first. It validates that autocompletion controller
+ // will initialize as a key will be pressed.
+ function testCompletionsShowUpOnKeyPress(next)
+ {
+ textEditor.setText("name1 name2 name3 name4\nna");
+ textEditor.setSelection(WebInspector.TextRange.createFromLocation(1, 2));
+ InspectorTest.addSniffer(WebInspector.SuggestBox.prototype, "updateSuggestions", onAutocompletionSuggestBox);
+ InspectorTest.typeIn(textEditor, "m", new Function());
+ function onAutocompletionSuggestBox()
+ {
+ document.activeElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
+ dumpDictionary(next);
+ }
+ },
+
function testSetInitialText(next)
{
textEditor.setText("one two three3_\nfour five\na_b\nsix\n123foo\n132\nseven");
« no previous file with comments | « no previous file | LayoutTests/inspector/editor/text-editor-autocomplete-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698