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

Unified Diff: third_party/WebKit/LayoutTests/inspector/console/console-correct-suggestions.html

Issue 2639703002: DevTools: Console: Provide autocompletions for Maps (Closed)
Patch Set: Created 3 years, 11 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-correct-suggestions.html
diff --git a/third_party/WebKit/LayoutTests/inspector/console/console-correct-suggestions.html b/third_party/WebKit/LayoutTests/inspector/console/console-correct-suggestions.html
index d2a9cec633720e58bdd6b6dd2b117b7a96144d91..cf322b3190f8b6fd5c27fbb943b080b1bd4b8406 100644
--- a/third_party/WebKit/LayoutTests/inspector/console/console-correct-suggestions.html
+++ b/third_party/WebKit/LayoutTests/inspector/console/console-correct-suggestions.html
@@ -12,9 +12,11 @@ function templateString()
}
function shouldNotFindThisFunction() { }
-
+function shouldFindThisFunction() { }
window["should not find this"] = true;
+var myMap = new Map([['first', 1], ['second', 2], ['third', 3], ['shouldNotFindThis', 4]]);
+
function test()
{
var consoleEditor;
@@ -68,7 +70,12 @@ function test()
() => testCompletions("`${do", ["document"], false),
() => testCompletions("// do", ["document"], false),
() => testCompletions('["should', ["shouldNotFindThisFunction"]),
- () => testCompletions("shou", ["should not find this"])
+ () => testCompletions("shou", ["should not find this"]),
+ () => testCompletions('myMap.get(', ['"first")', '"second")', '"third")']),
+ () => testCompletions('myMap.get(\'', ['\'first\')', '\'second\')', '\'third\')']),
+ () => testCompletions('myMap.set(\'firs', ['\'first\', ']),
+ () => testCompletions('myMap.set(should', ['shouldFindThisFunction', 'shouldNotFindThis', '\"shouldNotFindThis\")'])
+
]).then(InspectorTest.completeTest);
}

Powered by Google App Engine
This is Rietveld 408576698