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 2dd77ca287905083947623cf2dca88e1e41d0369..20ee94f767703e9a6c7335c8e5f2576c812c20c2 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; |
@@ -31,7 +33,7 @@ function test() |
function checkExpected(suggestions) |
{ |
var completions = new Set(suggestions.map(suggestion => suggestion.title)); |
- var message = "Checking '" + text + "'"; |
+ var message = "Checking '" + text.replace('\n', '\\n').replace('\r', '\\r') + "'"; |
if (force) |
message += " forcefully"; |
InspectorTest.addResult(message); |
@@ -72,6 +74,11 @@ function test() |
() => testCompletions("// do", ["document"], false), |
() => testCompletions('["should', ["shouldNotFindThisFunction"]), |
() => 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\")']), |
+ () => testCompletions('myMap.delete(\'', ['\'first\')', '\'second\')', '\'third\')']), |
() => testCompletions("document. bo", ["body"]), |
() => testCompletions("document.\tbo", ["body"]), |
() => testCompletions("document.\nbo", ["body"]), |