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

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

Issue 2760583002: DevTools: Don't give up autocomplete after a fancy character in a string (Closed)
Patch Set: Always add a test Created 3 years, 9 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 be63ce4150b0ddf6da2b9bc9f0717b75b828e224..96f102c1a4614eed8b57ba04743a85687f8e7146 100644
--- a/third_party/WebKit/LayoutTests/inspector/console/console-correct-suggestions.html
+++ b/third_party/WebKit/LayoutTests/inspector/console/console-correct-suggestions.html
@@ -16,7 +16,12 @@ function shouldFindThisFunction() { }
window["should not find this"] = true;
var myMap = new Map([['first', 1], ['second', 2], ['third', 3], ['shouldNotFindThis', 4]]);
-
+var complicatedObject = {
+ 'foo-bar': true,
+ '"double-qouted"': true,
+ "'single-qouted'": true,
+ "notDangerous();": true
+}
function test()
{
var consoleEditor;
@@ -98,7 +103,14 @@ function test()
() => testCompletions("document[ [win", ["window"]),
() => testCompletions("document[ [ win", ["window"]),
() => testCompletions('I|mag', ['Image', 'Infinity']),
- () => testCompletions('var x = (do|);', ['document'])
+ () => testCompletions('var x = (do|);', ['document']),
+ () => testCompletions('complicatedObject["foo', ['"foo-bar"]']),
+ () => testCompletions('complicatedObject["foo-bar', ['"foo-bar"]']),
dgozman 2017/03/17 20:58:50 Let's test example for the bug: "foo-".
einbinder 2017/03/20 17:50:47 Done.
+ () => testCompletions('complicatedObject["\'sing', ['"\'single-qouted\'"]']),
+ () => testCompletions('complicatedObject[\'\\\'sing', ['\'\\\'single-qouted\\\'\']']),
+ () => testCompletions('complicatedObject["\'single-qou', ['"\'single-qouted\'"]']),
+ () => testCompletions('complicatedObject["\\"double-qouted\\"', ['"\\"double-qouted\\""]']),
+ () => testCompletions('complicatedObject["notDangerous();', ['"notDangerous();"]']),
]).then(InspectorTest.completeTest);
}

Powered by Google App Engine
This is Rietveld 408576698